|
![Picture of dexus Picture of dexus](/graphics/unknown.gif) dexus - 2007-06-19 06:56:37
Dear Mr. Lemos,
let me first thank you a thousand times for your magnificent work.
I'm a big fan of this class, which helps me alot in my daily work.
Unfortunatly sometimes "things happen" which i cannot explain.
Because i don't know where and why these things happen, i do not suggest that the class has an error. i just want to ask you if you can have a look and maybe can help.
I use Smarty as a template engine, which is ok with the class, as far as i know.
My forms are not very small, usually 10 - 20 input fields.
In rare cases the tags behind a input field, usually closing tags or simple br's are not generated in html.
E.g. Smarty Template
<div>{input name="btndelete"}</div><br/>
{foreach name=hfields key=fieldid item=field from=$hiddenfields}{input name=$field}{/foreach}
in the compiled template everything is ok.
but in the html the </div><br/> disappear.
if i put the closing tags behind the loop everything is fine too.
Can you please give me a hint, how a can find what is causing this ?
Thank you very much.
Best regards
dexus
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-06-19 21:31:07 - In reply to message 1 from dexus
This is hard to tell. I need a minimal example script and template that I can use to reproduce the problem and see if it is a bug in the Smarty plug-in.
![Picture of dexus Picture of dexus](/graphics/unknown.gif) dexus - 2007-06-20 11:48:59 - In reply to message 2 from Manuel Lemos
i've send testfiles to your contact email.
Many thanks again.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-06-20 22:31:55 - In reply to message 3 from dexus
I tried it here and it seems to work as expected as you may see below.
I used Smarty 2.6.16 . Which Smarty and PHP version are you using? Are you using any PHP optimizer extension?
<html>
<body>
<form method="post" action="" name="frminput">
<div>TITLE</div>
<div>SUBTITLE</div>
<div id='divuntertabs'>
<div style="position:absolute; right:10px;"><input type="submit" value="delete" id="btndeletevadr" /> </div><!--closing div tag expected here -->
<input type="hidden" name="doit" value="1" /><input type="hidden" name="timemarker" value="1182378275" /> <p>closing div tag expected before hiddenfields</p>
<br>
<br>
<input type="submit" value="save button should be left aligned" id="btnsave" /></div> </form>
</body>
</html>
![Picture of dexus Picture of dexus](/graphics/unknown.gif) dexus - 2007-06-21 07:03:31 - In reply to message 4 from Manuel Lemos
Hi,
this is what i have expected.
i'm using Smarty 2.6.18 now, but the error has happend on an older version(2.6.15) too.
php version is 5.2.0
we use no optimizer, just a plain XAMPP installation, as a development server.
maybe it is time to change the platform.
Thanks alot for your help.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-06-21 08:48:07 - In reply to message 5 from dexus
I tried it now exactly with PHP 5.2.0 and Smarty 2.6.18 and it also worked as expected.
The problem that you described seemed to be caused by bugs in some extension that "optimizes" compiled PHP scripts, like Zend Optimizer, APC, Turck MMCache, eAccelerator, etc...
You may want to double check if you do not have any of such extensions installed without knowing.
You may also want to try cleaning Smarty caches.
![Picture of dexus Picture of dexus](/graphics/unknown.gif) dexus - 2007-06-22 06:09:17 - In reply to message 6 from Manuel Lemos
Again, thanks alot for your continous help.
I've checked the phpinfo() output if there is any optimizer and have not found one. But myabe there is one which does not output in phpinfo().
I also tried the script on another machine with self compiled php 5.2.1.
There is no sign of an optimizer in phpinfo too.
The script fails there too.
It seems it has something to do with our configurations,
i can live with that. Usually i can change the template in a way that the error does not happen.
best regards
dexus
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-06-22 07:13:53 - In reply to message 7 from dexus
That is odd. Anyway, you may want to mail me your php.ini file so I can to reproduce the problem closer.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-06-28 05:12:11 - In reply to message 8 from Manuel Lemos
I tried your php.ini file and it still works as expected.
Maybe you are using an old version of the class that had bugs. Are you using the latest version of the forms class files?
![Picture of dexus Picture of dexus](/graphics/unknown.gif) dexus - 2007-06-28 07:43:46 - In reply to message 9 from Manuel Lemos
Thanks alot for your continuous testing work.
I have tested it with the versions "v 1.287 2007/06/02" (which is the newest i think) and "v 1.270 2006/12/20" with the same wrong result.
Maybe we will find a way that you can reproduce the error.
thanks again.
|