Item10912: Missing name parameter kills FormPlugin, no syntax error.

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: FormPlugin
Branches:
Reported By: AaronFuleki
Waiting For:
Last Change By: ArthurClemens
Several forms started to 500 after I upgraded our test wiki to FW 1.1.3 and FormPlugin 2.0.3. After some digging, it turned out to be FORMELEMENT macros missing the required name parameter.

This issue doesn't effect our production server (FW 1.1.2 and FormPlugin 1.6.2). For instance, FORMELEMENT macros of type submit, without a name parameter, seem to work fine. No error in the logs, and the rendered HTML has name = "submit" right there, so something automagical must be going on in the old version. A lot of stuff was rewritten, so that is probably gone (for the better, I'm sure).

Preferably, missing/invalid arguments should raise an exception and display something useful in the browser, rather than dying.

Error Log Output

[Mon Jun 20 16:07:00 2011] [error] [client] [Mon Jun 20 16:07:00 2011] view: Use of uninitialized value in concatenation (.) or string at /usr/local/htdocs/foswiki/lib/Foswiki/Plugins/FormPlugin/Renderer/Html/FieldFactory.pm line 22.
[Mon Jun 20 16:07:00 2011] [error] [client] Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : Could not create field of type .
[Mon Jun 20 16:07:00 2011] [error] [client]  at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314
[Mon Jun 20 16:07:00 2011] [error] [client] \tCGI::Carp::realdie('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : ...') called at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 385
[Mon Jun 20 16:07:00 2011] [error] [client] \tCGI::Carp::die('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : ...') called at /usr/local/htdocs/foswiki/lib/Foswiki/Plugins/FormPlugin/Renderer/Html/FieldFactory.pm line 22
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory::getField('undef') called at /usr/local/htdocs/foswiki/lib/Foswiki/Plugins/FormPlugin/Renderer/Html/FieldRenderer.pm line 41
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Plugins::FormPlugin::Renderer::Html::FieldRenderer::render('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldRenderer=H...', 'HASH(0xa4a263c)', 'Foswiki::Plugins::FormPlugin::FormData=HASH(0xa364418)') called at /usr/local/htdocs/foswiki/lib/Foswiki/Plugins/FormPlugin.pm line 309
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Plugins::FormPlugin::_formElement('Foswiki=HASH(0x8ef28c0)', 'Foswiki::Attrs=HASH(0xa4a2684)', 'BreakHousingFormCreatorAdmin', 'BreakHousing', 'Foswiki::Meta=HASH(0x9cf5210)') called at /usr/local/htdocs/foswiki/lib/Foswiki/Func.pm line 570
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Func::__ANON__('Foswiki=HASH(0x8ef28c0)', 'Foswiki::Attrs=HASH(0xa4a2684)', 'Foswiki::Meta=HASH(0x9cf5210)') called at /usr/local/htdocs/foswiki/lib/Foswiki.pm line 3037
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::_expandMacroOnTopicRendering('Foswiki=HASH(0x8ef28c0)', 'FORMELEMENT', '\\x{a}format=" $e...', 'Foswiki::Meta=HASH(0x9cf5210)') called at /usr/local/htdocs/foswiki/lib/Foswiki.pm line 2927
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::_processMacros('Foswiki=HASH(0x8ef28c0)', '---+!! Submit a break housing application [Administrator Mode...', 'CODE(0x8e70638)', 'Foswiki::Meta=HASH(0x9cf5210)', 16) called at /usr/local/htdocs/foswiki/lib/Foswiki.pm line 2724
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::innerExpandMacros('Foswiki=HASH(0x8ef28c0)', 'SCALAR(0x9e5142c)', 'Foswiki::Meta=HASH(0x9cf5210)') called at /usr/local/htdocs/foswiki/lib/Foswiki.pm line 3214
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::expandMacros('Foswiki=HASH(0x8ef28c0)', '---+!! Submit a break housing application [Administrator Mode...', 'Foswiki::Meta=HASH(0x9cf5210)') called at /usr/local/htdocs/foswiki/lib/Foswiki/Meta.pm line 3100
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x9cf5210)', '---+!! Submit a break housing application [Administrator Mode...') called at /usr/local/htdocs/foswiki/lib/Foswiki/UI/View.pm line 400
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::UI::View::_prepare('---+!! Submit a break housing application [Administrator Mode...', 'Foswiki::Meta=HASH(0x9cf5210)', 0) called at /usr/local/htdocs/foswiki/lib/Foswiki/UI/View.pm line 380
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::UI::View::view('Foswiki=HASH(0x8ef28c0)') called at /usr/local/htdocs/foswiki/lib/Foswiki/UI.pm line 316
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 415
[Mon Jun 20 16:07:00 2011] [error] [client] \teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/Error.pm line 407
[Mon Jun 20 16:07:00 2011] [error] [client] \tError::subs::try('CODE(0x8ddd1a4)', 'HASH(0x8ef2668)') called at /usr/local/htdocs/foswiki/lib/Foswiki/UI.pm line 435
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::UI::_execute('Foswiki::Request=HASH(0x8eb8f94)', 'CODE(0x8eb8cac)', 'view', 1) called at /usr/local/htdocs/foswiki/lib/Foswiki/UI.pm line 277
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0x8eb8f94)') called at /usr/local/htdocs/foswiki/lib/Foswiki/Engine/CGI.pm line 37
[Mon Jun 20 16:07:00 2011] [error] [client] \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x897266c)') called at /usr/local/htdocs/foswiki/bin/view line 24.

-- AaronFuleki - 22 Jun 2011

Confirmed. Fixed in version 2.0.4.

-- ArthurClemens - 22 Jun 2011

 

ItemTemplate edit

Summary Missing name parameter kills FormPlugin, no syntax error.
ReportedBy AaronFuleki
Codebase 1.1.3
SVN Range
AppliesTo Extension
Component FormPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins FormPlugin:9c8365c7c648
TargetRelease n/a
ReleasedIn n/a
Topic revision: r2 - 22 Jun 2011, ArthurClemens
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