Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi
Fields added to workflow are not saved when updating the workflow on workflow tab.
to reproduice :
1- add a fields to workflow bundle under workflow_comment.
2- on Node type add the workflow field and configure by checking the box "Hide the widget on Entity form"
3- Create a node and save
4- on workflow tab , write in comment_field and in your created field and update workflow
comment_field saved but the created field doesn't (not found in database)
Comment | File | Size | Author |
---|---|---|---|
#9 | workflow_entity_reference_error.png | 128.8 KB | delacosta456 |
#8 | par défaut 2017-01-15 à 22.50.30.png | 77.47 KB | delacosta456 |
Comments
Comment #2
delacosta456 CreditAttribution: delacosta456 commentedComment #3
johnvI have been working on that in the past. See #1559680-13: Make Transitions fieldable entities and the surrounding comments 10-14 and 27-30.
Please apply and test patch in #30.
Comment #4
johnvComment #5
delacosta456 CreditAttribution: delacosta456 commentedhi that patch is it not for Drupal 8 ?
Will it work for Drupal 7 ?
Comment #6
johnvThat patch is for D7. The Issue changed from D7 to D8.
Comment #7
johnvWe can also move that patch to this issue. It might be clearer.
Comment #8
delacosta456 CreditAttribution: delacosta456 commentedok nice thanks
.. i just applied the patch and lt saved now. (at least for core field i tried, i will try others later)
but just after saving a node that has settings "Hide the widget on Entity form" , before going to the history tab to update ) there is this Notice
Notice: Undefined index: workflow in WorkflowTransitionForm->getTransition() (line 727 of /Applications/MAMP/htdocs/sergytest/sites/all/modules/workflow/includes/Form/WorkflowTransitionForm.php).
see the attached image please
Comment #9
delacosta456 CreditAttribution: delacosta456 commentedhi johnv
FOR ENTITYREFENCE FIELD ADDED TO WORKFLOW BUNDLE THERE IS ERROR
PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'entities' for column 'delta' at row 1: INSERT INTO {field_data_field_refencelop} (entity_type, entity_id, revision_id, bundle, delta, language, field_refencelop_target_id) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => WorkflowTransition [:db_insert_placeholder_1] => 17 [:db_insert_placeholder_2] => 17 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => entities [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => ) in field_sql_storage_field_storage_write() (line 514 of /Applications/MAMP/htdocs/sergytest/modules/field/modules/field_sql_storage/field_sql_storage.module)
Pease see attached files
Comment #10
johnvI have little time to help you. Do you use latest dev version? There are 10 extra commits.
Comment #11
johnvAnd please do #8 again after upgrading.
Comment #12
delacosta456 CreditAttribution: delacosta456 commentedhi .. yes i am on the latest dev of Workflow downloaded yesterday
And for more issue notification
the core field added is not available in view
Comment #13
delacosta456 CreditAttribution: delacosta456 commentedhi ok @johnv hope the below experience will help you when ready.....
- i reinstall again latest dev on a new Drupal 7
- i re-apply patch #30
At this step : Saving core fields worked but not others .. and BOTH ERRORS #9 here still appear. When i was trying, For Entity referenced field added on workflow bundled i use both "Autocomplete widget" and "Inline Entity Form widget (Inline Entity Form modue)"
Then..
- i reverted from patch #30 to original
- i apply patch #13
And at this step TOO : Saving core fields worked but not others .. and BOTH ERRORS #9 here still appear. AND HERE TOO When i was trying, For Entity referenced field added on workflow bundled i use both "Autocomplete widget" and "Inline Entity Form widget (Inline Entity Form modue)"
Then...
- As said @ericniaina in this post #comment-10999903, WITHOUT REVERTING the patch #13 i change
$form_state['input'] to $form_state['values'];
on line 563 ( FOR ME , 565) (IN THE FILE ... sites/all/modules/workflow/includes/Form/WorkflowTransitionForm.php)At this step AGAIN : Saving core fields worked.
******BUT HERE When i was trying, For Entity referenced field added on workflow bundled i use both "Autocomplete widget" IT WORKS. ( ONLY NOTICE mentioned #9 here still appear. ). -- And magically in WORKFLOW Views UI , adding relationship of this Entity reference field (autocomplete) AUTOMATICALLY MADE AVAILABLE CORE FIELDS PRESENT IN THE WORKFLOW BUNDLE
****** "Inline Entity Form widget (Inline Entity Form modue)" DOESN'T WORK.
and BOTH ERRORS #9 here still appear. RELATION BROKEN IN VIEW.
Comment #14
johnv