Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonathan L Folland 31 posts 173 karma points
    Aug 09, 2024 @ 15:10
    Jonathan L Folland
    0

    Umbraco 13 - Access Rich Text that contains macro in block list without a rendering context

    I am trying to retrieve rich text from a block list block during indexing. I cannot seem to access it if it contains a macro. I am guessing that Umbraco needs to render the macro, but it has no rendering context. I see an error occurring at

    MacroRenderer.

    I do not see public properties that allow me to get the raw data, which would be acceptable for the indexing process. Is there a way to do either of the following during indexing process?:

    1. Access raw data of rich text without trigger macrorenderer.
    2. Provide context during indexing so that macrorenderer can be successful.

    I have tried setting MacroErrors to Silent to no avail.

    Below is the stack trace at the error point:

    System.ArgumentNullException HResult=0x80004003 Message=Value cannot be null. (Parameter 'content') Source=Umbraco.Web.Common
    StackTrace: at Umbraco.Cms.Web.Common.Macros.MacroRenderer.

    This exception was originally thrown at this call stack: [External Code] Umbraco.Cms.Web.Common.PublishedModels.RichTextBase.GetRichText(Umbraco.Cms.Web.Common.PublishedModels.IRichTextBase, Umbraco.Cms.Core.Models.PublishedContent.IPublishedValueFallback) in RichTextBase.generated.cs

Please Sign in or register to post replies

Write your reply to:

Draft