Fix thrown error when adding a background image to a custom block type

Created on 24 April 2024, 7 months ago
Updated 9 September 2024, 2 months ago

Problem/Motivation

The following error shows in the console when attempting to add a background image to a custom block type in Varbase layout builder:

TypeError: Drupal\media_library_form_element\Element\MediaLibrary::updateFormElement(): Return value must be of type array, null returned in Drupal\media_library_form_element\Element\MediaLibrary::updateFormElement() (line 412 of media_library_form_element/src/Element/MediaLibrary.php)

Steps to reproduce

  • Add a custom block type through Varbase layout builder
  • Configure the block and add a background image

Proposed resolution

Fix the issue in the used module
Add the patch for the fix in vardot/varbase-patches

✅ Released Varbase Patches 10.0.51

Added a patch for the Layout Builder Blocks module on Issue #3349066 Limit Layout Builder Blocks not to work in the dashboards route Needs work : Limit Layout Builder Blocks not to work in the dashboards route #75

which fixes this issue

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.1 , varbase_layout_builder-10.1.2

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After the fix

Watch Test Block Background in Varbase Layout Builder

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component

Code

Created by

🇯🇴Jordan RaniaMashaqbeh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024