Item8400: can't edit an action

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ActionTrackerPlugin
Branches:
Reported By: MichaelDaum
Waiting For: Main.CrawfordCurrie
Last Change By: MichaelDaum
When I click on the "edit" link on the plugin's topic the plugin crashes with an error message:

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

First thing in the logs:

Use of uninitialized value in string eq at lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm line 362

And then further down it crashes with

Can't call method "formatForEdit" on an undefined value at lib/Foswiki/Plugins/ActionTrackerPlugin.pm line 255

There's a strange call to ActionSet::add() May I assume that the $action argument to add() is an object and not a text block? If so then the call at ActionSet::add() in line 89 ... ->add($block) is wrong as it pushes a non-object onto the ACTIONS stack. It seems quite different from the call 4 lines above which creates an Action object that is then passed to add()

The code at splitOnAction() traverses the registered ACTIONS and fetches each item on the stack, one of which is a scalar piece of text now. The following code does expect an object but then fails.

-- MichaelDaum - 20 Jan 2010

This only affects actions created without uids (a rare case) and possibly is related to the two actions in a verbatim block on the same page.

Fixed

-- CrawfordCurrie - 20 Jan 2010

These actions without uid occur when you use the CommentPlugin to create actions and you have not followed the installation advice which tells the installer to ensure that CommentPlugin runs before ActionTrackerPlugin.

A typical {PluginsOrder} setting should be TWikiCompatibilityPlugin,SpreadSheetPlugin,CommentPlugin,ActionTrackerPlugin in case you use ActionTrackerPlugin.

It is documented in the "Plugin Installation Instructions in the ActionTrackerPlugin topic right at the bottom.

Good that the code becomes able to cope with these errors.

-- KennethLavrsen - 22 Jan 2010

also happened with the tuned plugins order. fixed now.

-- MichaelDaum - 23 Jan 2010
 
Topic revision: r6 - 23 Jan 2010, MichaelDaum
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