- Issue created by @kubokura
- 🇳🇱Netherlands johnv
Please test again with new version 2.1.0 and report your findings.
@johnv, thank you for your response. Unfortunately the symptom is reproduced with version 2.1.0.
- 🇳🇱Netherlands johnv
Hmm, I wonder why this is note reported more often.
Perhaps it is the same problem as 🐛 Upgrading from 1.7 to 1.8 Active .At some point, the programmed History view was replaced by a View (with still a fallback to the programmed list.)
Do you have a customized History view?
Please check page admin/structure/views/view/workflow_entity_history - 🇨🇭Switzerland ayalon
I have no changes in the workflow_entity_history but If I try to load the history I get a fatal error. This error is also triggered if I open the view and add an example node in the context filter:
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in Arbeitsablaufentitätenverlauf[workflow_entity_history]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.force' in 'SELECT': SELECT "base"."hid" AS "hid", "base"."wid" AS "wid", "base"."langcode" AS "langcode", "base"."entity_type" AS "entity_type", "base"."entity_id" AS "entity_id", "base"."revision_id" AS "revision_id", "base"."field_name" AS "field_name", "base"."delta" AS "delta", "base"."uid" AS "uid", "base"."from_sid" AS "from_sid", "base"."to_sid" AS "to_sid", "base"."timestamp" AS "timestamp", "base"."comment" AS "comment", "base"."force" AS "force" FROM "workflow_transition_history" "base" WHERE "base"."hid" IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3); Array ( [:db_condition_placeholder_0] => 465 [:db_condition_placeholder_1] => 464 [:db_condition_placeholder_2] => 460 [:db_condition_placeholder_3] => 459 ) in main() (line 19 of index.php).
- 🇨🇭Switzerland ayalon
I have added a custom update hook in a custom module to fix it:
use Drupal\Core\Field\BaseFieldDefinition; /** * Add force field to workflow_transition entity. */ function my_module_update_9001() { $definition_update_manager = \Drupal::entityDefinitionUpdateManager(); // Create the field definition for the 'force' field $field_definition = BaseFieldDefinition::create('boolean') ->setLabel(t('Force transition')) ->setDescription(t('If this box is checked, the new state will be assigned even if workflow permissions disallow it.')) ->setDisplayOptions('form', [ 'type' => 'boolean_checkbox', ]) ->setDisplayConfigurable('form', FALSE); // Install the new field definition $definition_update_manager->installFieldStorageDefinition('force', 'workflow_transition', 'workflow', $field_definition); }
- 🇳🇱Netherlands johnv
I noticed the error in #7 already.
The field is now computed - it should not be saved.
Please try 2.1.1 - 🇳🇱Netherlands johnv
Please test v2.1.2 or v2.0.x-dev, run update.php, and report back.
@johnv, thank you for the update. Unfortunately the symptom is reproduced with version 2.1.2.