After enabling panelizer and I go to /admin/modules I am getting many many notices like this:

Notice: Undefined index: label in Drupal\panelizer\Panelizer->getPermissions() (line 443 of modules/contrib/panelizer/src/Panelizer.php).
Drupal\panelizer\Panelizer->getPermissions()
call_user_func(Array)
Drupal\user\PermissionHandler->buildPermissionsYaml()
Drupal\user\PermissionHandler->getPermissions()
Drupal\user\PermissionHandler->moduleProvidesPermissions('user')
Drupal\system\Form\ModulesListForm->buildRow(Array, Object, 'REMOVED')
Drupal\system\Form\ModulesListForm->buildForm(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormBuilder->retrieveForm('system_modules', Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Notice: Undefined index: label in Drupal\panelizer\Panelizer->getPermissions() (line 452 of modules/contrib/panelizer/src/Panelizer.php).
Drupal\panelizer\Panelizer->getPermissions()
call_user_func(Array)
Drupal\user\PermissionHandler->buildPermissionsYaml()
Drupal\user\PermissionHandler->getPermissions()
Drupal\user\PermissionHandler->moduleProvidesPermissions('user')
Drupal\system\Form\ModulesListForm->buildRow(Array, Object, 'REMOVED')
Drupal\system\Form\ModulesListForm->buildForm(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormBuilder->retrieveForm('system_modules', Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Comments

arknoll created an issue. See original summary.

phenaproxima’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

This fixes it for me.

dsnopek’s picture

Status: Needs review » Needs work

Discussed this with @phenaproxima on IRC yesterday. We still want to use the PluginId annotation, rather than Plugin, so this should really be fixed in Panelizer::getPermissions(). We should load the entity type and get the human-readable label from there!

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new1.65 KB

Here's a patch that fixes this! I'm probably going to commit right away (if it passes tests) so that I can work on #2667662: Add permission for changing layout which is a bug.

dsnopek’s picture

StatusFileSize
new1.65 KB

Hrm. I'm going to post the same patch twice and see if tests are possible now!

Status: Needs review » Needs work

The last submitted patch, 5: panelizer-permissions-2665678-4.patch, failed testing.

dsnopek’s picture

What? Tests failed because ctools directory already existed:

https://dispatcher.drupalci.org/job/default/81630/console

Re-testing and seeing what happens..

The last submitted patch, 5: panelizer-permissions-2665678-4.patch, failed testing.

dsnopek’s picture

Testbot is trying to check out CTools twice it looks like? Not sure why it's doing that :-/

dsnopek’s picture

Created an infrastructure issue for the CI error: #2667704: Testbot is trying to checkout CTools twice and failing

dsnopek’s picture

Status: Needs work » Fixed

This is working for me.. I'm just going to commit since who knows when the testbot issue will be addressed!

  • dsnopek committed e7669f6 on 8.x-3.x
    Issue #2665678 by dsnopek, phenaproxima: Notice: Undefined Index: label...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.