The issue because Model.MacroParameters["advancedSearchNodeId"]
ids are in new format.
You can disable these new uids in umbracoSettings.config EnablePropertyValueConverters set to false - this will help your existing content queries to still work
'Umbraco.Core.Udi' does not contain a definition for 'ToPublishedContent' and no extension method 'ToPublishedContent' accepting a first argument of type 'Umbraco.Core.Udi'
Basically, ToPublishedContent() is bad, and will be obsoleted in the very near future (possibly next patch release) and we'll be able to use the standard UmbracoHelper.TypedContent() method and friends instead.
Thank you as well for the tip on how to disable the new Content Picker behaviour, I found that answer in another post, but since I'm doing an upgrade on the site either way, I want to be change all the pickers.
New content picker as macro parameter v7.6.1
Hi everyone,
Maybe this is something really easy, and I am just not seeing it..
I just upgraded to 7.6.1 and I'm trying to work with a contentPicker2 as a macro parameter for a macro that goes into the RTE.
The problem is that when I try to set it in a variable I get an error saying
Am I missing something?
-Adri
Hi Adriana
Can you show code of your macro?
Thanks,
Alex
Hey, sure
If I change it to a string (like I've used other parameters) it prints: umb://document/c7c8c847b85842d5ada827b8759263f8
The issue because Model.MacroParameters["advancedSearchNodeId"]
ids are in new format.
You can disable these new uids in umbracoSettings.config EnablePropertyValueConverters set to false - this will help your existing content queries to still work
Hey Adriana
Use this code please:
Thanks,
Alex
I think I am missing something else..
See the note on a similar forum topic here:
https://our.umbraco.org/forum/templates-partial-views-and-macros/85703-macro-parameter-to-ipublishedcontent#comment-272529
Basically,
ToPublishedContent()
is bad, and will be obsoleted in the very near future (possibly next patch release) and we'll be able to use the standardUmbracoHelper.TypedContent()
method and friends instead.Add reference to "Umbraco.Web.Extensions"
Alex
Alex, sorry that I couldn't answer sooner.
Thanks for the fix! =) It worked!! =)
Thank you as well for the tip on how to disable the new Content Picker behaviour, I found that answer in another post, but since I'm doing an upgrade on the site either way, I want to be change all the pickers.
Best regards,
-Adri
You are welcome, Adriana
Really glad to help!
is working on a reply...