Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid Document" error adding new item to menu #1017

Closed
kl177 opened this issue Jan 31, 2015 · 8 comments
Closed

"Invalid Document" error adding new item to menu #1017

kl177 opened this issue Jan 31, 2015 · 8 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@kl177
Copy link
Contributor

kl177 commented Jan 31, 2015

When I try to add new item to menu (with brand name "SliRx") there is an error:
"Invalid Document
Element 'add', attribute 'resource': [facet 'pattern'] The value 'SliRx_News::news' is not accepted by the pattern '[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.
Line: 6

Element 'add', attribute 'resource': 'SliRx_News::news' is not a valid value of the atomic type 'typeResource'.
Line: 6
#0 /home/slirx/web_dev/m2.local/lib/internal/Magento/Framework/Config/Reader/Filesystem.php(119): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#1 /home/slirx/web_dev/m2.local/app/code/Magento/Backend/Model/Menu/Config.php(142): Magento\Framework\Config\Reader\Filesystem->read('adminhtml')
#2 /home/slirx/web_dev/m2.local/app/code/Magento/Backend/Model/Menu/Config.php(109): Magento\Backend\Model\Menu\Config->_initMenu()
#3 /home/slirx/web_dev/m2.local/app/code/Magento/Backend/Block/Menu.php(306): Magento\Backend\Model\Menu\Config->getMenu()
#4 /home/slirx/web_dev/m2.local/app/code/Magento/Backend/App/AbstractAction.php(132): Magento\Backend\Block\Menu->getMenuModel()
#5 /home/slirx/web_dev/m2.local/app/code/Magento/Cms/Controller/Adminhtml/Page/Index.php(31): Magento\Backend\App\AbstractAction->_setActiveMenu('Magento_Cms::cm...')
#6 /home/slirx/web_dev/m2.local/var/generation/Magento/Cms/Controller/Adminhtml/Page/Index/Interceptor.php(117): Magento\Cms\Controller\Adminhtml\Page\Index->execute()
#7 /home/slirx/web_dev/m2.local/lib/internal/Magento/Framework/App/Action/Action.php(101): Magento\Cms\Controller\Adminhtml\Page\Index\Interceptor->execute()"

Do I need to name the brand only starting with uppercase? or this is the wrong pattern in app/code/Magento/Backend/etc/menu.xsd:134?

@otoolec
Copy link
Contributor

otoolec commented Jan 31, 2015

I think the issue here is that we currently don't support camel case for vendor names. PR #985 should fix this issue (once we process it). You could verify this by pulling it into your local repository.

@sshrewz sshrewz added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 2, 2015
@vpelipenko
Copy link
Contributor

Internal ticket: MAGETWO-33373. Fix from PR #985 is available from 0.42.0-beta8. @slirx, could you verify described issue again?

@sshrewz
Copy link

sshrewz commented Mar 3, 2015

Hi @slirx, we haven't heard back from you for quite some time. To avoid closure of this issue, could you update us by end of this week?

@kl177
Copy link
Contributor Author

kl177 commented Mar 4, 2015

@vpelipenko no, but now I have another error: http://dl2.joxi.net/drive/0000/0178/12466/150304/bd8b016072.jpg To fix it you need to change regexp in lib/internal/Magento/Framework/Acl/etc/acl.xsd:64 to "[A-Z]+[A-Za-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}".

@otoolec
Copy link
Contributor

otoolec commented Mar 18, 2015

Looks like there are a couple more places this can be fixed:

git grep -F "[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}"

app/code/Magento/Config/etc/system.xsd:            <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" />
app/code/Magento/Config/etc/system_file.xsd:            <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" />
lib/internal/Magento/Framework/Acl/etc/acl.xsd:            <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" />

@anupdugar
Copy link
Contributor

@slirx Thanks for pointing that. We have created an internal ticket to track the issue : MAGETWO-35325

@safwkhan
Copy link
Contributor

safwkhan commented Oct 6, 2015

Hi @slirx, we contributed the fixes for this issue. Can you please try to reproduce it with latest code, and let us know your feedback?

@OZZlE
Copy link
Contributor

OZZlE commented Feb 17, 2017

It's not really safe to upgrade M2 as the customizations we have made usually break... and then we spend 100-300 hours fixing them again..

It would be really helpful if you could provide patches as well as fixing it on the latest version of magento.. Thank you in advance!

magento-team pushed a commit that referenced this issue Apr 18, 2017
[Mavericks] Fix functional tests fails on Jenkins:
- MAGETWO-65091: [FT] Magento\Catalog\Test\TestCase\ProductAttribute\CreateProductAttributeEntityFromProductPageTest fails on CI
- MAGETWO-65135: Incorrect link/sample sorting for downloadable product while creating it by WebAPI
- MAGETWO-58019: [FT] Incorrect selector for Tier price
- MAGETWO-66310: [FT] Magento\Captcha\Test\TestCase\CaptchaOnAdminLoginTest is failing
- MAGETWO-65405: [FT] Magento\Sales\Test\TestCase\CreateInvoiceEntityTest fails on Jenkins
- MAGETWO-58066: [FT] Incorrect dataset data in PrintOrderFrontendGuestTestVariation1
- MTA-4134: Ignore functional test failures caused by Magento issues
magento-team pushed a commit that referenced this issue Dec 14, 2017
… image filename #1017

 - Merge Pull Request magento-engcom/magento2ce#1017 from p-bystritsky/magento2:ISSUE-12084
 - Merged commits:
   1. c27282c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

8 participants