Item11419: Can't save topic content on topic under workflow control

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WorkflowPlugin
Branches: trunk
Reported By: MichaelLorenzen
Waiting For:
Last Change By: BertoldAltaner
I'm using foswiki 1.1.4 with WorkFlowPlugin 1.12.2.

I can't save the topic content, if a workflow history is present (after clicking the change state button once).

Steps to reproduce:
  1. Create a new topic and put it under workflow control.
  2. Add some content.
  3. Change the state of the topic.
  4. Try to add or change the topic.

In my case on step 4 I get a new date stamp in the txt file, but content does not change.

Apache error logs, and foswiki's error.log show no error.

-- MichaelLorenzen - 09 Jan 2012

Just found the cause:

I missed the last "|" on my workflowhistoryformat, it looked like this:
   * Set WORKFLOWHISTORYFORMAT = | $state | $wikiusername | $date | $n 

I think, the new code in the plugin (wrt http://foswiki.org/Tasks/Item8002) got a hickup on this.

changed priority to low

-- MichaelLorenzen - 09 Jan 2012

Michael, please post your workflow definition. Maybe the problem is in the Allow Edit column of the current state.

-- GilmarSantosJr - 09 Jan 2012

I'll post the definition tomorrow, when I'm back at work.

But the adding the "|" behind the "$n" in WORKFLOWHISTORYFORMAT fixed it already.

-- MichaelLorenzen - 09 Jan 2012

I'm having the same problem with this but the WORKFLOWHISTORYFORMAT is not the problem with us. Mine looked like
  • Set WORKFLOWHISTORYFORMAT = " * $state, $date"
and I changed it to look like a table with no effect.

It appears to be a problem in one of my webs and not the others. One difference in this web is we allow only a certain group to view it (not sure if this makes a difference).

After disabling WorkFlow, still didn't work until I deleted the Workflow MetaData from the file.

We're also running 1.1.4 and it started just after upgrading.

-- JoeMarandola - 09 Jan 2012

Well, after some new testing the bug hit us again, too: We can't save any content after doing one save (either by hitting change status or by saving new content).

We allow everybody to view the content, but only some groups to change it (Inherited from parent web). Removing the access controls did not change anything.

Settings in WebPreferences:
   * Set WORKFLOW = WorkFlowWinter2011
   * Set WORKFLOWHISTORYFORMAT = | $state | $wikiusername | $date | $n |

WorkFlowWinter2011:

| *State* | *Allow Edit* | *Message* |
| KEINE_INFO | IVUplanFahrplanerGroup, IVUplanZentraleGroup | Für diese Linie liegen keine Fahrplandaten vor |
| ZUR_BEARBEITUNG | IVUplanFahrplanerGroup, IVUplanZentraleGroup | Änderungen liegen vor |
| IN_BEARBEITUNG | IVUplanZentraleGroup | Linie wird bearbeitet |
| RUECKFRAGE | IVUplanFahrplanerGroup, IVUplanZentraleGroup | Fahrplaninformationen sind nicht vollständig |
| ZUR_FREIGABE | IVUplanFahrplanerGroup, IVUplanZentraleGroup | Linie ist bearbeitet - Warten auf Freigabe |
| DRUCKREIF | IVUplanFahrplanerGroup, IVUplanZentraleGroup | Linienbearbeitung abgschlossen |
| DOWNLOAD | IVUplanZentraleGroup | Fahrplan ist zum Download bereitgestellt |
| AUSKUNFT | IVUplanZentraleGroup | Fahrplan ist in Auskunft eingestellt |
| FERTIG | IVUplanZentraleGroup | Fahrplan ist in Auskunft und Download eingestellt |
 

| *State* | *Action* | *Next State* | *Allowed* | *Form* | *Notify* |
| KEINE_INFO | Fahrplanänderungen gemeldet | ZUR_BEARBEITUNG | IVUplanFahrplanerGroup, IVUplanZentraleGroup | | |
| ZUR_BEARBEITUNG | Linie bearbeiten | IN_BEARBEITUNG | IVUplanZentraleGroup | | |
| IN_BEARBEITUNG | Rückfrage stellen | RUECKFRAGE |  IVUplanZentraleGroup | | |
| IN_BEARBEITUNG | Zur Freigabe bereitstellen | ZUR_FREIGABE |  IVUplanZentraleGroup | | |
| RUECKFRAGE | Rückfrage beantwortet | ZUR_BEARBEITUNG | IVUplanFahrplanerGroup, IVUplanZentraleGroup | | |
| RUECKFRAGE | Linie bearbeiten | IN_BEARBEITUNG | IVUplanZentraleGroup | | |
| ZUR_FREIGABE | Korrekturen gemeldet | ZUR_BEARBEITUNG |  IVUplanZentraleGroup, IVUplanFahrplanerGroup | | |
| ZUR_FREIGABE | Druckfreigabe erteilen | DRUCKREIF |  IVUplanZentraleGroup, IVUplanFahrplanerGroup | | |
| DRUCKREIF | In Download eingestellt | DOWNLOAD | IVUplanZentraleGroup | | |
| DRUCKREIF | In Auskunft übernommen | AUSKUNFT | IVUplanAuskunftGroup | | |
| DRUCKREIF | Fertiggestellt (keine Kundeninformation notwendig) | FERTIG | IVUplanZentraleGroup | | |
| DRUCKREIF | Neue Änderungen eingetragen | ZUR_BEARBEITUNG | IVUplanZentraleGroup | | |
| AUSKUNFT | In Download eingestellt | FERTIG | IVUplanZentraleGroup | | |
| AUSKUNFT | Neue Änderungen eingetragen | ZUR_BEARBEITUNG | IVUplanZentraleGroup, IVUplanFahrplanerGroup | | |
| DOWNLOAD | In Auskunft übernommen | FERTIG | IVUplanAuskunftGroup | | |
| DOWNLOAD | Fertiggestellt (keine Kundeninformation notwendig) | FERTIG | IVUplanAuskunftGroup | | |
| DOWNLOAD | Neue Änderungen eingetragen | ZUR_BEARBEITUNG | IVUplanZentraleGroup, IVUplanFahrplanerGroup | | |
| FERTIG | Neue Änderungen eingetragen | ZUR_BEARBEITUNG | IVUplanZentraleGroup, IVUplanFahrplanerGroup | | |
 

Setting priority back to normal.

-- MichaelLorenzen - 10 Jan 2012

Just found another hint: I can change contents, if I use another account. So I can work on a topic by switching accounts all the time.

-- MichaelLorenzen - 10 Jan 2012

It seems there's a secondary call to save() in the afterSaveHandler that reverts the primary save.

This is a caching error: a controlledTopic object is cached loaded with the topic revision before the save happens which is then retrieved during afterSaveHandler and then saved again thus reverting any save that might have happened.

Please have a try using this workflowplugin.patch.

-- MichaelDaum - 11 Jan 2012

patch does not like the revison variable (see below), but saving multiple times and changing workflow states is working here.

 our $VERSION = '$Rev$';
-our $RELEASE = '1.12.3';
+our $RELEASE = '1.12.4';

Thanks for your support!

-- MichaelLorenzen - 11 Jan 2012

same here, patch seems to work - foswiki with workflowplugin enabled, works, but following error-message occured:

--- lib/Foswiki/Plugins/WorkflowPlugin.pm       (revision 13603)
+++ lib/Foswiki/Plugins/WorkflowPlugin.pm       (working copy)
@@ -20,7 +20,7 @@
 use Foswiki::Sandbox                                  ();
 our $VERSION = '$Rev$';
-our $RELEASE = '1.12.3';
+our $RELEASE = '1.12.4';
 our $SHORTDESCRIPTION =
 'Associate a "state" with a topic and then control the work flow that the topic progresses through as content is added.';
 our $NO_PREFS_IN_TOPIC = 1;

-- BertoldAltaner - 11 Jan 2012

Released to the wild.

-- MichaelDaum - 11 Jan 2012

Works - foswiki is still running... Thanks!

-- BertoldAltaner - 11 Jan 2012
 

I Attachment Action Size Date Who Comment
workflowplugin.patchpatch workflowplugin.patch manage 3 K 11 Jan 2012 - 09:24 MichaelDaum  
Topic revision: r15 - 11 Jan 2012, BertoldAltaner
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy