2

I'm experiencing a confusing problem that I've narrowed down to a custom status.

I have a status for a channel with the following options:

  1. Open
  2. Close
  3. Spec
  4. Sold

I can save an entry in this channel just fine for all statuses except for "Sold". When I save an entry with a status of Sold I get this error in the CP:

Error

You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Invalid Condition: Not enough operands for operator ” != “.

In on line 68

Notice how the error doesn't tell me which template contains the problem.

Further, if I change the status of Sold to a lower case S as in "sold", then it works correctly and I can save the entry without getting the error.

I should also say, even though I get the error, the entry is in fact saved. I don't get any PHP errors.

To make this even stranger, I'm using MSM and I only get this error on the default site, not the other two which use the same templates and statuses. This makes me suspect the error message isn't accurate.

I'm using EE2.10.1. Thanks for you help in advance.

2
  • The only thing that sticks out to me is the upper-case "S" in both statuses, which apparently must be unique for your code. You are not, by any chance, truncating your status somehow, somewhere to a single letter and comparing that? This would also explain, why s != S since they are different letters. Or perhaps some custom code, like an extension?
    – Ingmar
    Dec 22, 2015 at 17:29
  • Not, I'm not truncating the status in a conditional. It's also curious that I'm getting a template error saving the entry in the CP. I could understand if I was viewing the template on the front end, but not in the CP. Unless, when you save an entry, it runs the template in the background. If the error actually told me what template it was referring to that would narrow it down.
    – Stephen
    Dec 22, 2015 at 17:34

1 Answer 1

0

I didn't get a complete fix for this problem, but I figured out a work around. Basically, I changed my status to a lower case "sold" and then changed this in the database for all entries with this status. Doing this eliminated the error.

I doesn't answer the question of why an uppercase S was causing this error, but I at least got it working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.