Problem/Motivation
Error: Call to a member function getValue() on null in ebt_basic_button_preprocess_block() (line 36 of ebt_basic_button.module in New Drupal CMS Version 11.2.2
Steps to reproduce
Attempt to access a page created using layout builder and has the basic button used causes a W.S.O.D
Proposed resolution
Attached on patch
Issue fork ebt_basic_button-3538216
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
levmyshkinHi thomas kaisuka, thank you for your report, I added additional validation for field_ebt_settings:
https://www.drupal.org/project/ebt_basic_button/releases/1.4.11
https://drupalbook.org/ebt/demo/basic-button
Comment #5
levmyshkinComment #6
levmyshkinComment #7
thomas kaisuka commentedThe new change is now bringing this and a WSOD ;
Error: Call to a member function hasField() on null in ebt_basic_button_preprocess_block() (line 41
Comment #8
levmyshkinI see.. there are two places with block_content:
$variables['elements']['content']['#block_content']
$variables['content']['#block_content']
I added validation for both of them:
https://www.drupal.org/project/ebt_basic_button/releases/1.4.12
Comment #9
levmyshkinBut then preprocess will not be working. Did you face this problem on Drupal 11 after upgrade from Drupal 10? I'm still waiting to upgrade from Drupal 10 to Drupal 11 cause of CKEditor 5 plugins, but eventually I will upgrade my site drupalbook.org and test all EBT/EPT modules with Drupal 11 too.