Problem/Motivation

On deleting the media with all it's history and revisions
Or when using content share or syncing with number of site
In some point the when the media is not shared with other synced sites

The following error will show up:

Error: Call to a member function getValue() on null in varbase_media_block_preprocess_block() (line 145 of modules/contrib/varbase_layout_builder/modules/varbase_media_block/varbase_media_block.module).

Steps to reproduce

Given that a Media was placed using the Varbase Media Block, or with media embed in the CKEditor
When the landing page with Layout Builder is synced or shared with other sites
Then the fatal error show up

Proposed resolution

Check if media exist before call getValue

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
  • ➖ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release varbase-9.0.6, varbase_layout_builder-10.0.11 , varbase_layout_builder-9.0.3

Varbase update type:

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

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

Command icon 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

abu-zakham created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: abu-zakham » Unassigned
Issue summary: View changes
Status: Active » Needs review
rajab natshah’s picture

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Title: Fix Fatal error if source media deleted » Fix Fatal error if a source media was deleted
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Status: Fixed » Needs review

rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

✅ Released varbase-9.0.6

rajab natshah’s picture

Issue summary: View changes