Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | call_to_a_member_function_getEntityTypeId-2896692-3.patch | 897 bytes | Znak |
Comments
Comment #2
Znak CreditAttribution: Znak commentedComment #3
Znak CreditAttribution: Znak commentedAdded the patch
Comment #5
john.oltman CreditAttribution: john.oltman commentedCommitted to 8.x-2.x branch. Will be in next dev build.
Comment #6
john.oltman CreditAttribution: john.oltman commented