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.5k stars 9.3k forks source link

Magento 2.2 Upgrade Issue #11113

Closed vishalpatel14 closed 7 years ago

vishalpatel14 commented 7 years ago

Preconditions

  1. Magento 2.2
  2. Php 7.0.10
  3. Appache 2.4.23
  4. Wampserver 3.0.6
  5. MySQL 5.7.14

Steps to reproduce

  1. composer require magento/product-community-edition 2.2 --no-update
  2. composer update

Expected result

  1. Upgrade Process should continue.

Actual result

  1. error

rustsol commented 7 years ago

It also display following after running php bin/magento setup:upgrade i dont understand what is related to ?

Invalid Document Element 'resource': The attribute 'title' is required but missing. Line: 12 Element 'resource': The attribute 'title' is required but missing. Line: 13

vishalpatel14 commented 7 years ago

Its coming after this steps.

  1. composer require magento/product-community-edition 2.2 --no-update
  2. composer update (Over Here)
orlangur commented 7 years ago

Probably update with sample data is not possible this way.

Please try something like http://devdocs.magento.com/guides/v2.2/comp-mgr/cli/cli-rc1-samp.html#command-line-upgrade-to-magento-21-with-sample-data

vishalpatel14 commented 7 years ago

So for updating Magento to 2.2.0 I need to update sample data aswell. As I already have sample data on my store with current version.

rustsol commented 7 years ago

I am trying to upgrade a website from Magento 2.1.8 to 2.2.0 when I run magento setup:upgrade its halt on running schema and showing following note: pfa for more info.

Running schema recurring...Invalid Document Element 'resource': The attribute 'title' is required but missing. Line: 12

Element 'resource': The attribute 'title' is required but missing. Line: 13

upgrade_issue

orlangur commented 7 years ago

@vishalpatel14 yeah. The doc I mentioned is for 2.0 - > 2.1 upgrade but I'm unaware if upgrade to 2.2 should work without such steps but with simple composer update.

@yogisfunda please report a separate issue containing all necessary details according to template.

vishalpatel14 commented 7 years ago

@orlangur

I just check that aswell still have same error. I am upgrading from 2.1.9 to 2.0.

Same error coming again.

orlangur commented 7 years ago

Looks like the main problem is related to magento-wishlist module constraint. Please check if your composer.json or such of any installed extension does not introduce any additional constaints for it.

vishalpatel14 commented 7 years ago

I just have pure Magento with only 1 Theme. No Extensions are been installed.

I have previously migrated from 2.1.8 to 2.1.9 with same methods and not errors have came before.

Just Migration to 2.2 Error is coming.

rav-redchamps commented 7 years ago

@vishalpatel14

Try executing below command before composer update

composer require magento/module-bundle-sample-data:100.2. magento/module-widget-sample-data:100.2. magento/module-theme-sample-data:100.2. magento/module-catalog-sample-data:100.2. magento/module-customer-sample-data:100.2. magento/module-cms-sample-data:100.2. magento/module-catalog-rule-sample-data:100.2. magento/module-sales-rule-sample-data:100.2. magento/module-review-sample-data:100.2. magento/module-tax-sample-data:100.2. magento/module-sales-sample-data:100.2. magento/module-grouped-product-sample-data:100.2. magento/module-downloadable-sample-data:100.2. magento/module-msrp-sample-data:100.2. magento/module-configurable-sample-data:100.2. magento/module-product-links-sample-data:100.2. magento/module-wishlist-sample-data:100.2. magento/module-swatches-sample-data:100.2. magento/sample-data-media:100.2. magento/module-offline-shipping-sample-data:100.2. --no-update

jhruehl commented 7 years ago

@yogisfunda It's probably just a missing title tag in a <resource ..../> child (youngest) element in an acl.xml file of one or more of your modules. Just add title="blub" (or something more serious) to those elements and the problems should be solved.

vishalpatel14 commented 7 years ago

@ravinders-121

After using your commands error resolve. Can you tell me from where you got this commands and its for which use?

Also I got one error is for Package fabpot/php-cs-fixer is abandoned message.

I solved it using below commands and after that it all started working

composer remove fabpot/php-cs-fixer composer require --dev friendsofphp/php-cs-fixer

orlangur commented 7 years ago

Can you tell me from where you got this commands and its for which use?

They are from the link I posted :) https://github.com/magento/magento2/issues/11113#issuecomment-332794096

The idea is to update Magento and its sample data in one request. Otherwise, if you only try to upgrade Magento, it is not compatible with old sample data.

Maybe some command like composer update magento/product-community-edition:2.2 --with-dependencies would work too.

Also I got one error is for Package fabpot/php-cs-fixer is abandoned message.

It's not a problem, this replacement was done for 2.2 only, in your composer.json you need it only if you actually use it.

rustsol commented 7 years ago

@jhruehl thanks for the solutions, it worked. However after upgrade I'm facing a new issue, everything is working good excepts the product page is totally unseen, on product page it says: This page isn’t working website is currently unable to handle this request. HTTP ERROR 500

useapp commented 6 years ago

Hello, My upgrade from 2.1.7 to 2.2.0 also not without problems. Admin work frontend no. Please help

`1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 26

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 27

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 28

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 29

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 30

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 31

Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ). Line: 781

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 26

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 27

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 28

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 29

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 30

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 31

Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ). Line: 781

0 /home/shop/public_html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')

1 /home/shop/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/home/shop/publ...', '%message%\nLine:...')

2 /home/shop/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array)

3 /home/shop/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...', Array)

4 /home/shop/public_html/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\Framewo...', Array)

5 /home/shop/public_html/vendor/magento/framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)

6 /home/shop/public_html/vendor/magento/framework/View/Model/Layout/Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)

7 /home/shop/public_html/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '\n <refe...')

8 /home/shop/public_html/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge->load()

9 /home/shop/public_html/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()

10 /home/shop/public_html/vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()

11 /home/shop/public_html/vendor/magento/framework/View/Page/Config.php(207): Magento\Framework\View\Page\Config->build()

12 /home/shop/public_html/vendor/magento/framework/View/Result/Page.php(241): Magento\Framework\View\Page\Config->publicBuild()

13 /home/shop/public_html/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))

14 /home/shop/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

15 /home/shop/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)

16 /home/shop/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))

17 /home/shop/public_html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)

18 /home/shop/public_html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

19 /home/shop/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()

20 /home/shop/public_html/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

21 {main}`

thanhdble commented 6 years ago

Same issue

sukhvir1313 commented 6 years ago

Same issue for me

erik-augustin commented 6 years ago

same problem here after installing template 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 669

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 669

0 /home/78667-61384.cloudwaysapps.com/nxcngreggf/public_html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')

1 /home/78667-61384.cloudwaysapps.com/nxcngreggf/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/home/78667-613...', '%message%\nLine:...')

2 /home/78667-61384.cloudwaysapps.com/nxcngreggf/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array)

sureshpareek commented 6 years ago

Please reopen this issue because this coming to many users

terenzeyuen commented 6 years ago

Still same problem, magento 2.2 is very buggy. Guess this version did fixed a lot of previous versions bugs but because of these old bugs, upgrading won't be fully compatible. Recommend to test thoroughly before doing on production.

romeof1980 commented 6 years ago

Hi @terenzeyuen, your problems have nothing to do with bugs in Magento 2 core. Pls review sample data and especially extension compatibilities with 2.2.x There have been major security improvements in Magento 2.2.x that requires your extensions to adapt to this new requirements. You can see Magento 2.2 devdocs for more info and detailed insights. Cheers!

wobstyr commented 6 years ago

I've got the same issue, how do we proceed? how do we remove this now?

romeof1980 commented 6 years ago

hi @wobstyr , as said, it is not a Magento 2 issue but you should review sample data and especially extension compatibilities with 2.2.x . If they are not compatible, update them then run the upgrade to 2.2.x!

wobstyr commented 6 years ago

hi @romeof1980 ok i hear you, but how do i get rid of it? I've tried everything! i cant even find which one is causing the issue.

romeof1980 commented 6 years ago

hi @wobstyr , well, discussing it on "GitHub's Magento 2 issue" it's not appropriate because it's clearly not a bug but a support request. If you want to contact me directly I can probably provide some support. have a great day, romeo

jahicDario commented 6 years ago

same issue:

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 67

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 68

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 69 ...

Ylmzef commented 6 years ago

Same here when enable developer mode on storefront

ghost commented 6 years ago

Same issue here

DavidLambauer commented 6 years ago

Similiar issue:

 [Magento\Framework\Exception\LocalizedException]
  Invalid Document
  Element 'resource': The attribute 'title' is required but missing.
  Line: 12

The exception is thrown in \Magento\Framework\Config\Reader\Filesystem in line 163. The last acl.xml that were read has the attribute title set in each resource.

stephansteiner commented 6 years ago

Same issue here, all my acl.xml files (also third party) have the title attribute set for resource tags.

claudiusararu commented 6 years ago

We actually discovered that some ids were wrong in some 3rd party modules. Example: Magento_Adminhtml::stores instead of Magento_Backend::stores. We were able to fix the issues by correcting the ids in acl.xml of that specific 3rd party module.

bytes-commerce commented 6 years ago

Same issue here, we've just upgraded from Magento 2.0.6. to Magento 2.2.4

hirale commented 6 years ago

@nopenopenope same issue, any solutions? we upgraded from 2.2.3 to 2.2.4. Now all product pages are missing title.

bytes-commerce commented 6 years ago

I've been able to succesfully upgrade from 2.0.6 to 2.2.4 by:

a) checking my PHP ram settings b) checking file storage size c) verifying that magento runs on correct permissions

As my main problem was PHP doesn't have had enough RAM I appended -dmemory_limit=2G to the php-cli (php -dmemory_limit=2G bin/magento setup:upgrade, for example).

Another problem was the storage, as it appears - my MySQL container ran full without any notice. As it seems this kind of monitoring should be done better somehow at my side. ;)

Mage now running smoothly.

DeepParekhDev commented 6 years ago

Same issue:

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 42

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 43

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 44

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed. Line: 45

Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ). Line: 687

0 /var/www/vhosts/arredabene.local/httpdocs/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')

1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/var/www/vhosts...', '%message%\nLine:...')

2 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array)

3 /vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...', Array)

4 /vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\Framewo...', Array)

5 /vendor/magento/framework/View/Model/Layout/Update/Validator.php(141):

etc... etc..

Have you find any solution ? I just added magento 2.2.3 folder in server(CentOs with nginx) and install composer and getting this error.

bytes-commerce commented 6 years ago

@D-David11 I have had a similar issue and resolved it this way:

$ grep -rl "<data-reqiuremodule>" .

in Mage2 root. Check the corresponding files in your IDE and fix the errors. If the XML happens to be in a module, check if there are updates via Composer or Vendor Homepage.