modxbot / migrate

A testground for migrating issues and other such fun
0 stars 0 forks source link

nested if-then-else output filters (and gallery): errors and strange behavior #7638

Open frischnetz opened 12 years ago

frischnetz commented 12 years ago

frischnetz created Redmine issue ID 7638

Putting content-tag in an if-then-else-statement, using gallery inside the content with templates that itself use itself if-then-else-cases lead to wrong output:

Testcase:

My Template:



[[++site_name]] - [[*pagetitle]]




  

content inside an if-the-else-output-filter:

[[*introtext:isnot=``:then=`[[*introtext]]`:else=`[[*content]]`]]

content without

[[*content]]

My resource:

[[Gallery? &album=`1` &thumbTpl=`testthumb_tpl` ]]

(Install gallery 1.5.0rc1 and put some images inside gallery 1)

My chunk testthumb_tpl:


Output of both instances of

[[*content]]
should be identical, but is not. It is indeed broken: there's a spurious
`]]">
inside the output.



Testpage





  

inside if-the-else:

`]]"> IMG_5638_1_1000.jpg

outside:

IMG_5578_1_1000.jpg
IMG_5638_1_1000.jpg

I encountered problems with nested if-then-else-output filters before but usually they can be fixed by making sure not to leave out any else-statements. This one is different: all else-statements are supplied.

XoD commented 12 years ago

xod submitted:

Not sure if this helps, but try :isnotempty instead of :isnot=``, I have similar setups (not identical) and there it seems to work...