- Issue created by @anairamzap
- Merge request !14Fix bug where panels IPE block content edit / create form are not loading in Drupal 10.2 β (Open) created by anairamzap
- Open on Drupal.org βCore: 10.2.x + Environment: PHP 8.2 & MySQL 8last update
10 months ago Waiting for branch to pass - Status changed to Needs review
10 months ago 10:51pm 10 January 2024 - Status changed to RTBC
9 months ago 10:15am 29 February 2024 - π«π·France andypost
Signature changed in π Revisit the redirect to 'add block' form in the 'add block content' form Fixed
So the method must mimic it
- π¦πΊAustralia acbramley
IMO this is a core issue. the method should be changed to protected π BlockContentForm::actions is incorrectly overridden as public Active
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The core issue is fixed in 11.x, 10.3.x, 10.2.x
- Status changed to Closed: duplicate
9 months ago 9:50pm 29 February 2024 - π¦πΊAustralia acbramley
Closing as a duplicate of the above issue which has been committed in lightning speed.
- π«π·France andypost
Maybe that is not enough as function also added return-type as array, but needs checking
- π¦π·Argentina anairamzap Buenos Aires
oh, interesting! I assumed the method in core was "right" and contrib should mimic that signature change.
I'm wondering which is the best approach to avoid this error on panels in sites that did not updated core yet... Maybe apply this patch until core is updated?
- π«π·France andypost
@anairamzap use core's patch until new release is out https://git.drupalcode.org/project/drupal/-/commit/db5e5c12c713ad5718f9f...
- π§πͺBelgium f2boot
I had to complete the signature, adding :array, indeed.
Patch attached - π¨π¦Canada othermachines Edmonton, Alberta
Like #12 I also needed to apply a patch which adds
: array
. It resolves a 500 error when creating a custom block.This is with the core fix from π Revisit the redirect to 'add block' form in the 'add block content' form Fixed .
Error is:
PHP Fatal error: Declaration of Drupal\panels_ipe\Form\PanelsIPEBlockContentForm::actions(array $form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\block_content\BlockContentForm::actions(array $form, Drupal\Core\Form\FormStateInterface $form_state): array in D:\--\web\modules\contrib\panels\panels_ipe\src\Form\PanelsIPEBlockContentForm.php on line 18
Perhaps a new issue should be opened...
- π«π·France andypost
You need 10.2.4 core at least to get rid of the bug
- π¨π¦Canada othermachines Edmonton, Alberta
Thanks! My core version is 10.2.7.
I should have clarified that the patch in #12 contains the fix for me as it simply adds
:array
to the end of the signature. Please see the error message which is about compatibility unlike that in the OP which is about access level.