-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions
- Magento ver. 2.1.3
- PHP 7.0
- MySQL 5.6
All of the above running in docker containers. Files are sync'ed using docker-sync utility, but I've also tried mounting volumes directly from my local host drive and it did not help.
I've confirmed that PHP is running as www-data user and that all project files have read & write permissions on every file and directory within the project.
I have previously tried deleting all manual content and running setup:static-content:deploy. Static files were re-created, but it didn't help me to solve my problem.
Lastly, I've troubleshooted the code as far as I could and got to the point where in
vendor/magento/framework/View/Design/FileResolution/Fallback/Resolver/Simple.php file
protected function resolveFile(RuleInterface $fallbackRule, $file, array $params = [])
{
//->getPatternDirs return Array ( [0] => /var/www/html/lib/web )
// given that nginx doc root path is /var/www/html
foreach ($fallbackRule->getPatternDirs($params) as $dir) {
$path = "{$dir}/{$file}";
$dirRead = $this->readFactory->create($dir);
if ($dirRead->isExist($file) && $this->checkFilePathAccess($file, $path)) {
return $path;
}
}
return false;
}
Error details:
Unable to resolve the source file for '_requirejs/adminhtml/Magento/backend/en_US/requirejs-config.js'
#0 /var/www/html/vendor/magento/framework/App/StaticResource.php(97): Magento\Framework\View\Asset\File->getSourceFile()
#1 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\StaticResource->launch()
#2 /var/www/html/pub/static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))
#3 {main}
Also, I have confirmed that these files actually exist, but Magento is unable to work out their paths correctly.
Steps to reproduce
- Open management page or default Luma page
Expected result
- All files are loaded and all Javascript on the page is working
Actual result
- The files below can not be loaded, thus no JS is working on the page
- http://buywithme.local/static/version1482120120/_requirejs/frontend/Magento/luma/en_US/requirejs-config.js
- http://buywithme.local/static/version1482120120/frontend/Magento/luma/en_US/jquery/jquery-storageapi.js
- http://buywithme.local/static/version1482120128/_requirejs/adminhtml/Magento/backend/en_US/requirejs-config.js
- http://buywithme.local/static/version1482120128/adminhtml/Magento/backend/en_US/jquery/jquery-storageapi.js
- http://buywithme.local/static/version1482120128/adminhtml/Magento/backend/en_US/jquery/ui.js
- http://buywithme.local/static/version1482120845/adminhtml/Magento/backend/en_US/prototype.js