1

asked this on stackoverflow before realizing there was a stackexchange site for expression engine, hope nobody minds i'm copying my question to here.

i am modifying an expression engine channel entry, there are a number of fields for this channel in a group and two are grids. in the template, i have loops that go through the rows in the grid and output various fields. this is all working as expected.

i recently wanted to add some content, and when i did my existing loops were no longer parsed, just output

{grid_name0}
    <div>stuff</div>
{/grid_name0}

and any {grid_name0:fieldname} were replaced with empty string/nothing. other tags continued to work correctly, including tags and a grid loop in the new content i added.

after debugging a bit, i discovered that there is a specific amount of text that will break it, i can add a comment to the template like <!-- 01234567890123456789012345678901234567890123456789 --> that when i get to a certain length it will break the page. this seems like maybe a memory limit is being reached before expression engine processes all the content, i checked various areas for memory limits and they seem to be set at reasonable values (and this is a pretty simple/light site), however i suspect there is a limit set somewhere that i am not aware of.

this is on expression engine 2.7.2 with php 5.2.17, i can provide additional details from phpinfo if desired but the php memory_limit is set to 512M (which, frankly, seems like way overkill).

possibly related, but one of the things i was adding is an "advanced" condition with an {if:else}, if i have this present but less text than is required to break the page it will also break in the exact same way.

thanks in advance for any help!

2
  • Keep in mind that an 'if:else' instruction might slowdown your site because both queries by the if and the else are executed. Also if one of the conditions is't matched. You should use switchee for beter performance. devot-ee.com/add-ons/switchee – Timo002 Dec 23 '14 at 0:06
  • thanks for that info, performance isn't really a concern here as the site is pretty minimal anyway and there isn't much in the if/else, but i might give switchee a try just to see if it magically solves the issue. ok, maybe bandages the issue is more accurate, as i still would like a definitive fix. – jay Dec 23 '14 at 16:10
1

huge thanks to ellis labs support, they pointed me to increasing the pcre.backtrack_limit beyond the default 100000 and it now processes all the tags. in retrospect i should have checked that sooner, but run into issues with it so infrequently it never crossed my mind.

edit system/expressionengine/config/config.php and add this just after the initial line (or set in php.ini):

ini_set('pcre.backtrack_limit', 100000000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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