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#62 - Wrong parse value in component

Attached to Project: Open Power Template
Opened by nediam (nediam) - Sunday, 08 March 2009, 13:41 GMT-7
Last edited by Zyx (Zyx) - Saturday, 04 April 2009, 00:50 GMT-7
Task Type Bug Report
Category Instructions
Status Closed
Assigned To No-one
Operating System OS-independent
Severity Medium
Priority Normal
Reported Version 2.0 SVN
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have snippet like:

<opt:root>
<opt:snippet name="componentLayout">
<com:div>
<p><label parse:for="$sys.component.id">{$sys.component.title}</label></p>
<opt:display />

<opt:onEvent name="error">
<p>An error occured: {$errorMessage}</p>
</opt:onEvent>
</com:div>
</opt:snippet>
</opt:root>

and I'm useing it like that:

<opt:Input template="componentLayout" name="login" datasource="$fieldData" />
<opt:Input template="componentLayout" name="password" datasource="$fieldData" />

it should return:

<div>
<p><label for="login_id"></label></p>
<input name="login" id="login_id" type="text" />
</div>
<div>
<p><label for="password_id"></label></p>
<input name="password" id="password_id" type="text" />
</div>

but it dosn't :(
it returns wrong id in second "for" attribute:

<div>
<p><label for="login_id"></label></p>
<input name="login" id="login_id" type="text" />
</div>
<div>
<p><label for="login_id"></label></p>
<input name="password" id="password_id" type="text" />
</div>

This task depends upon

Closed by  Zyx (Zyx)
Saturday, 04 April 2009, 00:50 GMT-7
Reason for closing:  Fixed
Additional comments about closing:  Fixed in rev. 72
Comment by Zyx (Zyx) - Monday, 09 March 2009, 00:28 GMT-7
Are you sure that the problem does not lie in your implementation of Opt_Component_Interface?
Comment by nediam (nediam) - Monday, 09 March 2009, 03:12 GMT-7
My implementation is almost copy-paste from the documentation + guestbook example
Comment by Zyx (Zyx) - Monday, 09 March 2009, 13:44 GMT-7
Well, the guestbook example is not completed yet (it wasn't even runned yet). I'd say that the problem lies in your code, because I'm using more than one component in the same template that uses parameters and it works, however I'll check it in the free time. For now, I'll keep it as "unconfirmed". Maybe someone will be able to reproduce this?
Comment by Jacek Jędrzejewski (eXtreme) - Tuesday, 10 March 2009, 06:30 GMT-7
Maybe attach the code of your component.
Comment by nediam (nediam) - Wednesday, 25 March 2009, 07:48 GMT-7
  • Field changed: Percent Complete (100% → 0%)
I want to attach some code for example of this bug without adding new bug request.
Comment by nediam (nediam) - Wednesday, 25 March 2009, 11:32 GMT-7
To present this bug we can use select component example from SVN ( dev/components.php , dev/test_components_2.php and dev/templates/test_components_2.tpl ).

Just in file test_components_2.tpl replace:
<p>{$opt.component.title}: <opt:display /></p>
to:
<p><span parse:title="$opt.component.title">{$opt.component.title}:</span> <opt:display /></p>

it returns:
<p><span title="List 1">List 1:</span> <select title="List 1" ...
<p><span title="List 1">List 2:</span> <select title="List 2"...

Loading...