
Upgrade: update Smarty library to 3.x
Reported by dleffler | July 30th, 2011 @ 10:17 AM | in 2.0.2 (closed)
We currently use 2.6.x. @tt, v.3.0.8 is stable with 3.1 prepping for release. 3.0.x should be a drop-in replacement, but may break some poorly formatted smarty code (e.g., 3.x doesn't allow whitespace around curly brackets {foo] is good, [ foo ] is bad; however this adds the auto-{literal} feature)
Comments and changes to this ticket
-
dleffler July 31st, 2011 @ 05:56 PM
Though there is an implication this should be a 'drop-in' replacement/upgred, it bombs the test sites to a white screen (not debugged or traced for specifics). Furthermore, Smarty v3.1 removes some of the 2.x glue which should've made it a drop-in replacement.
This is probably a task to be included with the migration of the 'subsystems/template.php' to expTemplate.php project.
Also should include a decision about the 'final' resting plasce for the Smarty 'plugins' folder, which would probably shouldn't be just off the root folder.
-
dleffler July 31st, 2011 @ 06:34 PM
Split out the recommendation to move the plugins folder to ticket #275. It wouldn't have to wait for Smarty 3.x
-
-
dleffler September 20th, 2011 @ 01:49 PM
- State changed from new to open
- Assigned user set to dleffler
I have a local copy running w/ Smarty 3.0.9...couple of notes (to myself) regarding undocumented issues when migrating from v2 to v3
- When updating/changing Smarty versions or plugins, you MUST ALWAYS clear the smarty cache
- $smarty->_tpl_vars was deprecated without notice, we MUST use the getTemplateVars() method instead
- Smarty v2 disabled error reporting in templates, not so under v3 therefore there are TONS of warnings (missing indexes, etc...) with our plugins and templates. A partial interim solution is to turn off error reporting after creating the Smarty object
- Smarty v3 allows expressions or variable references almost anywhere, and (apparently) isn't very tolerant of the backticks required to perform this in v2 (though this shouldn't be the case according to the documentation)...we use a lot of backticks for variables inside of plugin calls in templates
It's not as easy to upgrade to 3.1.x since built-in v2 compatibility is replaced by a compatability class (easy enough).
THEREFORE, I think I'll first upgradge through 3.0.9 and work on cleaning up our plugins, then move to 3.1.x
-
dleffler September 20th, 2011 @ 02:26 PM
We MUST explicitly set the system plugins folder (Smarty/lib/plugins) in addition to our plugins folder.
-
dleffler September 20th, 2011 @ 08:24 PM
Another note:
- because of the better parsing, some of the formerly unescaped characters in template strings will break smarty. The fix is to escape them by adding a backslash before
-
dleffler September 20th, 2011 @ 08:25 PM
We MUST also enclose filesnames containing a period inside quotes now.
-
dleffler September 20th, 2011 @ 10:47 PM
More Notes:
- actually, the way to get template variables in Smarty v3 is to use the getTemplateVars() call, otherwise you get a storage information which contains a 'value' object...which is what we want...let's make Smarty work for us!
-
dleffler September 21st, 2011 @ 12:27 PM
Notes:
- Also concatenate of variables in strings used to work with
$variable
test which must now use the 'cat' modifier such as $variable|cat:'text'- used more in filenames $smarty.const.ICON_RELATIVE|cat:'clean.png'
- Also concatenate of variables in strings used to work with
-
dleffler September 23rd, 2011 @ 01:11 AM
- Milestone set to 2.0.2
- Milestone order changed from 80 to 0
-
dleffler September 24th, 2011 @ 08:59 PM
- Title changed from Investigate updating Smarty library to 3.x to Upgrade: update Smarty library to 3.x
-
dleffler September 27th, 2011 @ 06:17 PM
The bug in Smarty 3.1.x that was causing problems has been fixed in their SVN, so we should be able to go to Smarty v3.1.2 for Exponent 2.0.2
-
dleffler September 28th, 2011 @ 02:34 AM
FWIW, switched my local test version to NOT use v2 backwards campatibility and it works, so we will be v3 compliant from initial implementation (instead of having to work through the 2.x compatibility layer)
-
dleffler September 30th, 2011 @ 04:11 PM
This has been pushed to the feature/smarty3 branch on github. We'll play with it for a few days to see what else may need to be tweaked before merging into develop for the 2.0.2 release.
-
-
expNinja October 11th, 2011 @ 06:21 PM
(from [b132f3e6a3d153bb545ac229d6bb89c5dce0d93f]) 1st step to rename class file to lower case [#264] https://github.com/exponentcms/exponent-cms/commit/b132f3e6a3d153bb...
-
expNinja October 11th, 2011 @ 06:21 PM
(from [574b72c9f1cf37a8b37d8d95189d156a34e8a6c1]) 2nd step to rename class file to lower case [#264] https://github.com/exponentcms/exponent-cms/commit/574b72c9f1cf37a8...
-
expNinja October 14th, 2011 @ 10:43 PM
(from [381ff7c8e3417af95825bdca7c4ef6d18bba1476]) Additional edits to correctly concatenate strings for Smarty v3 [#264] https://github.com/exponentcms/exponent-cms/commit/381ff7c8e3417af9...
-
dleffler October 17th, 2011 @ 08:33 PM
- State changed from open to resolved
feature/smarty3 branch merged into develop branch
-
dleffler May 4th, 2012 @ 12:00 PM
- Tag changed from 3rd party, external, library, smarty to 3rd party, 3rd, external, library, party, smarty
- Milestone order changed from 2 to 0
-
-
-
dleffler May 4th, 2012 @ 12:04 PM
- Tag changed from 3rd party, 3rd, external, library, party, smarty to 3rd party, external, library, party, smarty
-
dleffler May 4th, 2012 @ 12:04 PM
- Tag changed from 3rd party, external, library, party, smarty to 3rd party, external, library, smarty
-
dleffler May 4th, 2012 @ 12:05 PM
- Tag changed from 3rd party, external, library, smarty to 3rd party, external, smarty
-
dleffler May 8th, 2012 @ 03:22 AM
- Tag changed from 3rd party, external, smarty to 3rd party library, external, smarty
-
dleffler May 8th, 2012 @ 03:23 AM
- Tag changed from 3rd party library, external, smarty to 3rd party library, smarty
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS