I am using quick-node-clone to clone content:

When I am cloning a content which content type has a webform attached as a field I get the following error message:

Drupal\Core\Database\InvalidQueryException: Query condition 'webform_submission.entity_id IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (Zeile 117 in ..web/core/lib/Drupal/Core/Database/Query/Condition.php).

After removing the exception on line 117 of Core/Database/Query/Condition.php I get the follwing error message (clone node -> preview):

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '))' at line 5: SELECT "base_table"."sid" AS "sid", "base_table"."sid" AS "base_table_sid" FROM "webform_submission" "base_table" INNER JOIN "webform_submission" "webform_submission" ON "webform_submission"."sid" = "base_table"."sid" WHERE ("webform_submission"."entity_type" IN (:db_condition_placeholder_0)) AND ("webform_submission"."entity_id" IN ()); Array ( [:db_condition_placeholder_0] => node ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 271 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

The problem:
AND ("webform_submission"."entity_id" IN ());

How can I solve this?
Who can help to write a patch?
Thank you.

Comments

drupalfan2 created an issue. See original summary.

drupalfan2’s picture

Status: Active » Closed (works as designed)

I am using the quick-node-clone module.
At /admin/config/quick-node-clone I use the exclude list to exclude exactly one field from my content type (to be not includes when my node is cloned) (exclude an entity reference filed that references commerce product).

kpaxman’s picture

Status: Closed (works as designed) » Active

The resolution above does not sound like "works as designed" - it sounds like the user found a workaround.

I am reopening this ticket because it seems this is happening to us as well, and we also use the Webform module. If I'm interpreting the above correctly, the solution was to exclude a field from being cloned, and that is not practical in our use case.

I see @drupalfan2 also filed #3259766: Query condition 'webform_submission.entity_id IN ()' cannot be empty against the Webform module - I have reopened that one too.

I will ask our developer who has reported this problem to provide more detail in this ticket.