The website encountered an unexpected error. Please try again later.
Error: Call to a member function getValue() on null in revision_log_default_entity_presave() (line 72 of modules/contrib/revision_log_default/revision_log_default.module).

WSOD when saving a node with modifications in Entity Reference field (Media Image entities).
Other fields modifications do not trigger the error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LemonHardos created an issue. See original summary.

LemonHardos’s picture

composer require 'drupal/revision_log_default:^1.0'
->Updating drupal/revision_log_default (dev-1.x b91696a => 1.0.0):  Checking out 8.x-1.0

No WSOD with 1.0, it seems only related to dev version.

dan2k3k4’s picture

I also got a similar error:

PHP message: Error: Call to a member function label() on null in /app/web/modules/contrib/revision_log_default/revision_log_default.module on line 23 #0 [internal function]: revision_log_default_entity_presave(Object(Drupal\menu_item_extras\Entity\MenuItemExtrasMenuLinkContent))
samuel.mortenson’s picture

We probably need to do more "instanceof" checks to help with this.

dan2k3k4’s picture

Here's a patch to check bundle before calling label function. I also added some spacing between the if() statements as it was hard to ready where one if/elseif ended and one new if started.

EDIT: This is for the 8.x-1.0 release. But this drupal.org issue is about the dev branch being broken. Fix for that should be in #7

samuel.mortenson’s picture

Status: Needs review » Needs work

Looks like the patch failed to apply.

dan2k3k4’s picture

Version: 8.x-1.x-dev » 8.x-1.0
Status: Needs work » Needs review
FileSize
1.66 KB

Ah, I just realised, it should be for the 8.x-1.0 version instead.

However the issue pointed out could be fixed with a different patch.

kobb’s picture

@dan2k3k4 Thanks! Tested and verified.

  • dan2k3k4 authored 994ad10 on 8.x-1.x
    Issue #3055390 by dan2k3k4, LemonHardos, kobb: Call to a member function...
samuel.mortenson’s picture

Status: Needs review » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

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