Hello, we recently updates our DAMP from 2.0 to 2.5. This ended up breaking our gallery macro (working fine before the upgrade) and we cannot seem to figure out what the problem is. It appears that the property is not being seen as a list of anything. We are currently using Umbraco 6.0.2.
Now, we get an error that says 'umbraco.MacroEngines.PropertyResult' does not contain a definition for 'MediaItem' . The gallery property is a DAMP datatype
We have attempted going about it in a multitude of different ways but to no avail. Advice?
Thanks in advance and sorry if my formatting is poor.
If it helps, the DAMP object appears to be just a String object and the image file paths, etc are outputted on screen in plain text using @Model.gallery .
Upgrade from 2.0 to 2.5 breaks macros
Hello, we recently updates our DAMP from 2.0 to 2.5. This ended up breaking our gallery macro (working fine before the upgrade) and we cannot seem to figure out what the problem is. It appears that the property is not being seen as a list of anything. We are currently using Umbraco 6.0.2.
Our old code:
@if (Model.HasValue("gallery")) {
try
{
dynamic mediaItems = Model.gallery.mediaItem;
var count = 0;
if (mediaItems.Count() != 0)
{
@:<div class="mediaGallery">
foreach (var item in mediaItems)
{
var image = item.Image;
if (count == 0) {
<a class="group1" href="@image.umbracoFile" title="@image.nodeName"><img src="@image.umbracoFile"></a>
<div class="galleryInstruc">
Click to see the gallery
</div>
} else {
<div style="display:none;">
<a class="group1" href="@image.umbracoFile" title="@image.nodeName">@image.nodeName</a>
</div>
}
count++;
}
@:</div> <!-- mediaGallery -->
}
}
catch(Exception ex)
{
throw ex;
}
}
Now, we get an error that says 'umbraco.MacroEngines.PropertyResult' does not contain a definition for 'MediaItem' . The gallery property is a DAMP datatype
We have attempted going about it in a multitude of different ways but to no avail. Advice?
Thanks in advance and sorry if my formatting is poor.
If it helps, the DAMP object appears to be just a String object and the image file paths, etc are outputted on screen in plain text using @Model.gallery .
Did you also upgrade from an older Umbraco version to 6.0.2? It seems this issue is fixed in the nightly, but not in 6.0.2: http://issues.umbraco.org/issue/U4-1824
I think that's the problem you're having.
Jeroen
That was indeed the problem. Thanks so much!
I have the same problem, but on 4.11.10
There's no newer 4.x version to upgrade to, and upgrading to 6 isn't an option at this stage.
What to do?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.