Problem/Motivation

Error: Using $this when not in object context in Drupal\entity_reference_display\Plugin\Field\FieldFormatter\EntityReferenceRevisionsDisplayFormatter::isApplicable() (line 117 of modules/contrib/entity_reference_display/src/Plugin/Field/FieldFormatter/EntityReferenceDisplayFormatterTrait.php).

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

saidatom created an issue. See original summary.

saidatom’s picture

Status: Active » Needs review
anybody’s picture

Status: Needs review » Reviewed & tested by the community

Confirming RTBC, but DI would be the preferred way. Leaving this for the maintainer to decide.

Thinking about this a bit I think it can't use DI as the call causing this is a static call?

@saidatom could you provide a stack trace maybe to see where this comes from?

cb’s picture

Tested;

Unpatched; Visit admin > structure > page (type) > display
Throws error message on white page of death.

Patched; Visit admin > structure > page (type) > display
Shows correct node type display form.

RTBC ✅

eleonel made their first commit to this issue’s fork.

  • eleonel committed 5aad49de on 2.0.x authored by saidatom
    Issue #3482919 by saidatom, anybody, cb: Using '$this' when not in...
eleonel’s picture

Thanks!

eleonel’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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