0

For some reason mage 2 is not creating files that seems to be needed for a proper working of the shop. For example there is a file http://dev.domain.co.uk/pub/media/catalog/productno_selection requested but a 404 is delivered because it is not there. I guess that might be a file containing the amount of items in basket since my top right corner does not state the products amount and I can't reach the basket without going directly in there via url. The top right basket doesn't let me in, stating that no products are in basket... which is wrong.

Going to that url directly delivers an empty page.

The other files missing are javascript-files that should be created by mage2 in pub/static too, it seems. For example I mapped the right filename (.js is not needed or allowed) to the left handle

'jquery_191':           'js/jquery-1.9.1.min',

Then mage2 requests the filename http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/de_DE/jquery_191.js but this file does not exist.

Going to that file directly gives some mage bugs claiming that the file does not exist.

What's wrong? Why are these files not created? I think it brings certain problems to my installation.

PS: Errors in chrome console after setup:upgrade and setup:static-cache:deploy with the correct language.

Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 14. The default protections will be applied.
(index):366 GET http://dev.domain.co.uk/pub/media/catalog/productno_selection 404 (Not Found)
productno_selection:1 GET http://dev.domain.co.uk/pub/media/catalog/productno_selection 404 (Not Found)
jquery-migrate.js:21 JQMIGRATE: Logging is active
require.js:1895 GET http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/en_GB/jquery_191.js req.load @ require.js:1895load @ require.js:1639load @ require.js:820fetch @ require.js:810check @ require.js:840enable @ require.js:1143enable @ require.js:1511(anonymous function) @ require.js:1128(anonymous function) @ require.js:132each @ require.js:57enable @ require.js:1090init @ require.js:774(anonymous function) @ require.js:1416
require.js:166 Uncaught Error: Script error for: jquery_191
http://requirejs.org/docs/errors.html#scripterrormakeError @ require.js:166onScriptError @ require.js:1681
require.js:1895 GET http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/en_GB/script_code_header.js req.load @ require.js:1895load @ require.js:1639load @ require.js:820fetch @ require.js:810check @ require.js:840enable @ require.js:1143enable @ require.js:1511(anonymous function) @ require.js:1128(anonymous function) @ require.js:132each @ require.js:57enable @ require.js:1090init @ require.js:774(anonymous function) @ require.js:1416
require.js:166 Uncaught Error: Script error for: script_code_header
http://requirejs.org/docs/errors.html#scripterrormakeError @ require.js:166onScriptError @ require.js:1681

1 Answer 1

0

Try running both the codes below:

  • php bin/magento setup:upgrade

  • php bin/magento setup:static-content:deploy

3
  • Thanks for answering... I use the first command relatively regularly. The second command fails for a reason I do not understand. PHP claims having not enough memory. Though phpinfo.php has a memory limit way higher. And the cli-user has another php.ini that has unlimited ram. I wonder what the problem is. Jul 22, 2016 at 14:25
  • It was an error in chosing the wrong php.ini. Though even when running setup:upgrade and then running deploy with the correct language... it does not change a little bit. Are these files created by a special user that might be missing writing rights or something? I'm not sure what to do. I think about trying to upgrade to mage 2.0.8 or 2.1 but I wonder if it will change the issue. I added the console output in my first post... Jul 23, 2016 at 16:49
  • Maybe those missing files do not belong to the real static content like the require_js- folder in pub/static? It does not get deleted when deleting static content cache so maybe those files would not be created by deploying and the error lies in the engine that handles code files? Jul 25, 2016 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.