Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294489

Workspace association does not work with entities with non-numeric IDs

$
0
0

Problem/Motivation

The workspace module assumes numeric ID for the entities for associating with a workspace in the workspace_association table. A non-numeric ID results in a Fatal error. E.g of a non-numeric ID - the Drupal\entityqueue\Entity\EntitySubqueue entity from the entityqueue module.

Steps to reproduce

  • Install vanilla Drupal.
  • Enable workspace module.
  • Install and enable drupal/entityqueue module.
  • Create a new entityqueue with "Queue type" as "Multiple subqueues".
  • Create a new workspace and switch to it.
  • Open the newly created entity queue -> click on "view subqueues" and click "+ Add subqueue".
  • Fill in the values and try to save.

Expected result: You should be able to add the subqueue.

Actual result: The following exception is thrown

Drupal\Core\Entity\EntityStorageException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'test' for column `db`.`workspace_association`.`target_entity_id` at row 1: INSERT INTO "workspace_association" ("workspace", "target_entity_revision_id", "target_entity_type_id", "target_entity_id") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => stage [:db_insert_placeholder_1] => 3 [:db_insert_placeholder_2] => entity_subqueue [:db_insert_placeholder_3] => test ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Proposed resolution

Adjust workspace association to accept non-numeric IDs.

Remaining tasks

TBD

User interface changes

None.

API changes

TBD

Data model changes

TBD


Viewing all articles
Browse latest Browse all 294489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>