Hi,
please check:
Fatal error: Uncaught --> Smarty: Unable to load template file '' <-- thrown in /srv/www/deimeke.net/dirk/blog/bundled-libs/Smarty/libs/sysplugins/smarty_internal_template.php on line 219
Cheers
Dirk
Menuitem Spamblock (Bayes): Smarty error with recent beta1
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
Hi Dirk
that's the beta, or the current git master?
that's the beta, or the current git master?
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
Sorry, it is the master branch ...onli wrote:that's the beta, or the current git master?
Cheers
Dirk
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
I saw your other report later and realized that ;)
So, this is also related to https://github.com/s9y/Serendipity/comm ... e05b843419, but I think it also discovers a bug in renderTemplate of the plugin api. Bayes has a function called smarty_show, which relied on that weird behavior of getTemplateFile to return the path of files not found, but only when their ending is .tpl,.css or .php. In this case it is a tpl file. Now, getTemplateFile reliably returns nothing if it finds nothing, breaking that function.
The renderTemplate function the plugin should've used already properly reacts when getTemplateFile returns nothing. But it always works with the basename of the path to the template file, which makes it impossible to target templates like admin/bayesNavigation.tpl. I'll fix that in the core and push an update for bayes – *edit:* I decided to not change that in the core and only fix it in the plugin. The restriction gives no security benefit, but makes it easier for themes to override plugin templates, which is a plus.
I tested a few other plugins and they worked, but it is possible this will need to be fixed in other plugins as well.
So, this is also related to https://github.com/s9y/Serendipity/comm ... e05b843419, but I think it also discovers a bug in renderTemplate of the plugin api. Bayes has a function called smarty_show, which relied on that weird behavior of getTemplateFile to return the path of files not found, but only when their ending is .tpl,.css or .php. In this case it is a tpl file. Now, getTemplateFile reliably returns nothing if it finds nothing, breaking that function.
The renderTemplate function the plugin should've used already properly reacts when getTemplateFile returns nothing. But it always works with the basename of the path to the template file, which makes it impossible to target templates like admin/bayesNavigation.tpl. I'll fix that in the core and push an update for bayes – *edit:* I decided to not change that in the core and only fix it in the plugin. The restriction gives no security benefit, but makes it easier for themes to override plugin templates, which is a plus.
I tested a few other plugins and they worked, but it is possible this will need to be fixed in other plugins as well.
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
Version 0.4.22 should fix that error, while continue to work in older s9y versions. Commit: https://github.com/s9y/additional_plugi ... 9cd6e6bbf4
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
I will try once it is on Spartacus.onli wrote:Version 0.4.22 should fix that error, while continue to work in older s9y versions. Commit: https://github.com/s9y/additional_plugi ... 9cd6e6bbf4
Cheers
Dirk
-
- Regular
- Posts: 764
- Joined: Fri Aug 12, 2005 4:36 pm
- Location: Grüt, Zürich, Switzerland
- Contact:
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
Works again.Lux wrote:I will try once it is on Spartacus.onli wrote:Version 0.4.22 should fix that error, while continue to work in older s9y versions. Commit: https://github.com/s9y/additional_plugi ... 9cd6e6bbf4
Issue closed.
Cheers
Dirk
Re: Menuitem Spamblock (Bayes): Smarty error with recent bet
Thanks for the report :)