Item14535: Error on save with MultiSaveContrib

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Extension
Component: MultiSaveContrib
Branches:
Reported By: LynnwoodBrown
Waiting For:
Last Change By: LynnwoodBrown
Installed on current version of Foswiki (2.1.4) with all plugins up-to-date. Created test using example code from documentation. On clicking save button, an error message was displayed in the topic which began with:
Error: error Can't locate object method "multi_param" via package "Foswiki::Contrib::JsonRpcContrib::Request" at /var/www/foswiki/lib/Foswiki/Contrib/MultiSaveContrib/Core.pm line 101. at /var/www/foswiki/lib/Foswiki/Contrib/MultiSaveContrib/Core.pm line 101. 

-- LynnwoodBrown - 20 Nov 2017

Revisiting this task after some time because I really needed to get MultiSaveContrib working. I found this related task Item14802 which contained a stop-gap fix which I wanted to show here in case someone needs it. Apply the following change to /lib/Foswiki/Contrib/JsonRpcContrib/Request.pm :
154c154
<     return unless $key;
---
>     return keys( %{$this->{data}{params}} ) unless $key;
164a165,170
> ##############################################################################
> sub multi_param {
>
>     my @list_of_params = param(@_);
>     return @list_of_params;
> }

This will return MultiSaveContrib to working order. I'm not checking in this change for now as it appears that this is only a partial fix.

-- Main.LynnwoodBrown - 09 Mar 2021 - 15:52
 
Topic revision: r3 - 09 Mar 2021, LynnwoodBrown
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