Skip to content

Content Block field fails when nested inside Hyper field #263

@bavocorteville

Description

@bavocorteville

Describe the bug

Adding a Content Block field inside a Hyper field causes the field to fail to render and results in a database integrity constraint error.

Unable to render field - SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db`.`contentblocks`, CONSTRAINT `fk_jeczbydpsrpfsrailmjkkgphcudtxhzvbakc` FOREIGN KEY (`primaryOwnerId`) REFERENCES `elements` (`id`) ON DELETE CASCADE) The SQL being executed was: INSERT INTO `contentblocks` (`id`, `fieldId`, `primaryOwnerId`) VALUES (201596, 532, 1110947892) /var/www/html/vendor/yiisoft/yii2/db/Schema.php:676

Steps to reproduce

  1. Create a Hyper field containing a Content Block field.
  2. Use the field on an entry.

Craft CMS version

5.8.23

Plugin version

2.3.0

Multi-site?

No

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions