We've been running into a recurring issue where it appears that the helper function `_term_reference_tree_output_list_level` does not have sufficient checks in place to prevent error conditions, such as:
Error: Call to a member function toUrl() on null in _term_reference_tree_output_list_level()

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

michael_wojcik created an issue. See original summary.

michael_wojcik’s picture

Assigned: michael_wojcik » Unassigned
Status: Active » Needs review
StatusFileSize
new3.45 KB

Submitting a patch to fix error message as well as clean up some PHP class usage coding standards issues.

jonraedeke’s picture

Thanks Michael,

I ran into this error and your patch works for me.

broeker’s picture

We have a content type with several Term Reference Tree fields. Today I added a new entity reference field to the content type (unrelated to term tree/taxonomies) and this error manifests on node view after saving with my new field in place. This patch fixes the issue.

letrollpoilu’s picture

I had this issue on cron, and with this patch I don't have the issue anymore.

jaydub’s picture

It would appear that this issue has been resolved from a commit from another issue: #3141878: Automated Drupal Rector fixes.

The commit: https://git.drupalcode.org/project/term_reference_tree/-/commit/ffc6b85b... has the changes in this patch among other items.

wagu’s picture

StatusFileSize
new2.24 KB
wagu’s picture

wagu’s picture

wagu’s picture

wagu’s picture

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

wagu’s picture

StatusFileSize
new2.24 KB
msypes’s picture

I was not able to apply either of the existing patches. I'll try uploading a new one.

msypes’s picture

crutch’s picture

#15 fixed this issue on latest dev thank you

jonraedeke’s picture

Status: Needs review » Reviewed & tested by the community

This is still an issue. Patch from #15 works for me!

  • VladimirAus committed 5a57ee19 on 8.x-1.x authored by msypes
    Issue #3071428 by wguesmi09, michael_wojcik, msypes, julienjoye,...
vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your help! Committed! 🥃

Status: Fixed » Closed (fixed)

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