Complete template recompilation fails, when not all modules are installed on 5.2.0-RC1

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Jun 28, 2012, 6:16:28 AM6/28/12
to In-Portal Bugs
In-Portal uses templates (*.tpl files) to separate business logic from website design.
When first time accesses a TPL file is compiled into PHP file and then only PHP file is used. This gives amazing performance boost.

We are all humans and we can use undefined In-Portal tag or just use In-Portal block tag in wrong way in a template. Under normal conditions the error will only be visible, when template is accessed by end user.
But if multiple changes are made and developer haven't property tested them this could result in blank page on customer website, which isn't good.

To solve this problem we've added "Recompile Templates" functionality in "System Tools" section in Admin Console. This function basically gathers all templates from Admin Console plus all templates from enabled Front-End themes and runs syntax check on them.
If errors were found, then they are displayed all together in a nice report table at the end of a process.

This worked nicely from time, when it was developed (before In-Portal 5.0.0 version release), but in 5.2.0-RC1 we've made some changes related to error handling and this affected "Recompile Templates" functionality badly.
Now if you have tags in theme, that belongs to a module, that you haven't installed (e.g. download all, but In-Commerce module + "advanced" theme, which has In-Commerce tags in it) then you'll get Fatal Error in the middle of the recompile process.



Ready for testing.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
error_no_template_recompile_fix.patch
Reply all
Reply to author
Forward
0 new messages