After saving a workflow, we are redirected to page not found
The problem is the file workflow_admin_ui.module line 874
if ($state->state == '(creation)') {
must be
if ($state->state == t('(creation)')) {

CommentFileSizeAuthor
#7 enabled_modules.txt10.35 KBnor4a

Comments

nor4a’s picture

I got this problem when saving the workflow states.
I digget a bit deaper in the code and it seams that after saving the workflow - the workflow_states table column sysid values becomes to 0, but in the functions where the workflow is retrieved from the database - workflow_get_workflows() and workflow_get_workflows_by_wid() - the query is selecting the data from the database using WORKFLOW_CREATION define which is 1.

Also I tried to set up the transitions withoug a success - allways error pops up "Please give the author permission to go from (creation) to at least one state.

Weird bugs in stable module version :(

nancydru’s picture

Priority: Critical » Major

Modules are only as stable as the people who test them. This is why it is good to be checking out dev releases frequently.

nancydru’s picture

Do you have a hook_workflow_operations() that is translating the state names? Or is it translated in the database itself?

nancydru’s picture

Since I don't translate (I can barely handle English), would you, please, try changing that line to:

    if ($state->sid == $workflow->creation_state) {

Merci.

nor4a’s picture

Priority: Major » Critical

Did not helped for me. After saving Workflow states error: The requested page "/admin/config/workflow/workflow/1?render=overlay" could not be found.
The site does not use any multilingual modules - the only language - English.
I tried the latest DEV release - April 5.

nancydru’s picture

Priority: Critical » Major

To me, "critical" means "site down" - this is not the case, so please leave it at "major."

So, let's get some basics out of the way: what PHP, Drupal, OS?

For another issue, I did a clean install a couple of days ago and did not see this issue. That was Drupal 7.21 on PHP 5.3.13 under Windows 7.

Your error message indicates that this was the first workflow. Does it happen on a second workflow?

nor4a’s picture

StatusFileSize
new10.35 KB

I'm using WAMP with PHP 5.2.11
Drupal 7.21
Enabled modules - attached - open it as HTML as it contains the html table.

If I try to add another (the second) workflow - the same issue after saving the states table.

P.S. Basically I wanted just to send out the configurable email when administrator publishes the node. I thought that Workflow module can help with that, because it exports the workflow transitions to Rules.
I'll try the Revisioning module. Hope it will help while the Workflow module fix will rule out :)

nancydru’s picture

Note that when you define the states, you need to check the "active" box.

nancydru’s picture

I am still unable to reproduce this on a freshly built site.

So, those who are having the problem need to test this change:
In function workflow_admin_ui_overview_form_submit(), at the end:

  $form_state['redirect'] = "admin/config/workflow/workflow/$wid";
  menu_rebuild();
nor4a’s picture

Added the line - the same:
The requested page "/admin/config/workflow/workflow/1?render=overlay" could not be found.

crosstopher’s picture

I was getting this issue when I changed the name of the initial state from "(creation)" to anything else.
(I'd have to go into the DB and manually change the `sysid` value for the first row in `workflow_states` back to `1`)

If it is named "(creation)" then the "active" checkbox is properly inaccessible.
If we're really not supposed to touch that label field at all, it should probably be read-only.

I first noticed this after installing the 'workflow_extensions' module, but that could just be coincidence.

nancydru’s picture

@crosstopher: You are right. That field has now been disabled.

With the change in #4, the name should be less of a problem.

I use Workflow_Extensions, so that's probably not the issue, but to be safe, you should use the latest dev release of WE, because I alert him when I make changes.

Ace Cooper’s picture

Using the latest workflow-7.x-1.x-dev dated April 5, 2013 i'm getting the same error. I don't have any extra workflow submodules enabled.
After a workflow creation I changed the name of the first state (creation) and got a "Page not found" on the second save.
If I don't change the (creation) label - other items work as expected.

nancydru’s picture

With the dev that rolled out last night, you can't change the creation state name.

nancydru’s picture

Status: Active » Closed (fixed)

There's been no further reports, so I am closing this.

xdsl34’s picture

Status: Closed (fixed) » Active

I have the same issue,

If I create workflow without change the default first state -> (création) in french, I'm redirect to page not found.

Another problem is that workflow are saved in database but don't appear in UI and if I create another workflow with the same id I have SQL error SQLSTATE[23000]: Integrity constraint violation.

This code seems to fix the issue :

if ($state->state == '(creation)') {
must be
if ($state->state == t('(creation)')) {

Edit :I can't change the default first state -> (création) by (creation) or by another label, (création) is always sent.

thedut’s picture

Same problem, solved by #16.
Note : into the workflow_admin_ui.module file on line 555 (the workflow_admin_ui_transitions_form_validate() fonction), the line :
array('%creation' => '(creation)')));
should be replaced by
array('%creation' => t('(creation)'))));
to !
I have checked the whole workflow module code, there is no other issue with the untranslated '(creation)' string.

xdsl34’s picture

#16 and #17 seem to solve the problem if you don't modify the default first state :

  1. Create workflow "Test"
  2. Set or not any options
  3. Save options
  4. Change the default first state (création) by création (or other)
  5. Save workflow
  6. OK we stay on workflow's edit form
  7. Save another time
  8. KO, we are redirected on page not found
nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

Is anybody running into this with the latest dev code?

nancydru’s picture

A colleague ran into this and tested with the dev release and it was fixed.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.