magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Error when updating from 2.1.12 to 2.2.4 on CLI #15636

Closed pioneerathletics closed 6 years ago

pioneerathletics commented 6 years ago

Preconditions

  1. Magento 2.2.4 from Magento 2.1.12

Steps to reproduce

  1. Upgraded via CLI from Magento 2.1.12 to 2.2.4 2.composer require magento/product-community-edition 2.2.4 --no-update
  2. composer update
  3. rm -rf /var/cache/ rm -rf /var/page_cache/ rm -rf /var/generation/*
  4. setup:upgrade
  5. setup:di:compile 7.setup:static-content:deploy
  6. cache:clean
  7. cache:flush

Expected result

  1. Magento should update accordingly.

Actual result

  1. There has been an error processing your request Exception printing is disabled by default for security reasons.
  2. Within var/report this is shown: {   "script_name": "/index.php",   "url": "/",   "1": "#0 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Page/Config/Generator/Head.php(125): Magento\\Framework\\App\\ErrorHandler->handler(8, 'Undefined index...', ‘/xxxxx/xxxxx/d...', 125, Array)\n#1 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Page/Config/Generator/Head.php(103): Magento\\Framework\\View\\Page\\Config\\Generator\\Head->processAssets(Object(Magento\\Framework\\View\\Page\\Config\\Structure))\n#2 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\\Framework\\View\\Page\\Config\\Generator\\Head->process(Object(Magento\\Framework\\View\\Layout\\Reader\\Context), Object(Magento\\Framework\\View\\Layout\\Generator\\Context))\n#3 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout.php(344): Magento\\Framework\\View\\Layout\\GeneratorPool->process(Object(Magento\\Framework\\View\\Layout\\Reader\\Context), Object(Magento\\Framework\\View\\Layout\\Generator\\Context))\n#4 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout/Builder.php(129): Magento\\Framework\\View\\Layout->generateElements()\n#5 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Page/Builder.php(55): Magento\\Framework\\View\\Layout\\Builder->generateLayoutBlocks()\n#6 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout/Builder.php(65): Magento\\Framework\\View\\Page\\Builder->generateLayoutBlocks()\n#7 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout.php(254): Magento\\Framework\\View\\Layout\\Builder->build()\n#8 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Layout.php(875): Magento\\Framework\\View\\Layout->build()\n#9 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/module-cms/Helper/Page.php(171): Magento\\Framework\\View\\Layout->getBlock('page_content_he...')\n#10 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\\Cms\\Helper\\Page->prepareResultPage(Object(Magento\\Cms\\Controller\\Index\\Index\\Interceptor), 'home')\n#11 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/App/Action/Action.php(107): Magento\\Cms\\Controller\\Index\\Index->execute()\n#12 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#13 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->___callParent('dispatch', Array)\n#14 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#15 /xxxxx/xxxxxxx/xxxxxxxx/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(26): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->___callPlugins('dispatch', Array, Array)\n#16 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/App/FrontController.php(55): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#17 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#18 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)\n#19 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#20 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(135): Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#21 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#22 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(135): Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#23 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#24 /xxxxx/xxxxxxx/xxxxxxxx/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, NULL)\n#25 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/App/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#26 /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/App/Bootstrap.php(256): Magento\\Framework\\App\\Http->launch()\n#27 /xxxxx/xxxxxxx/xxxxxxxx/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#28 {main}",   "0": "Notice: Undefined index: src in /xxxxx/xxxxxxx/xxxxxxxx/vendor/magento/framework/View/Page/Config/Generator/Head.php on line 125" } Note-I changed our folder names to xxxx/xxxx/xxxx respectively.
abcpremium commented 6 years ago

Do you have client-side LESS compilation enabled?

pioneerathletics commented 6 years ago

Hi @abcpremium, No I have it set to Server side LESS compilation.

pioneerathletics commented 6 years ago

I have solved my own issue. After going back and trying again (this time upgrading to 2.2.3 not 2.2.4-not that it matters) I found a few Github issues that had similar problems when upgrading. Here are the steps I took in order to solve my upgrade problem:

  1. The main problem was two old extensions that were disabled and not in use, but still present in the system. I had to completely remove those.
  2. I updated my composer.json file as shown here- https://community.magento.com/t5/Magento-2-x-Version-Upgrades/How-to-upgrade-Magento-2-1-2-to-Magento-2-2-3/td-p/89336
  3. Plus I had to change a "href" attribute to "src" in my default_head_blocks.xml.
  4. I also set the mode to developer instead of production ( I should've done this the first time anyway).

Here are a few similar github issues that helped: https://github.com/magento/magento2/issues/11224 https://github.com/magento/magento2/issues/11696