2

Using Magento 2.2.6.

I just installed a brand new install of 2.2.6 using Apache on OS X High Sierra, and with both Chrome and Firefox, after logging into the admin, the subnavigation does not work, and inspecting the page shows 12 js files have failed to load:

http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js
http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/adminhtml/globals.js

etc.

There are 70 odd other js files that load just fine:

http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/js/theme.js
http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/Magento_Ui/js/lib/knockout/bootstrap.js

etc.

When I curl the failed files, the file content comes back properly:

curl http://m226.local/pub/static/version1542310649/adminhtml/Magento/backend/en_US/mage/utils/strings.js
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
define([
    'underscore'
], function (_) {
    'use strict';

    var jsonRe = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;

    return {

        /**
         * Attempts to convert string to one of the primitive values,
         * or to parse it as a valid json object.
         *
         * @param {String} str - String to be processed.
         * @returns {*}
         */
        castString: function (str) {
            try {

etc.

I've run rm -rf var/cache/* pub/static/adminhtml/* and static:content:deploy multiple times with no change.

Is there a reason these files are failing to load and if so how can I fix it?

1
  • open your magento database and run this query to remove version number from the path

    insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);

  • after this clear cache

    rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*

Than deploy static content

php bin/magento setup:static-content:deploy -f
  • Thanks Muhammad - not sure what step in there made the difference, but I followed your instructions, and all the js in the back end loaded correctly - thx! – dbcn Nov 19 '18 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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