Problem/Motivation

After updating Drupal core from 11.2 to 11.3, Rabbit Hole triggers a fatal error on
taxonomy vocabulary forms, including the Forum module’s admin page at:

`/admin/structure/forum`

Error: Call to a member function getEntityTypeId() on null in rabbit_hole_form_alter()
(line 46 of modules/contrib/rabbit_hole/rabbit_hole.module)

Steps to reproduce

1. Install Forum module.
2. Update Drupal core to 11.3.
3. Visit /admin/structure/forum.
4. Observe fatal error.

Proposed resolution

Rabbit Hole should check for a NULL entity before accessing it.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 rabbit-hole-3572677-6-mr99.patch1.63 KBlangelhc
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

langelhc created an issue. See original summary.

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

souvik_banerjee’s picture

Status: Active » Needs review

I have added defensive code for NULL check, this code resolves the issue for me, please try at your end as well.

langelhc’s picture

Status: Needs review » Reviewed & tested by the community

Same here, it resolves the issue.

langelhc’s picture

StatusFileSize
new1.63 KB

For some reason Composer now cannot apply this patch from https://git.drupalcode.org/project/rabbit_hole/-/merge_requests/99.patch

anybody’s picture

Thanks for the fix, confirming RTBC.

We're experiencing a weird behaviour now, but I'm unsure if it's related. With rabbit_hole enabled the taxonomy term weight sorting page does not save anymore. All changes are discarded. I guess it happens since Drupal 11.3 upgrade, but I'm not sure.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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