Problem/Motivation

If a view is added to a menu tab of a route using an entity, e.g. user/1/example (views path user/%user/example) viewing that page results in the following exception: -

PHP Fatal error: Call to a member function getEntityTypeId() on string in ...../ForwardLinkBlock.php

Proposed resolution

Alter the check on line 142 to: -

if ($entity && $entity instanceof EntityInterface) {

Remaining tasks

Patch and test module

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dubs created an issue. See original summary.

Znak’s picture

Assigned: Unassigned » Znak
Znak’s picture

Assigned: Znak » Unassigned
Status: Active » Needs review
FileSize
897 bytes

Added the patch

  • john.oltman committed d8d0e4c on 8.x-2.x authored by Znak
    Issue #2896692 by Znak: PHP Fatal error in ForwardLinkBlock.
    
john.oltman’s picture

Status: Needs review » Reviewed & tested by the community

Committed to 8.x-2.x branch. Will be in next dev build.

john.oltman’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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