1

Just found a super strange bug which is breaking a basic Matrix conditional.

The conditional is:

{if caption != ''}

And if the caption is this:

Gérard Depardieu in the role of the title Rasputin, dir. by Irakli Kvirkadze (2013) this year's closing film

an error is caused:

Message: Invalid EE Conditional Variable: {if "Gérard Depardieu in the role of the "Lights, camera, inaction: is Moscow International Film Festival doomed to mediocrity?" Rasputin, dir. by Irakli Kvirkadze (2013) this year's clo" != ''}

Because the word "title" is missing from the error, it looks like EE is trying to parse it.

What causes this and what is the fix?


Just an update - using Matrix 2.5.5, and EE 2.5.5.

3
  • Did you try removing title from the caption to see if the error persists? Also, try removing all quotes from your caption for good measure. Jun 26, 2013 at 10:55
  • @JérômeCoupé yes I did remove it; that's how I know that's the bug. :-) There is no way I can tell my clent that they can't use "title" or quotes on their captions...
    – Daniel
    Jun 27, 2013 at 12:02
  • Have you tried {if "{caption}" != ''} Jun 28, 2013 at 15:20

1 Answer 1

2

Have you tried adding var_prefix to the matix loop?

eg: {matrix_field var_prefix="var"}{if var:caption!=""}{matrix_field}

This should escape it. Hope it helps.

1
  • I have tried this and it doesn't work. The error persists.
    – Daniel
    Jun 28, 2013 at 10:37

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .