Add the violation only if the entity has the unique title enabled

Created on 7 March 2023, about 2 years ago
Updated 9 September 2023, over 1 year ago

Problem/Motivation

Content type with Unique Entity Title off can't be saved because the constraint validation on the field is always failing with the following error:
Warning: Undefined array key 0 in unique_entity_title/src/Plugin/Validation/Constraint/UniqueEntityTitleValidator.php on line 17

Proposed resolution

Check if the entity has the unique entity title enabled before adding the violation.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Alina Basarabeanu

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024