-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Preconditions (*)
- Magento 2.4.8-p3
Steps to reproduce (*)
- Add a block to the
contentcontainer on the default layout in any module, for the adminhtml area - Open any 2fa page like the first configure screen (tfa/tfa/configure), or the google setup for a new admin (tfa/google/configure)
Expected result (*)
- The configuration form is shown
Actual result (*)
- Section where the configuration form should be is blank
Inspecting the page, there is no block from the 2fa module being rendered, it isn't even being initialized (debugging with a breakpoint on the constructor)
This happens because block names in Magento are globally unique, and content is already a container. If you use the same name, that block or container will get overwritten which is what happens here. Inspecing the blocks of the layout shows the class of "content" is the standard Template, not whatever 2fa block it should be.
I'm sure that in a clean magento instance this won't be visible, I only saw it in one project that happens to add a block like that.
To fix this, all the new blocks being created with the name "content" in the adminhtml/layout should be renamed to anything else.
Metadata
Metadata
Assignees
Labels
No labels