Skip to content

Unable to use remove statements for the admin menu #709

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

Closed
tzyganu opened this issue Oct 27, 2014 · 1 comment
Closed

Unable to use remove statements for the admin menu #709

tzyganu opened this issue Oct 27, 2014 · 1 comment

Comments

@tzyganu
Copy link
Contributor

tzyganu commented Oct 27, 2014

Let's say that I create a module that should remove a backend menu item. I still don't have a valid use case, but let's say I want that. :).
I see that there is already a menu command for that.
in theory it should work if I add this to my adminhtml/menu.xml file:

<remove id="Dummy_Demo::dummy" />

Doing this throws an exeption:

Missing required param title
#0 MAGENTO_ROOT/app/code/Magento/Backend/Model/Menu/Item.php(184):  Magento\Backend\Model\Menu\Item\Validator->validate(Array)

This happense because the 'title' attribute is marked as required in Magento\Backend\Model\Menu\Item\Validator::$_required. I tried adding a dummy title on the remove command

<remove id="Magento_Catalog::catalog" title="Dummy title" />

But "no go". In this case my xml is not valid, because the remove tag does not support a title attribute, as defined in Magento/Backend/etc/menu.xsd

[EDIT]:

the same goes for the resource attribute and for the <update> command.

Note. It works if I try to remove a core menu, but a non-core one.

@tzyganu
Copy link
Contributor Author

tzyganu commented Oct 27, 2014

Never mind. The problem was ME. Wrong declaration of menu item ids.

@tzyganu tzyganu closed this as completed Oct 27, 2014
joanhe pushed a commit that referenced this issue Oct 13, 2015
…ing-interceptor

[Extensibility] Bug fixes
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
MSI: 704: Sources Grid doesn't display State/Province when specified custom region entered manually
magento-engcom-team added a commit that referenced this issue Jun 19, 2019
#709

 - Merge Pull Request magento/graphql-ce#709 from magento/graphql-ce:GraphQl-674-customer-address-extended-test-coverage
 - Merged commits:
   1. 52fee67
   2. d7c302b
   3. c6eefe2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant