This is not really a bug, but rather a limitation. When setting up Triggers I just ran into this issue. I had a user create a Content Type with a machine name of "kindergarten_preschool" which seemed reasonable at the time. The issue is that in Workflow triggers there is a "workflow-" tacked on to the front of "kindergarten_preschool" and a "-##" trigger number tacked on to the end of "kindergarten_preschool". This results in an Operation of "workflow-kindergarten_preschool-##" which winds up being 34 characters. The database field unfortuntely is definded as varchar(32). Attempting to assign a trigger will result in no error messages leaving you wondering what just happened. I finally discovered that it was logging an error in the Reports and discovered it was attempting to write a duplicate element in the database. Looking in the database I discovered this limitation.
Solution: do not use Content Type Machine names that are long. Keeping in mind what is being tacked on to it in the Triggers.
Steve
Comments
Comment #1
selfuntitled commentedI just ran into this issue as well and I'd go as far as to suggest that this is a bug in the UI. I just spent half an hour trying to figure out why I couldn't assign an action to a trigger. Feels like it should be straight-forward to add a length check to the content type machine name and provide a warning if it will fail. I can take a look at writing a patch in the next few weeks.
Comment #2
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