Problem/Motivation

The module assumes that any entity it accesses via hook will be moderated.
Not all entities on a site are always moderated;

This line:
$transition = $validator->getValidTransitions($entity, $currentUser);

throws a php error even for entity reference fields when rendered anywhere.

Steps to reproduce

Enable the module and try to view a node of non-moderated type

Proposed resolution

Check for moderation/workflow on the accessed entity

Comments

masterperoo created an issue. See original summary.

masterperoo’s picture

StatusFileSize
new1.28 KB

Ignore

masterperoo’s picture

StatusFileSize
new818 bytes

New patch

mlncn’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Fix looks correct. Thanks!

  • mlncn committed 66a597a3 on 2.0.x
    Issue #3539851 by masterperoo, mlncn: Error: Call to a member function...

  • mlncn committed 0317286d on 8.x-1.x
    Issue #3539851 by masterperoo, mlncn: Error: Call to a member function...
mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Applied to both (in progress, somewhat disruptive) 2.0.x and 8.x-1.x (we should tag a point release there soon) branches.

  • mlncn committed 96cd8fdc on 2.0.x
    Light formatting / code flow change; should not affect functionality...

Status: Fixed » Closed (fixed)

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