When using this module on a field in a paragraph entity, the following error appears when saving and validation is supposed to fail:

Notice: Undefined property: ParagraphsItemEntity::$type in EntityReferenceFieldBehaviorUnique->validate() (line 15 of .../sites/all/modules/contrib/entityreference_unique/plugins/behavior/EntityReferenceFieldBehaviorUnique.class.php).

The reason is that the paragraphs entity has no 'type' property for defining the bundle, but instead has a 'bundle' property.

Patch follows.

Comments

lennartvv created an issue. See original summary.

fernly’s picture

Assigned: fernly » Unassigned
Status: Active » Needs review
StatusFileSize
new976 bytes

This patch should solve this issue.

rosk0’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
StatusFileSize
new1.67 KB

Proper issue fix.