-
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
After update to version 3.1.28, templates cannot be loaded #134
Comments
Use setTemplateDir() |
I tried $smarty->setTemplateDir(ROOT_DIR . 'templates/'); but same error. |
$template_dir was private already already long time. An direct access to it should internally call setTemplateDir(). This was broken. Does constant ROOT_DIR include a trailing '/' ? Call $smarty->testInstall(); after setTemplateDir() to check the folder setup |
Hi, Thank you for answers. Before i had smarty 3.1.27 and worked with:
Seems that the problem is ROOT_DIR definition. With: "define('ROOT_DIR', 'E:/airway/');" and set methods working. Maybe better if work and with : "define('ROOT_DIR', '/airway/');" Thank's. |
Recheck your example with the updated version in the master branch. It should work now same way as in 3.1.27 |
This also broke my application - using setTemplateDir instead of the template_dir variable fixed it for now. Maybe there should be a bugfix release, because a lot of applications could have the same problems when updating. |
Actually, setTemplateDir does not solve the problem - Smarty then creates the templates_c directory in my root project directory and writes all files in there, the directory I set with setTemplateDir is not used. Smarty also attempts to do the same when setting the template_dir variable (it also creates the template_c directory in project root) but then it does not find its own templates. |
setTemplateDir() does set up the template_dir not compile_dir (template_c). We will soon release 3.1.29 with bugfixes |
define('ROOT_DIR', '/airway/'); But I will add additional checks for the OS type. |
Te fix is now in the master branch |
…ize to the root dir of current working drive #134
Now it got it. a path like '/airway/' on windows should normalize to the root dir of the current working drive. This is now fixed in the master branch. |
After update to version 3.1.28, templates cannot be loaded:
Fatal error: Uncaught --> Smarty: Unable to load template file 'admin/index.tpl' <-- thrown in E:_prjutils\lib3\smarty\sysplugins\smarty_internal_template.php on line 139.
The text was updated successfully, but these errors were encountered: