You are here: Foswiki>Tasks Web>Item966 (20 Sep 2009, KennethLavrsen)Edit Attach

Item966: configure fails with parse error if a Config.spec file has a PERL EXPERT section

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.7
Target Release: patch
Applies To: Engine
Component: configure
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: KennethLavrsen
In GenPDFAddOn, I added the following specification:

# ---+ Extensions
# ---++ GenPDFAddOn
# **PATH M**
# Path to the htmldoc executable.
$Foswiki::cfg{Extensions}{GenPDFAddOn}{htmldocCmd} = '/path/to/htmldoc/bin/htmldoc';
# **PERL EXPERT**
# This setting is required to enable executing genpdf script from the bin directory
$Foswiki::cfg{SwitchBoard}{genpdf} =  [ 'Foswiki::Contrib::GenPDF', 'viewPDF' ];

Clicking "Next" on configure, with expert mode disabled, the following error is generated:

Parse of structured value failed at: (0x8c79448)
Please go back and check it. at /var/www/foswiki100/lib/Foswiki/Configure/Types/PERL.pm line 70.

However if the "Yes, I've read all of the documentation" button is pressed to enable expert mode, then the "Next" action works without errors.

-- GeorgeClark

Elevated to urgent

I just ran into the same thing so if it happens twice it will happen again and again.

It is also shitty how the error is reported. The end user has no chance in this world to know which parameter that failed. The name of the setting should be in the error message so the user has a chance to fix it.

-- KennethLavrsen - 18 Sep 2009

Note that as a workaround to the EXPERT mode, consider "H" - to hide the parameter completely.

# **PERL H**
# This setting is required to enable executing genpdf script from the bin directory
$Foswiki::cfg{SwitchBoard}{genpdf} =  [ 'Foswiki::Contrib::GenPDF', 'viewPDF' ];

-- GeorgeClark - 18 Sep 2009

When generating a string representation of a value for passing in the form parameters, CGI was serializing a perl data structure as a string; need to expand to a Data::Dumper of that string instead, otherwise we'll get a parse error on the value when re-expanding it during change confirmation.

Fixed on Release01x00. Problem does not manifest on trunk.

-- CrawfordCurrie - 19 Sep 2009

ItemTemplate edit

Summary configure fails with parse error if a Config.spec file has a PERL EXPERT section
ReportedBy GeorgeClark
Codebase 1.0.0
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component configure
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:abfa554ba9cd distro:1632abc1d817
TargetRelease patch
ReleasedIn 1.0.7
Topic revision: r8 - 20 Sep 2009, KennethLavrsen
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