We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Apologies! Error Code: -1 Could not find asset "C:\PUBLIC_DIR/PUBLIC_PATH"
(please notice the backward and forward slashes)
Update: vendor\zikula\theme-module\Engine\Asset.php Line 87: $publicDir = $this->kernel->getProjectDir() . '/public'; Replace with: $publicDir = str_replace('\\', '/', $this->kernel->getProjectDir()) . '/public';
$publicDir = $this->kernel->getProjectDir() . '/public';
$publicDir = str_replace('\\', '/', $this->kernel->getProjectDir()) . '/public';
$this->kernel->getProjectDir() returns basically __DIR__ and contains backslashes on Windows.
$this->kernel->getProjectDir()
__DIR__
This causes line 89 to fail on the replacement as $basePath contains forward slashes: $httpRootDir = str_replace($basePath, '', $publicDir);
$httpRootDir = str_replace($basePath, '', $publicDir);
This issue will only occur on Windows webservers when Zikula is not installed in the document root but in a subdirectory.
The text was updated successfully, but these errors were encountered:
Thank you very much for reporting 👍 We are going to include this into the next update.
Sorry, something went wrong.
fix replacement issue on Windows (#4480)
b5b5514
Fix resolving assets on Windows in sub directory (#4482)
8399112
* fix replacement issue on Windows (#4480) * add changelog entry
Fixed in #4482
Successfully merging a pull request may close this issue.
Expected Behavior: the same as on Linux
Current Behavior
Apologies!
Error Code: -1
Could not find asset "C:\PUBLIC_DIR/PUBLIC_PATH"
(please notice the backward and forward slashes)
Possible Solution
Update: vendor\zikula\theme-module\Engine\Asset.php
Line 87:
$publicDir = $this->kernel->getProjectDir() . '/public';
Replace with:
$publicDir = str_replace('\\', '/', $this->kernel->getProjectDir()) . '/public';
$this->kernel->getProjectDir()
returns basically__DIR__
and contains backslashes on Windows.This causes line 89 to fail on the replacement as $basePath contains forward slashes:
$httpRootDir = str_replace($basePath, '', $publicDir);
Context
This issue will only occur on Windows webservers when Zikula is not installed in the document root but in a subdirectory.
The text was updated successfully, but these errors were encountered: