Error Loading Razor Script (file: List Images) 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'umbracoFile' at CallSite.Target(Closure , CallSite , Object )
DAMP is on a content node and the images are being picked from media section. There is not custom field its just the default media field umbracoFile. I also tried
I gat all kind of errors, just can't access any of the properties
'Umbraco.Core.Dynamics.DynamicXml' does not contain a definition for 'Id'
'Umbraco.Core.Dynamics.DynamicXml' does not contain a definition for 'Url'
'Umbraco.Core.Dynamics.DynamicXml' does not contain a definition for 'mediaItem'
'Umbraco.Core.Dynamics.DynamicXml' does not contain a definition for 'umbracoFile'
I simply need to get url of a file, can anyone advise?
This issue comes when we upgrade from version 6 to 7.
To resolve this issue , you have to check the data type of the existing node type that the picker is using.
umbraco 6 uses the custom data type created by uComponent which is deprecated in version higher than 7.
Just replace the respective picker with **MultiNode Tree picker** in Umbraco 7 , that will help in resolving the issue.
You can get the list of available list of Data Types supported by Umbraco 7 , in Developer section when you login as Admin.
Just create new data type with Multinode Tree Picker and use it to replace with the existing content property.
Dynamic Xml will be converted to DynamicNodeList and your life is easy :)
Thanks , let me know for any further queries. i have successfully upgraded version 6 to 7 of very Huge banking site.
Razor macro issues
Using umbraco 4.9.0 and damp its set to multiple images and to save as xml. I have
@inherits umbraco.MacroEngines.DynamicNodeContext
@using DigibizAdvancedMediaPicker
@if (Model.HasValue("pageImages"))
{
foreach (var imageItem in Model.pageImages){
<div class="pic">
<a href="@imageItem.umbracoFile">@imageItem.nodeName</a>
</div>
}
I get the following error
Error Loading Razor Script (file: List Images) 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'umbracoFile' at CallSite.Target(Closure , CallSite , Object )
Any ideas
}
Are you picking them up from the content section or from the media section? Did you name the custom field "umbracoFile"?
Markus,
DAMP is on a content node and the images are being picked from media section. There is not custom field its just the default media field umbracoFile. I also tried
imageItem.mediaItem.umbracoFile
Still get error.
Regards
Ismail
Could you post some of the cached XML from /app_data/ ?
/ m
Markus,
I just stepped through the code and the xml is
<mediaItem>
<node id="1107" version="5600e63e-4222-48c5-8e4e-e5a6723fb7ab" parentID="1106" level="2" writerID="0" nodeType="1032" template="0" sortOrder="1" createDate="2010-06-10T14:41:51" updateDate="2010-06-10T14:41:51" nodeName="news image 4" urlName="newsimage4" writerName="Administrator" nodeTypeAlias="Image" path="-1,1106,1107">
<data alias="umbracoFile">/media/770/franc6.jpg</data>
<data alias="umbracoWidth">392</data>
<data alias="umbracoHeight">154</data>
<data alias="umbracoBytes">21006</data>
<data alias="umbracoExtension">jpg</data>
</node>
</mediaItem>
Regards
Ismail
Markus,
Arghghghghghhgghghghghghhgh!!!!! Just figured out what the issue is. I have xml set to legacy!!!
Total doh moment!!
Regards
Ismail
Ahaa =D
Great that you did find a solution! =D
Hi Ismail,
I am getting same issue un V6.1.6 also, while XML setting is also falese. <UseLegacyXmlSchema>false</UseLegacyXmlSchema>
Can you help?
Regards,
Suraj
Suraj,
Try rebuilding your internal index if that dont work then try re saving just one of the media items see if that regenerates the xml.
Regards
Ismail
Have you been able to solve the problem, Suraj, I use the same version and have the same problem, my xml is:
I gat all kind of errors, just can't access any of the properties
I simply need to get url of a file, can anyone advise?
Thank you
This issue comes when we upgrade from version 6 to 7.
To resolve this issue , you have to check the data type of the existing node type that the picker is using.
umbraco 6 uses the custom data type created by uComponent which is deprecated in version higher than 7.
Just create new data type with Multinode Tree Picker and use it to replace with the existing content property.
Dynamic Xml will be converted to DynamicNodeList and your life is easy :)
Thanks , let me know for any further queries. i have successfully upgraded version 6 to 7 of very Huge banking site.
Regards, Arjun Singh
is working on a reply...