Bug in 3.6.3?

Author Message

Pål Messenlien

Monday 31 October 2005 9:37:23 am

I upgraded to 3.6.3 from 3.6.2 today. After the update my treemenu wont function. When ive digged a litle in the code it seems that some of my if ( is_set settings is what makes the trouble. The full code for my meny look like this.

{def $meny_topnode=2}
	{if is_set($module_result.node_id)}
		{set $meny_topnode=$module_result.node_id}
	{/if}
	
<ul class="venstre">
{def $docs=treemenu( $module_result.path, $module_result.node_id,
                                     array('folder','lenke','iframe','nettside','link'), 0, 3)}
{def $depth=1 $last=0}
 
{foreach $docs as $menu}
	{if and( is_set( $menu.data_map.vis_meny), $menu.data_map.vis_meny.content)}
    {if and($last | ne(0), $last.level|gt($menu.level))}
        </ul>
        </li>
    {/if}
 
    <li>
 
    {if and($last | ne(0), $last.level| lt($menu.level))}
        <ul class="venstre">
        <li>
    {/if}
	
  		{switch match=$menu.class_name}
		 {case match='Lenke'}
				{if and( is_set( $menu.data_map.nyttvindu), $menu.data_map.nyttvindu.content)}
				<a {$menu.is_selected|choose('','class="selected"')}
        		href={$menu.data_map.navn.content} target="_blank">{$menu.text|shorten(25)}</a>
				{else}
		  		<a {$menu.is_selected|choose('','class="selected"')}
        		href={$menu.data_map.navn.content}>{$menu.text|shorten(25)}</a>
				{/if}
		 {/case}
		 {case}
		<a {$menu.is_selected|choose('','class="selected"')}
        href={$menu.url_alias|ezurl}>{$menu.text|shorten(25)}</a>
		 {/case}
		 {/switch}
    </li>
 
    {set last=$menu}
	
{/if}
{/foreach}
 
{while $depth |gt(1)}
    </li>
    </ul>
    {set depth=$depth|sub(1)}
{/while}
</ul>

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

Pål Messenlien

Tuesday 01 November 2005 2:22:50 am

I found we where running on a modified eztreemenuoperator.php to get this menu to function.

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

Kristian Hole

Wednesday 02 November 2005 12:44:51 am

Hi Pål,

Instead of modifing the treemenu, you should make a copy of the operator, and make a new one (called treemenu2 or something) and put it in an extension. That makes it much easier to catch these troubles in the future, and also much easier to upgrade.

Also its a good idea to do the upgradecheck for database and files in the administrator interface (setup->upgrade check)

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.