Steps to reproduce

* Install Drupal 11
* Install and enable 'drupal/unique_field:2.x-dev@dev'
* create a user, set their permissions Designate fields as unique and Administer vocabularies and terms, log in with this user
* Edit vocabulary and set Term Parents(parent) in Unique Field restrictions
* Create a new Term in the UI

Expected behaviour

Creating a Term

Actual behaviour

The website encountered an unexpected error. Try again later.

Error: Call to a member function get() on null in unique_field_taxonomy_term_form_validate() (line 404 of modules/contrib/unique_field/unique_field.module).

Proposed resolution

Add the checks if the new Term has a parent

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

boddy created an issue. See original summary.

boddy’s picture

Assigned: Unassigned » boddy

boddy’s picture

Assigned: boddy » Unassigned
Status: Active » Needs review

Added the checking if the new Term has a parent. Fixed the warning if submitted values are not set.
Please review.

astonvictor’s picture

Status: Needs review » 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.

  • astonvictor committed 354e415a on 8.x-2.x authored by boddy
    fix: #3570736 Call to a member function get() on null in...
    

Status: Fixed » Closed (fixed)

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