We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Checking for templates to review

Developer Preview

johndwells's avatar
johndwells
94 posts
11 years ago
johndwells's avatar johndwells

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

       
Wes Baker's avatar
Wes Baker
343 posts
11 years ago
Wes Baker's avatar Wes Baker
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.

       
johndwells's avatar
johndwells
94 posts
11 years ago
johndwells's avatar johndwells

That all makes sense, thanks Wes!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.