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

$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
Copy link
Author

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
Copy link

ophian commented May 31, 2018

see 115e178#comments

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
Copy link

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 as completed Sep 4, 2018
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