A very weird problem, but in a specific channel that has many custom fields I get a very peculiar problem with just one entry (as far as I can tell) where a particular custom field is failing only inside an if
statement. Example:
{if my_custom_field}
{my_custom_field}
{/if}
This causes the entire template to fail, resulting in a white screen. I've switched on every form of debugging (index file and admin area). There are no errors.
If I remove the if
statement and simply output the field, it works fine. If I empty the field it works fine. If the field has only up to ~67 characters in it, it works fine.
Please bear in mind, this is only a problem with this entry; other entries don't experience this issue.
Things I've tried:
- Creating a new entry with the same data
- Rewriting the content of this field by hand (not copy-pasting in case of a malformed character)
- Renaming the custom field
- Adding the same content to a different field
- Reducing the number of
if
statements in the template - Increasing the memory available to PHP
So my question really is: has anyone ever come across this before? Where can I look to solve it?