-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compileAllTemplates() has problems with block plugins #231
Comments
I could reproduce your problem. I have modified compileAllTemplates() to clear all internal caches for each template to eliminate every chance of side effects from compilation of other templates. |
Sorry I have found out the problem was in an old plugin function.datatable I have in one of the plugin dirs (it is not a block plugin)... Before using compileAllTemplates() I use setPluginsDir() which I though removes all plugins from other packages (each package has it own plugins dir). While it does remove the directories, it does not "unload" any already loaded plugins, so this was the problem. I have renamed the function now and everything works again. However there's a code problem with your latest commit:
|
you must update to the complete dev-master version because of some other internal changes. |
Not sure what you mean by that, my composer.json is |
If I install "smarty/smarty": "dev-master" at my place everything is okay. |
I don't know what's the difference, but I tried it anyway. Deleted "smarty/smarty" from composer.json. Ran "composer update" which removed the smarty folder. Then put it back as "dev-master". Ran update again and the same errors are shown. I've taken a look at line 35 of sysplugins/smarty_internal_method_compilealltemplates.php public function compileAllTemplates(Smarty $dummy, Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0,
$max_errors = null) If I change this to public function compileAllTemplates(Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0,
$max_errors = null) (removed $dummy param) |
the fix is now in the master branch |
@uwetews |
@ophian |
I am using compileAllTemplates() for gettext extraction, but I just found out that it does not work with custom block functions.
While the template works perfectly as expected, the following error is returned when using compileAllTemplates()
Line 79 is {/block}, while the whole layout is like this:
If I remove the {block page_body} wrapper and not use an extends statement (ie. remove inheritance), it still does not work, but the error is different:
Running on dev-master.
Regards
The text was updated successfully, but these errors were encountered: