2

After upgrade to Magento 2, in IDE PhpStorm, the UI component file show a lot of errors , like Element argument is not allowed here, Element xxx is not allowed here etc.

But, the UI component file is working well in system. And the official UI component file also has the errors. Like cms_block_listing.xml:

Element argument is not allowed here

How to fix it?

2

Go to File > Setting > Plugins > search text ('Magento2'); install this plugin after that click regenerated urn map and reindex in Magento2 Plugin config . Good luck!

1
  • The "Magento2 Plugin" setting is in File > Settings > Magento2 Plugin. After click "regenerated urn map" button, we need restart PhpStorm to see effect. – Key Shang Dec 27 '17 at 10:13
2

Other than the solution which install Magento2 Plugin in PhpStorm, we could also use the Magento official CLI command:

bin/magento dev:urn-catalog:generate .idea/misc.xml

It will generate the urn map file which PhpStorm need. Restart PhpStorm, then the a lot of errors will disappear.

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.