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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

delacosta456 created an issue. See original summary.

delacosta456’s picture

Version: 7.x-2.x-dev » 7.x-2.9
johnv’s picture

Title: Fields added to workflow are not saved when updating.. » Fields added to workflow are not saved when updating.
Priority: Major » Normal

I 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.

johnv’s picture

delacosta456’s picture

hi that patch is it not for Drupal 8 ?
Will it work for Drupal 7 ?

johnv’s picture

That patch is for D7. The Issue changed from D7 to D8.

johnv’s picture

Title: Fields added to workflow are not saved when updating. » Fields added to workflow are not saved when updating (D7)

We can also move that patch to this issue. It might be clearer.

delacosta456’s picture

ok 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

delacosta456’s picture

hi 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

johnv’s picture

I have little time to help you. Do you use latest dev version? There are 10 extra commits.

johnv’s picture

And please do #8 again after upgrading.

delacosta456’s picture

hi .. 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

delacosta456’s picture

hi 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.

johnv’s picture

Issue tags: +fieldable