Installing or upgrading Helper past 8.x-1.40 on Drupal 10 sites causes fatal PHP errors on the node edit form.
AssertionError: assert($formObject instanceof NodeForm) in assert() (line 41 of modules/contrib/helper/src/Hook/NodeHooks.php).
This is due to commit 085f945b (Alter node form author to display formatted name instead of raw username.) which was introduced in 8.x-1.41 and adds the NodeHooks class. This class uses Drupal\node\Form\NodeForm. However, prior to Drupal 11.2, that class has a different namespace: Drupal\node\NodeForm. See: #3517871: NodeForm and NodeTypeForm have moved to the Drupal\node\Form namespace for the change record.
Issue fork helper-3584162
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
Comment #2
dave reidComment #3
dave reidHmmmm, I think I might need to start separating out a new branch of Helper that tracks only Drupal 11 then, I'm not immediately sure how to support this.
Comment #5
dave reidCan you please test out https://git.drupalcode.org/project/helper/-/merge_requests/78 to see if this resolves the issue for you? I'd be happy to commit and release if you can confirm.
Comment #6
jesss commentedThat MR works for me. Thank you!
Comment #8
dave reidComment #10
fransheska tula commentedWe tested the MR and can confirm that it is working as expected.
Comment #11
dave reidThanks all! I tagged the 8.x-1.47 release which has this fix.