Invenzzia »

IMPORTANT ANNOUNCEMENT

Due to the uncertain status of the Flyspray project, lack of new releases and moving the code repository to Github, we decided to shutdown this issue tracker by the end of January 2011. From that date, the bugs should be reported directly in Github project repositories.

List of repositories:

Open Power Template 2.x family

PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!

Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
Tasklist

FS#81 - opt:tree - additional endings of tags

Attached to Project: Open Power Template
Opened by Anonymous Submitter - Wednesday, 22 April 2009, 10:13 GMT-8
Last edited by Zyx (Zyx) - Monday, 27 April 2009, 00:54 GMT-8
Task Type Bug Report
Category Compiler
Status Closed
Assigned To Zyx (Zyx)
Operating System OS-independent
Severity Medium
Priority Normal
Reported Version 2.0 SVN
Due in Version 2.0-RC1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

output generated by below snippet using data in $menu variable is incorrect! there are additional tag endings


<opt:snippet name="top_menu">
<opt:show name="menu">
<opt:tree>
<opt:list>
<ul><opt:attribute name="id" value="nav" opt:if="$menu.depth == 1" />
<opt:content/>
</ul>
</opt:list>
<opt:node>
<li><opt:attribute name="class" value="selected" opt:if="$menu.active == 'on'" />
<a parse:href="$opt.const.WEBROOT~$menu.link"><opt:attribute name="class" value="selected" opt:if="$menu.active == 'on'" />
{$menu.name}
</a>
<opt:content />
</li>
</opt:node>
</opt:tree>
</opt:show>
</opt:snippet>



$menu = array ( 0 => array ( 'active' => 'off', 'depth' => 1, 'class' => 'menu1off', 'link' => 'idm,4,o-firmie.html', 'name' => 'O nas', 'pidm' => '0', 'idm' => '1', 'locked' => '0', 'submenu' => 'on', ), 1 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,4,o-firmie.html', 'name' => 'O firmie', 'pidm' => '1', 'idm' => '4', 'locked' => '0', 'submenu' => 'on', ), 2 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,6,akcjonariat.html', 'name' => 'Akcjonariat', 'pidm' => '1', 'idm' => '6', 'locked' => '0', ), 3 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,7,wladze-spolki.html', 'name' => 'Władze spółki', 'pidm' => '1', 'idm' => '7', 'locked' => '0', ), 4 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,10,struktura-organizacyjna.html', 'name' => 'Struktura organizacyjna', 'pidm' => '1', 'idm' => '10', 'locked' => '0', ), 5 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,11,grupa-kapitalowa-zak.html', 'name' => 'Grupa kapitałowa ZAK', 'pidm' => '1', 'idm' => '11', 'locked' => '0', 'submenu' => 'on', ), 6 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,12,wspolpraca.html', 'name' => 'Współpraca', 'pidm' => '1', 'idm' => '12', 'locked' => '0', ), 7 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,13,historia.html', 'name' => 'Historia', 'pidm' => '1', 'idm' => '13', 'locked' => '0', ), 8 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,14,prestiz-i-uznanie.html', 'name' => 'Prestiż i uznanie', 'pidm' => '1', 'idm' => '14', 'locked' => '0', ), 9 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,15,galeria-zdjec.html', 'name' => 'Galeria zdjęć', 'pidm' => '1', 'idm' => '15', 'locked' => '0', ), 10 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,16,raport-roczny.html', 'name' => 'Raport roczny', 'pidm' => '1', 'idm' => '16', 'locked' => '0', ), 11 => array ( 'active' => 'on', 'depth' => 1, 'class' => 'menu1on', 'link' => 'idm,2,oferta.html', 'name' => 'Oferta', 'pidm' => '0', 'idm' => '2', 'locked' => '0', 'submenu' => 'on', ), 12 => array ( 'active' => 'on', 'depth' => 2, 'class' => 'menu2on', 'link' => 'idm,28,produkty.html', 'name' => 'Produkty', 'pidm' => '2', 'idm' => '28', 'locked' => '0', 'submenu' => 'on', ), 13 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,29,uslugi.html', 'name' => 'Usługi', 'pidm' => '2', 'idm' => '29', 'locked' => '0', ), 14 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,30,surowce.html', 'name' => 'Surowce', 'pidm' => '2', 'idm' => '30', 'locked' => '0', ), 15 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,31,oferta-dla-inwestorow.html', 'name' => 'Oferta dla inwestorów', 'pidm' => '2', 'idm' => '31', 'locked' => '0', ), 16 => array ( 'active' => 'off', 'depth' => 2, 'class' => 'menu2off', 'link' => 'idm,32,przetargi.html', 'name' => 'Przetargi', 'pidm' => '2', 'idm' => '32', 'locked' => '0', ), 17 => array ( 'active' => 'off', 'depth' => 1, 'class' => 'menu1off', 'link' => 'idm,3,centrum-prasowe.html', 'name' => 'Centrum prasowe', 'pidm' => '0', 'idm' => '3', 'locked' => '0', ), 18 => array ( 'active' => 'off', 'depth' => 1, 'class' => 'menu1off', 'link' => 'idm,5,relacje-inwestorskie.html', 'name' => 'Relacje inwestorskie', 'pidm' => '0', 'idm' => '5', 'locked' => '0', ), 19 => array ( 'active' => 'off', 'depth' => 1, 'class' => 'menu1off', 'link' => 'idm,9,kontakt.html', 'name' => 'Kontakt', 'pidm' => '0', 'idm' => '9', 'locked' => '0', ), );
This task depends upon

Closed by  Zyx (Zyx)
Monday, 27 April 2009, 00:54 GMT-8
Reason for closing:  Fixed
Additional comments about closing:  Fixed in rev. 90
Comment by Zyx (Zyx) - Saturday, 25 April 2009, 00:12 GMT-8
The problem lies in the depth enumeration in the input data, which should start from 0, not from 1. OPT generates a valid code then. However, you're right that OPT should check for such cases and generate a kind of message for the template designer, so I keep this bug open. The purpose is to improve input data error resistance in opt:tree.

Loading...