Friday 07 March 2008 1:34:22 am
In EZ publish 4.0 I have stumbled upon a strange error when fetching a multi class front page folder. I currently use this code to fetch a video section on the front page.
{def $video1=fetch( content, tree, hash( parent_node_id, 2,
limit, 1,
sort_by, array( published, false() ),
'class_filter_array', array( 37 ),
) )}
{foreach $video1 as $vid1}
<div class="video1">
<div class="child">
<a href={$vid1.data_map.url.content|ezurl()}>
{attribute_view_gui attribute=$vid1.data_map.image image_class=videoremote}
{$vid1.name|wash}
</a>
</div>
</div>
{/foreach}
{undef $video1}
The code works, but when I publish a article and the front page is updated the video sections not longer works.
Output No relation + Name of article (should not be there, since it’s not supposed to be fetch!!!) When I clear all the case the problem remains, but when I publish a new video the section works again. In my page I mainly use let not def, is this a likely cause of the problem or is it a bug?
|