-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content query with document containing RTE with Macro's throws ArgumentNullException #6141
Comments
Same issue has been described on this Our Umbraco post by Damien. |
Does it help if you remove and re-insert the macro in the RTE? It seems like your current macro might be storing some unexpected data. It would be good to see what data is stored for the macro currently and then try to update by removing and re-inserting the macro. |
I think the problem is where the macro rendering is happening, rather than the macro itself.
Even when it's not null, we'll be rendering the macro with However, I'm not sure that we should be rendering macros at all in |
@nul800sebastiaan thanks for the suggestion. @stevemegson that sounds like it would apply to my case. My XPath query is happening in an |
Ah okay, I understand now, the macro is failing because the code in your macro is no longer working. I though the migration might have forgotten about some macro configuration somewhere. Alright, it seems like you might need to update the way you get your content for now. Does something like this work for you?
|
So the Macro itself works fine when I add it to an RTE. The preview even renders properly and I can see it execute my Razor code. Only after publishing the issue occurs in my code. Also will try your suggestion when I get home. |
@nul800sebastiaan I noticed that the macros are being calculated at site startup and then cached. |
Great to hear! There's loads of large breaking changes in v8 :-) If this works for you then roll with it. We don't have an XML cache in v8 and getting by XPATH is not as performant as it was before. If someone wants to fix this issue then feel free to help out if you can. |
Hi @Swimburger, We're writing to let you know that we've added the For more information about issues and states, have a look at this blog post Thanks muchly, from your friendly PR team bot :-) |
@nul800sebastiaan What's the high performance alternative for complex querying? |
Reproduction
Bug summary
I performed an upgrade from 7.15 to 8.1.2 following the upgrade blog post provided by Umbraco. After refactoring the code to the new API everything works except this one issue.
I have a document containing an RTE field with Macro's.
Instead of having the Macro render using my Macro code, it's simply returned as part of the HTML without calling the macro code.
After publishing the document an
ArgumentNullException
is thrown byUmbraco.Web.Macros.PublishedContentHashtableConverter..ctor(IPublishedContent doc)
.I noticed my macro was using Umbraco.TextboxMultiple instead of the new alias Umbraco.TextArea. After changing the Macro Parameter Editor to Umbraco.TextArea, nothing changed unfortunately, but it may be related... not sure.
Specifics
Pre-upgrade umbraco version: 7.15
Post-upgrade umbraco version: 8.1.2
Code snippet:
Stacktrace:
Steps to reproduce
Not sure if reproducible with a clean Umbraco 8 instance (instead of upgrading).
At minimum, I expect you'll need RTE with a Macro. The macro needs a parameter.
Expected result
I expect the macro to be rendered using my Razor macro code as it did before the upgrade.
Actual result
Stack trace above.
The text was updated successfully, but these errors were encountered: