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

jquery-cookie.js not found (Error 404) #1319

Closed
Pakkapao opened this issue May 30, 2015 · 10 comments
Closed

jquery-cookie.js not found (Error 404) #1319

Pakkapao opened this issue May 30, 2015 · 10 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@Pakkapao
Copy link

PHP: 5.6.9
Magento: 0.74.0-beta11
Web Service: nginx

I already run php bin/magento setup:static-content:deploy

1

I also got errors below while deploying static contents.

=== frontend -> Magento/blank -> en_US ===
................................................................................................................................................................................................................................................................................................................................................The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'images/select-bg.svg' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.............The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/selection.json' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/Luma-Icons.eot' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/Luma-Icons.ttf' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/Luma-Icons.svg' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/Luma-Icons.woff2' for area 'frontend', theme 'Magento/blank', locale 'en_US')
.The "/var/www/html/magento2/" file doesn't exist or not a file (Processing file 'fonts/Luma-Icons.woff' for area 'frontend', theme 'Magento/blank', locale 'en_US')
................................................................................................................................................................

@FagnerMartinsBrack
Copy link

I suggest upgrading to js-cookie when possible, check here.

@mazhalai
Copy link
Contributor

mazhalai commented Jun 1, 2015

@adzminz thank you for reporting this issue. Can you please tell us what is your mode of magento?

We have created MAGETWO-37911 to track this issue.

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS Progress: needs update labels Jun 1, 2015
@Pakkapao
Copy link
Author

Pakkapao commented Jun 1, 2015

@mazhalai production mode.

@samtay
Copy link

samtay commented Jun 16, 2015

@adzminz From the issue referenced above (#1360) a temporary workaround has been found: copy the jquery.cookie.js to a file called jquery-cookie.js.

I totally missed that the browser was trying to access the the file with the hyphen. Good catch @vortex-mike.

@vortex-mike
Copy link

you may need to have both files for it to work... it's being called differently in different places

@Pakkapao
Copy link
Author

@samtay @vortex-mike Thank you!

@vpelipenko
Copy link
Contributor

Fix is available from 0.74.0-beta15. Please, check the issue on this version.

@Pakkapao
Copy link
Author

Thank you.

@archetypeworks
Copy link

how can I change file name jquery-cookie.js insted jquery.cookie.js in magento 2 (CE)
can you please explain setp by step.

I have changed here bellow but till now jquery.cookie.js called insted jquery-cookie.js and given 404 error.

\dev\tests\js\JsTestDriver\jsTestDriverOrder.php (1 hit)
Line 18: '/lib/web/jquery/jquery.cookie.js',
\dev\tests\js\JsTestDriver\testsuite\lib\storage\index.html (1 hit)
Line 19: <script src="../../../pub/lib/jquery/jquery.cookie.js"></script>
\pub\static\adminhtml\Magento\backend\en_US\js\bundle\bundle0.js (1 hit)
Line 3: 'jsbuild':{"Magento_Variable/variables.js":"/\n * Copyright \u00c2\u00a9 2016 Magento. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'jquery',\n 'mage/translate',\n 'Magento_Ui/js/modal/modal',\n 'jquery/ui',\n 'prototype',\n], function(jQuery, $t){\n\nwindow.Variables = {\n textareaElementId: null,\n variablesContent: null,\n dialogWindow: null,\n dialogWindowId: 'variables-chooser',\n overlayShowEffectOptions: null,\n overlayHideEffectOptions: null,\n insertFunction: 'Variables.insertVariable',\n init: function(textareaElementId, insertFunction) {\n if ($(textareaElementId)) {\n this.textareaElementId = textareaElementId;\n }\n if (insertFunction) {\n this.insertFunction = insertFunction;\n }\n },\n\n resetData: function() {\n this.variablesContent = null;\n this.dialogWindow = null;\n },\n\n openVariableChooser: function(variables) {\n ...
\pub\static\frontend\Magento\blank\en_US\js\bundle\bundle0.js (1 hit)
Line 8: 'jsbuild':{"Magento_Ui/js/view/messages.js":"/
\n * Copyright \u00c2\u00a9 2016 Magento. All rights reserved.\n * See COPYING.txt for license details.\n _/\ndefine([\n 'ko',\n 'jquery',\n 'uiComponent',\n '../model/messageList'\n], function (ko, $, Component, globalMessages) {\n 'use strict';\n\n return Component.extend({\n defaults: {\n template: 'Magento_Ui/messages',\n selector: '[data-role=checkout-messages]',\n isHidden: false,\n listens: {\n isHidden: 'onHiddenChange'\n }\n },\n\n initialize: function (config, messageContainer) {\n this._super()\n .initObservable();\n\n this.messageContainer = messageContainer || config.messageContainer || globalMessages;\n\n return this;\n },\n\n initObservable: function () {\n this.super()\n .observe('isHidden');\n\n return this;\n ...
\pub\static\frontend\Magento\luma\en_US\js\bundle\bundle0.js (1 hit)
Line 8: 'jsbuild':{"Magento_Ui/js/view/messages.js":"/
*\n * Copyright \u00c2\u00a9 2016 Magento. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n 'ko',\n 'jquery',\n 'uiComponent',\n '../model/messageList'\n], function (ko, $, Component, globalMessages) {\n 'use strict';\n\n return Component.extend({\n defaults: {\n template: 'Magento_Ui/messages',\n selector: '[data-role=checkout-messages]',\n isHidden: false,\n listens: {\n isHidden: 'onHiddenChange'\n }\n },\n\n initialize: function (config, messageContainer) {\n this._super()\n .initObservable();\n\n this.messageContainer = messageContainer || config.messageContainer || globalMessages;\n\n return this;\n },\n\n initObservable: function () {\n this._super()\n .observe('isHidden');\n\n return this;\n ...
\vendor\magento\magento2-base\dev\tests\js\JsTestDriver\jsTestDriverOrder.php (1 hit)
Line 18: '/lib/web/jquery/jquery.cookie.js',
\vendor\magento\magento2-base\dev\tests\js\JsTestDriver\testsuite\lib\storage\index.html (1 hit)
Line 19: <script src="../../../pub/lib/jquery/jquery.cookie.js"></script>

@dazimax
Copy link

dazimax commented Nov 1, 2017

You could fix this issue by follow up below steps,

  1. Set deploy mode to production - php magento deploy:mode:set production
    (js and css minification will works with production mode.If you are in developer mode with code minified above issues will show up as I experienced it. Also verify using echo the print_r($_SERVER) in index.php that production mode is set before load the website)

  2. Clear all the caches setup in server
    /etc/init.d/nginx restart
    /etc/init.d/php5.6-fpm restart
    /etc/init.d/varnish restart

  3. Clear the browser cache and view it in incognito mode. That's it!

Cheers!

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

8 participants