The main content type on my site uses a workflow field. I'm using Features module to migrate updates between DEV on LIVE site. I temporarily disabled module on site and when I re-enabled the feature site was broken. I eventually discovered the issue is the workflow associated with the field was removed and then added back with all new WID/SIDs causing the workflow field to be broken rendering content on site dead

I'm totally at a loss on how to resolve. I've read conflicting information that says this issue has been resolved. That workflows are exported using machine names to prevent this but it doesn't appear that this is the case in practice. Any information or help would be greatly appreciated.

Comments

Kcannick created an issue. See original summary.

johnv’s picture

The export of workflows and states use machine names.
The export of the workflow field still uses an ID to refer to the workflow.

Try to check the workflow field settings and save it again.

Kcannick’s picture

Ok. This appears to be the issue. Not sure the best way to proceed as I already have content on site (800+ nodes) which has original workflow's SID saved in field. Also noticed this has affected views on the site that used workflow filter.

Should I edit database to try to fix issue. I'm guessing that i could convert value of old SID/WIDs saved in DB for existing content to new workflow to correct

johnv’s picture

It also affects Rules.
You are in trouble...

Kcannick’s picture

I was able to get my site back operational by editing workflow tables in database to their original values. This is the 3rd time I've had this issue and I really can't figure out how to properly use workflow with features to avoid this.

Should I decouple workflows from feature export and do everything manually related to workflow on production site?

johnv’s picture

Is there a reason you disable the feature every time?
Can you list the tables you changed?

You can separate the WorkflowField from the Workflow/State/Transition feature, by unchecking boxes. (I guess the workflowField is automatically added to the relevant content type, and cannot be decoupled from that..)

Kcannick’s picture

I'm not disabling it every time. I previously disabled the feature it is associated with when we wanted to remove a specific functionality from the site while we worked on some improvements to it. I just accidentally disabled it this time.

Just out of curiosity could the Stated ID be made relative to workflow as to store SID as integer for field value but use machine name for selection of the workflow ID associated with the field

johnv’s picture

I am not sure if I understand your problem, but until now we could not find a way to save the machine name of workflow in workflow field.

johnv’s picture