After running a 2.8.1 - 2.9 (preview 8) install, I can see this message at the end of the process:
Update Notices
The behavior of conditionals in JavaScript has changed.
Checking for templates to review ...
Done.Two things - first, is the notice in fact referring to JavaScript conditionals, or wouldn’t this be the Template conditional changes?
Second, I’m assuming that it didn’t find anything in my templates that was “problematic”, but if it did, would it notify me of what it found, and what I needed to change in my templates? I run version control on my templates saved as files, so anything changed in the database I won’t be aware of.
Just wondering how that mechanism works?
Cheers, John
first, is the notice in fact referring to JavaScript conditionals, or wouldn’t this be the Template conditional changes?
It’s referring to ExpressionEngine conditionals (e.g. {if current_time == …}) within JavaScript. Specifically, we’re changing where protect_javascript is applied (it used to be site-wide, now it’s template-specific) and flipping it’s default (from y to n).
Also, protect_javascript only applied to advanced ExpressionEngine conditionals inside JavaScript (whether it was a Javascript template or a <script> tag within a template), simple conditionals would still be parsed. Given the consolidation from simple vs advanced conditions to “just” conditionals, we needed to treat all conditionals the same and flipped the default so it makes sense given the majority of use cases.
Second, I’m assuming that it didn’t find anything in my templates that was “problematic”, but if it did, would it notify me of what it found, and what I needed to change in my templates? I run version control on my templates saved as files, so anything changed in the database I won’t be aware of.
With these changes, each template now has a protect_javascript setting and we default to n. The updater simply checks to see if we should actually set protect_javascript to y for the particular template and alerts you to that, so there will be no changes to the template’s contents.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.