You are here: Foswiki>Tasks Web>Item1890 (21 Aug 2009, PhilippLeufke)Edit Attach

Item1890: New actions created by CommentPlugin are not editable before topic has been saved once more --> solved! --> PluginsOrder...

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ActionTrackerPlugin, CommentPlugin
Branches:
Reported By: PhilippLeufke
Waiting For:
Last Change By: PhilippLeufke

Description

This bug is related to Item5570.

When creating new actions using an HTML form (e.g. using CommentPlugin), and not by editing the topic manually, then editing the action via the Edit button will result in an error:

Foswiki detected an internal error - 
please check your Foswiki logs and webserver logs for more information.

Can't call method "formatForEdit" on an undefined value

Additionally, the State field of the new action in the formatted table (ACTIONSEARCH...) only shows the state as text and not as drop down list.

When the topic gets saved once afterwards, either manually (edit, save) or by just toggling the State of another action, this behavior is gone.

Try it on your installation System/CommentPluginExamples#action

Analysis

I guess, the problem is caused by incomplete action definitions, most likely by the missing uid field, which gets automatically filled when saving the topic, but not, when adding a new action by the form.

Workarounds

  • Make the HTML form (CommentPlugin) invoke the same kind of saving procedure like normal topic saving (sound as fuzzy as my knowledge about this is...)
  • Make the Add action button invoke the submission of the comment and additionally start a edit/save cycle
  • ???

So somehow, we are back to the discussion in Item5570...


The one and only real solution

The solution is fairly easy; HolgerHain gave me the final hint:

You have to set the PluginsOrder in configure to CommentPlugin,ActionTrackerPlugin, so action tracker gets invoked after comment.

In my eyes this should be a default setting or at least this solution has to be documented. But the latter might lead to unnecessary conversations between users and the wiki admin. So I don't close this bug.

-- PhilippLeufke - 10 Aug 2009

OK, just realized that there actually is a hint on this in ActionTrackerPlugin:
Note that if you want to use the action template shipped with the Foswiki:Extensions.CommentPlugin to create actions,
then you must put the CommentPlugin before the ActionTrackerPlugin in the {PluginsOrder} configuration option. 

Maybe this part should be highlighted so?

Anyway, I'm closing this bug. -- PhilippLeufke - 21 Aug 2009

ItemTemplate edit

Summary New actions created by CommentPlugin are not editable before topic has been saved once more --> solved! --> PluginsOrder...
ReportedBy PhilippLeufke
Codebase 1.0.5
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component ActionTrackerPlugin, CommentPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r3 - 21 Aug 2009, PhilippLeufke
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