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

$smarty->configLoad($file); doesn't work in version 3.1.33-dev-5 #451

Closed
yourchoice opened this issue May 31, 2018 · 3 comments
Closed

$smarty->configLoad($file); doesn't work in version 3.1.33-dev-5 #451

yourchoice opened this issue May 31, 2018 · 3 comments

Comments

@yourchoice
Copy link

@yourchoice yourchoice commented May 31, 2018

$smarty->configLoad($file); doesn't work in version 3.1.33-dev-5

Fatal error: Uncaught --> Smarty: Unable to load config 'file:trans_fr.conf' <-- thrown in ....\lib\smarty\sysplugins\smarty_template_compiled.php on line 96

Before I had version 3.1.32-dev-31. Afte rupdate I get this error

Config folder is defined:
$smarty->setConfigDir(TEMPLATES_DIR . 'configs');

@yourchoice

This comment has been minimized.

Copy link
Author

@yourchoice yourchoice commented May 31, 2018

I see that the problem is just on my local windows, where path start with E:/sitename/.

If I remove the "E:/" and let just "/sitename/" then working. Version 3.1.32 worked in this way.

Can be updated to work in both ways?

@ophian

This comment has been minimized.

Copy link

@ophian ophian commented May 31, 2018

uwetews added a commit that referenced this issue Aug 31, 2018
…was followed by a linux DIRECTORY_SEPARATOR

    like C:/  at Smarty > 3.1.33-dev-5 #451
@ophian

This comment has been minimized.

Copy link

@ophian ophian commented Sep 3, 2018

Fix confirmed OK! In the meantime for dev-6/7, I did the following, which also worked well

    public function _realpath($path, $realpath = null)
    {
        $nds = array('/' => '\\', '\\' => '/');
        // WinOS prep
        $path = str_replace(array($nds[DIRECTORY_SEPARATOR], DIRECTORY_SEPARATOR . '.' . DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, $path);
@uwetews uwetews closed this Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.