Skip to content

CMS Block listing page doesn't work for admin users with limited permissions #39665

Open
@ihor-sviziev

Description

@ihor-sviziev

Preconditions and environment

  • Magento version 2.4.7-p4
  • Admin user with restricted permissions for merchandising only (allowed only to manage categories, products, cms blocks, cms pages). Important: you need to un-select "Edit Page Design" under "Save Page"

Steps to reproduce

  1. Go to Admin
  2. Login with user, with "merchandising" permissions
  3. Go to Content > Elements > Blocks

Expected result

You should see the CMS blocks list

Actual result

You see the magento error page with a report number.
In logs you have following:

Magento\Framework\Exception\LocalizedException: The "componentType" configuration parameter is required for the "cms_page_columns" component. in /var/www/html/vendor/magento/framework/View/Element/UiComponentFactory.php:405
Stack trace:
#0 /var/www/html/vendor/magento/framework/View/Element/UiComponentFactory.php(425): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#1 /var/www/html/vendor/magento/framework/View/Element/UiComponentFactory.php(334): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#2 /var/www/html/vendor/magento/framework/View/Element/UiComponentFactory.php(231): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('cms_block_listi...', Array, false)
#3 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(140): Magento\Framework\View\Element\UiComponentFactory->create('cms_block_listi...', NULL, Array)
#4 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(103): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure\Interceptor), 'cms_block_listi...', Array, Object(Magento\Framework\View\Layout\Interceptor))
#5 /var/www/html/vendor/magento/framework/View/Layout/GeneratorPool.php(93): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#6 /var/www/html/vendor/magento/framework/View/Layout.php(365): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#7 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(32): Magento\Framework\View\Layout->generateElements()
#8 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#9 /var/www/html/vendor/magento/framework/View/Page/Builder.php(65): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#10 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#11 /var/www/html/vendor/magento/framework/View/Layout.php(271): Magento\Framework\View\Layout\Builder->build()
#12 /var/www/html/vendor/magento/framework/View/Layout.php(896): Magento\Framework\View\Layout->build()
#13 /var/www/html/vendor/magento/module-backend/Model/View/Result/Page.php(26): Magento\Framework\View\Layout->getBlock('menu')
#14 /var/www/html/vendor/magento/module-cms/Controller/Adminhtml/Block.php(42): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Cms::cm...')
#15 /var/www/html/vendor/magento/module-cms/Controller/Adminhtml/Block/Index.php(43): Magento\Cms\Controller\Adminhtml\Block->initPage(Object(Magento\Backend\Model\View\Result\Page\Interceptor))
...
#32 /var/www/html/vendor/magento/framework/App/FrontController.php(245): Magento\Cms\Controller\Adminhtml\Block\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /var/www/html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Magento\Cms\Controller\Adminhtml\Block\Index\Interceptor), Object(Magento\Framework\App\Request\Http))
#34 /var/www/html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Cms\Controller\Adminhtml\Block\Index\Interceptor))
#35 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#36 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#37 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#38 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#39 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#40 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#41 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#42 {main}

Additional information

It wasn't these before installing the latest security patch.

Looks like root cause is in this commit: 3bebcd6#diff-3a204359fbffa83d59f68d531d829555fbc84decc5b9fbdd0e8a780cd81516a5R127-R143

The code is expected to be called only for CMS Page listing, while it's also runner for CMS block listing.

Workaround

Add the "Edit Page Design" permission

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: ContentComponent: CmsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR CreatedIndicates that Pull Request has been created to fix issueReported on 2.4.7-p4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions