Problem/Motivation

Notice: Undefined offset: 0 in Drupal\unique_entity_title\Plugin\Validation\Constraint\UniqueEntityTitleValidator->validate() (line 17 of modules/contrib/unique_entity_title/src/Plugin/Validation/Constraint/UniqueEntityTitleValidator.php).
Drupal\unique_entity_title\Plugin\Validation\Constraint\UniqueEntityTitleValidator->validate(Object, Object) (Line: 196)

Steps to reproduce

- create a new node
- deactivate the html5 validation of the title field
- leave the title field empty
- save the node
- error is displayed

Proposed resolution

ignore the validation of the title field if it is empty

Comments

pgshehata created an issue. See original summary.

pgshehata’s picture

j_s’s picture

I can confirm that #2 works for my use case.

nfriend’s picture

#2 Worked for me as well.

bbytyqi’s picture

Had to change the patch so it works on version 1.4.0.

i-trokhanenko’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
Assigned: pgshehata » i-trokhanenko

Thanks, I'll take a look and commit

  • i-trokhanenko committed de38f216 on 8.x-1.x
    Issue #3211815 by pgshehata, bbytyqi, joshuasosa, nfriend, i-trokhanenko...
i-trokhanenko’s picture

Assigned: i-trokhanenko » Unassigned
Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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