Magento2: Magento 2.2 Upgrade Issue

Created on 28 Sep 2017  路  36Comments  路  Source: magento/magento2


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

Format is valid non-issue

Most helpful comment

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('

1 /home/shop/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('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('

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

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}`

All 36 comments

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

Its coming after this steps.

  1. composer require magento/product-community-edition 2.2 --no-update
  2. composer update (Over Here)

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

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.

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

@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.

@orlangur

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

Same error coming again.

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.

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.

@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

@yogisfunda It's probably just a missing title tag in a 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.

@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

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.

@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鈥檛 working
website is currently unable to handle this request.
HTTP ERROR 500

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('

1 /home/shop/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('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('

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

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}`

Same issue

Same issue for me

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('

1 /home/78667-61384.cloudwaysapps.com/nxcngreggf/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('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)

Please reopen this issue because this coming to many users

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.

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!

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

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!

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.

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

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
...

Same here when enable developer mode on storefront

Same issue here

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.

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

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.

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

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

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.

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('

1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('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.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kandrejevs picture kandrejevs  路  3Comments

denis-g picture denis-g  路  3Comments

kirashet666 picture kirashet666  路  3Comments

MauroNigrele picture MauroNigrele  路  3Comments

andreaskoch picture andreaskoch  路  3Comments