{foreach $array as $thing}
{def $child=fetch('somethingorther')
...
{/foreach}
If you are using {def} inside a loop, that'll probably be the cause of the second warning at least. You should use {set} in cases like that where you are redefining an already-set variable.
Another possibility is that the template you're calling within the foreach loop also defines a variable $child. The included template opens in the scope of the calling template which means you can't reuse a variable name.
Yes, of course it does. It's a recursive call via node_view_gui. But surely {foreach} should handle recursive calls? There was a bug report, because it didn't, but that has been reported as fixed. That's why I asked in the first place.
Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at
The timeframe indeed suggests 3.9.1rc1 should contain the fix, but I'm seeing dark clouds packing above this one. I'm not familiar with this issue and I don't know the scope of it, but would you mind running your failing template with template compile enabled? Does it still fail in that case (but don't trust 1st run as that is the compiling run)?
It would seem that things do work, so my question was more like "Why do I get these warnings?" Although it would appear to me that my syntax was correct, I could be mistaken.
Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at
I have a simmilar warnings, my code is something like this:
{foreach $array_vars as $var}
.................................
{foreach $variables as $Index=>$Variable}
.................................
{/foreach}
................................. {/foreach}
and then the warnings are
Warning: eZTemplate:foreach May 08 2007 10:45:25 Variable 'Variable' already exists.
Warning: eZTemplate:foreach May 08 2007 10:45:25 Variable 'Index' already exists.
I suppose it's because the cycle is in a cycle and for each outer iteration the inner cycle variables are again used..... Is there any way to get that around? I mean, the template IS WORKING, but can i get it absolutelly warning free?