Error adding terms (null exception)

Created on 2 August 2023, over 1 year ago
Updated 4 August 2023, over 1 year ago

Problem/Motivation

Error: Call to a member function bundle() on null in private_taxonomy_taxonomy_term_access() (line 57 of /app/modules/contrib/private_taxonomy/private_taxonomy.module)

Steps to reproduce

1. Create a new content type with a taxonomy field.
2. Login as a non-admin user with permissions to create private taxonomy terms.
3. Attempt to use autocomplete form field to create new term.

Expected Result: terms would be created
Actual result: Error: Call to a member function bundle() on null in private_taxonomy_taxonomy_term_access() (line 57 of /app/modules/contrib/private_taxonomy/private_taxonomy.module)

Proposed resolution

After attempting to load the $term it should check if it was actually loaded.

See attached patch

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States realgt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024