Skip to content
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

Regression in 3.1.28 - Unable to load template file #121

Closed
remicollet opened this issue Dec 14, 2015 · 5 comments
Closed

Regression in 3.1.28 - Unable to load template file #121

remicollet opened this issue Dec 14, 2015 · 5 comments

Comments

@remicollet
Copy link

Updating from 3.1.27 to 3.1.28

 PHP Fatal error:  Uncaught  --> Smarty: Unable to load template file 'index.tpl' <-- \n  thrown in /usr/share/php/Smarty/sysplugins/smarty_internal_template.php on line 139
@remicollet remicollet changed the title Regression in 3.1.28 Regression in 3.1.28 - Unable to load template file Dec 14, 2015
@uwetews
Copy link
Contributor

uwetews commented Dec 15, 2015

The template file could not be found.
Did you extend the Smarty class and over load the Smarty::$template_dir property instead using the
Smarty::setTemplateDir() method?

@remicollet
Copy link
Author

Did you extend the Smarty class and over load the Smarty::$template_dir property instead using the
Yes

I fix it with https://github.com/remicollet/rpmphp/commit/1be373d489817ff91e077c97ac91779ebc1c8e22

@blaaat
Copy link

blaaat commented Dec 15, 2015

http://www.smarty.net/docs/en/variable.template.dir.tpl
As of Smarty 3.1 the attribute $template_dir is no longer accessible directly. Use getTemplateDir(), setTemplateDir() and addTemplateDir() instead.

Wouldn't it be a great idea to make this variable inaccessible, so a proper error message is displayed?

@remicollet
Copy link
Author

Wouldn't it be a great idea to make this variable inaccessible, so a proper error message is displayed?

+1

BTW, such change/break in minor version seems bad. Please http://semver.org/

uwetews added a commit that referenced this issue Dec 16, 2015
@uwetews
Copy link
Contributor

uwetews commented Dec 16, 2015

It was a bug. Setting $smarty->template_dir directly should have called setTemplateDir() internally..

The fix is in the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants