When attaching a sub queue to a node using an entity reference form. Existing sub queues can be attached no problem however creating a sub queue inline results in

'General error: 1364 Field 'name' doesn't have a default value'

Looks like the inline entity form isn't setting the machine name of the sub queue.

CommentFileSizeAuthor
#5 3054945-followup.patch1.49 KBamateescu
#3 3054945.patch12.27 KBamateescu

Comments

scotthooker created an issue. See original summary.

amateescu’s picture

Status: Active » Fixed

I thought I fixed this in #2946694: 'name' empty when using inline_entity_form widget but apparently IEF only works with the fields defined in the entity form display, so we really need the machine name widget from #2685749: Add a 'machine_name' widget for string field types with a UniqueField constraint.

Until that issue gets committed to core, we'll have to copy its code :)

amateescu’s picture

StatusFileSize
new12.27 KB

Oops, here's the patch that was committed.

  • amateescu committed cca7181 on 8.x-1.x
    Issue #3054945 by amateescu: Machine name not set when using sub queue...
amateescu’s picture

StatusFileSize
new1.49 KB

And a followup patch to fix things :)

  • amateescu committed f9f56c7 on 8.x-1.x
    Issue #3054945 followup by amateescu: Machine name not set when using...

  • amateescu committed 17a4aec on 8.x-1.x
    Revert "Issue #3054945 followup by amateescu: Machine name not set when...
  • amateescu committed e620821 on 8.x-1.x
    Revert "Issue #3054945 by amateescu: Machine name not set when using sub...
amateescu’s picture

Status: Fixed » Active

After more testing, things are still not working properly with the new machine name widget, so reverted both patches for now and released beta5.

jcandan’s picture

This is an issue also reported in #3478759: Entityqueue entity fails to import, which uses Default Content.

I am also getting this error when attempting to import and entity_subqueue via Default Content:

In ExceptionHandler.php line 45:

SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value: INSERT INTO "entity_subqueue" ("revision_id", "queue", "uuid", "langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array 
(
      [:db_insert_placeholder_0] =>
      [:db_insert_placeholder_1] => my_entity_subqueue
      [:db_insert_placeholder_2] => c3655edc-a41b-42bd-bf82-5cbc92268c67
      [:db_insert_placeholder_3] => en
  )

In StatementWrapperIterator.php line 113:

SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value