Problem/Motivation

The NodeAuthlinkNodeForm form builder class is explicitly loading node objects instead of accepting it from Drupal's Routing system. This has the implication that other modules (e.g. entity_hierarchy) working on node routes are also getting a node id for the node route parameter instead of the node object. This is leading to fatal errors in some cases.

Steps to reproduce

  1. Install node_authlink and entity_hierarchy modules.
  2. Configure node_authlink for at least one content type.
  3. Open a node of that content type and click the Authlink tab.
  4. This should lead to a White-screen-of-death.

Proposed resolution

The attached patch fixes this issue while retaining the original behaviour. It uses parameter upcasting to achieve this.

Remaining tasks

More testing...

Comments

progga created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review

Setting to needs review for 👀