Wes has sent me a PM which quite clarifies what has apparently been going on with this topic, 9 months after the bug report from Rob Sanchez was declared ‘not a bug’ and not discussed, to the surprise of many of us.
The good news is that it suggests an even easier fix is possible for EE, finally removing the JavaScript/JSON stripping which has surprised so many capable upgraders.
Wes indicated in the prior thread that the Agile demo used the unpublicized abilities of EE for blanking variables that might not be present. He’s given me a template code sample where indeed this is done - questionable territory indeed, among other cuteness and messiness of the Agile demo in any but the coder’s editor, but let’s skip over that.
The key is that we are still talking about variables that are known to EE, because they are fields in the channel/s named for the surrounding EE tag.
These known variables can be placed on a list with a single simple SQL query within the template parser. This list can then be checked to qualify any apparently unparsed variable names, and no output given if they are on the list, just as no output is given for empty known variables.
This will solve the entire ‘legacy’ variable-fiddling problem as it seems to be, and allow EE to run at least as efficiently if not more so, because the regex code that now internally compiles a parser, searches for, and zaps curly-bracket-enclosed items can and will then be removed entirely.
The most important point is that developer-intended curly-bracket-enclosed items, such as JavaScript and JSON constructs, will then no longer be interfered with. Upgraded sites will not turn up mysteriously broken.
I must note that we could have had this solution in an hour, nine months ago.
There’s one more actual template parser bug which Bjørn’s conversation has recently led Wes to clarifying from the others, which can be fixed at the same time and it looks by the same means.
I will state again for the record that no actual enterprise customer is going to stand for the kind of thing that this long journey has been.
I’ve understood I think many of the factors deeply behind Ellis behaviour, and put a good deal of effort in to help, to tide over, to fill in, to quietly suggest persons to open eyes and ears and give responses needed. Others have just as much. We’ve all had about the same response; not entirely hard to reckon, but needing to be grown out of, finally.
I know Ellis has and can get all the abilities needed to do better; can properly change mind. To paraphrase somebody or other, ‘Yes, you can.’
Any errors there may be above, after all the twists this has gone for the year, due this author. Note also that Bjørn also suggested EE not fiddle with curly-bracketed code.
Regards, Clive
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.