There are two PHP notices when saving a layout change in the Panels IPE:

Notice: Only variables should be passed by reference in Drupal\panels_ipe\Form\PanelsIPELayoutForm->submitForm() (line 185 of modules/contrib/panels/panels_ipe/src/Form/PanelsIPELayoutForm.php).
Undefined index: label in Drupal\panels_ipe\Form\PanelsIPELayoutForm->submitForm() (line 232 of modules/contrib/panels/panels_ipe/src/Form/PanelsIPELayoutForm.php).

There are apparently no side effects, but these notices are misleading when hunting down other bugs.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

floretan created an issue. See original summary.

japerry’s picture

sylus’s picture

Status: Active » Needs review
FileSize
1.49 KB

I was noticing this as well.

+++ b/panels_ipe/src/Form/PanelsIPELayoutForm.php
@@ -229,7 +230,7 @@ class PanelsIPELayoutForm extends FormBase {
-      'label' => $layout_config['label'],
+      'label' => $this->layout->getLabel(),

With this change I am getting the following exception:

Call to undefined method Drupal\layout_plugin\Plugin\Layout\LayoutDefault::getLabel()

I kept just the array_keys + reset changes and checked if the $layout_config is set before assignment. Not sure what we do when there is no layout configuration being read though ^_^

sylus’s picture

Nevermind sorry for the noise I was using a stable tag of layout_plugin (1.0-alpha22) and not the latest dev which has the getLabel() improvements. ^_^

http://cgit.drupalcode.org/layout_plugin/commit/?id=96a5cf906097a307100e...

Patch in #1 is good with layout_plugin dev, thanks!

sylus’s picture

samuel.mortenson’s picture

Status: Needs review » Fixed

I replicated the error and the patch was simple enough to review+commit myself. Thanks all!

Status: Fixed » Closed (fixed)

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