Closed (duplicate)
Project:
Workflow
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2009 at 16:36 UTC
Updated:
23 Nov 2011 at 19:02 UTC
I am having a strange issue with Workflow 1.1 for Drupal 6. On only the Workflow tab of the Triggers page the Actions assigned to any state change disappear after they are assigned. I know they are still there because if I attempt to reassign the same action I get a duplicate entry warning. I have been using Workflow with Drupal 5 for some time without a problem but this issue will now allow me to use Workflow with Drupal 6 because I am unable to unassign or review what actions are associated with each workflow trigger.
Any assistance would be greatly appreciated.
Comments
Comment #1
kepford commentedI am having a similar problem. When I try to assign an action to a trigger in the Workflow tab the action is not displayed on the trigger/workflow page.
user warning: Duplicate entry 'workflow-workflow-articulation_agreement--9' for key 1 query: INSERT INTO trigger_assignments values ('workflow', 'workflow-articulation_agreement-17', '9', 1) in /var/www/articulation.statecenter.com/modules/trigger/trigger.admin.inc on line 206.
Comment #2
kepford commentedI have been working on this issue for a couple of days and I think I know why the Trigger assignments are not showing up on the trigger/workflow page. When I assign an action to a trigger it is not displayed on the page but it does go into the database table "trigger_assignments". After trying this on a clean install and using the page content type I noticed that "op" column has the following syntax "workflow-page-1", "workflow-page-2", and so on. When I went back to my dev site site I saw that my "trigger_assignments" table column "op" was missing the number. Here is what my fields looked like "workflow-articulation_agreement-". The trailing number is cut off. This also explains another problem I was having with the triggers. All of my workflow triggers were being performed at once irregardless to the workflow state transition.
So, it appears the issue is in the length of your machine-readable name for your content type. Hopefully this is an easy fix for the developer. In the mean time you can change the machine name of your content types.
Comment #3
jvandyk commentedSee also http://drupal.org/node/309919
Comment #4
gagarine commented#294386: fields in drupal_trigger_assignments needs to be longer to support content types with long names
Comment #5
gagarine commentedComment #6
gagarine commented#2 "In the mean time you can change the machine name of your content types." I change the content type machine name but the old name is stile used..
Comment #7
gagarine commentedthe interface work great and reflect the status of the DB...
Comment #8
thilohaas commentedthe db column "op" is too short.
a short fix for actions on contenttypes with names shorter than ~40 characters could be:
execute this db statement on your drupal db:
/* 14:44:03 localhost */ ALTER TABLE `trigger_assignments` CHANGE `op` `op` varchar(46) NOT NULL DEFAULT '';
there should be a better way to do that, maybe split the content type and trigger action id in the db?
cheers
Comment #9
JaapB commentedsubscribing...
Comment #10
gravelpot commentedSubscribing
Comment #11
Bastlynn commentedRelated tickets:
#460554: Actions disappearing: op field in drupal_trigger_assignement is to short
#1062066: the OP field is too long for trigger_assignments table
#1062068: the OP field is too short for workflow module
#1078012: Content Type Machine Name Lenght Limit in Workflow Triggers
Issue to be addressed on: #585726: Length of machine readable name of content type may not exceed 21 for actions to perform in workflow
Comment #12
Bastlynn commentedEven with the move to use hooks in D7 for triggers, the length remains an issue (and may in fact just get worse with time). Truthfully - the field in triggers should be longer, but that's a change to get put into triggers, and may or may not take too long to get committed. In the meantime we can add something here with Workflow 7 (and backport to 6) to help people avoid hitting this error all the time.