Item10811: "FieldFactory" error breaks FormPlugin

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: FormPlugin
Branches:
Reported By: PhilippLeufke
Waiting For:
Last Change By: ArthurClemens
This is a fork of Item10730, where it was assumed, that this bug was assumed to be a part of various problems with the debian packages, but as it seems, it is not!

I took the latest official foswiki tar.gz, installed it and only added FormPlugin. As soon, as I try to access a topic containing a form, e.g. System/FormPlugin, I get the browser error message:

Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : Could not create field of type text.

and an error in the apache2 error.log:
[Tue May 31 15:00:58 2011] [error] [client ] Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : Could not create field of type text., referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ]  at /usr/share/perl5/CGI/Carp.pm line 354, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tCGI::Carp::realdie('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : ...') called at /usr/share/perl5/CGI/Carp.pm line 439, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tCGI::Carp::die('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory : ...') called at /var/www/foswiki/lib/Foswiki/Plugins/FormPlugin/Renderer/Html/FieldFactory.pm line 22, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Plugins::FormPlugin::Renderer::Html::FieldFactory::getField('text') called at /var/www/foswiki/lib/Foswiki/Plugins/FormPlugin/Renderer/Html/FieldRenderer.pm line 41, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Plugins::FormPlugin::Renderer::Html::FieldRenderer::render('Foswiki::Plugins::FormPlugin::Renderer::Html::FieldRenderer=H...', 'Foswiki::Plugins::FormPlugin::FieldData=HASH(0x1d31ab8)', 'Foswiki::Plugins::FormPlugin::FormData=HASH(0x1be5308)') called at /var/www/foswiki/lib/Foswiki/Plugins/FormPlugin.pm line 307, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Plugins::FormPlugin::_formElement('Foswiki=HASH(0xfc4cd8)', 'Foswiki::Attrs=HASH(0x1e54100)', 'FormPlugin', 'System', 'Foswiki::Meta=HASH(0x198da58)') called at /var/www/foswiki/lib/Foswiki/Func.pm line 570, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Func::__ANON__('Foswiki=HASH(0xfc4cd8)', 'Foswiki::Attrs=HASH(0x1e54100)', 'Foswiki::Meta=HASH(0x198da58)') called at /var/www/foswiki/lib/Foswiki.pm line 3037, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::_expandMacroOnTopicRendering('Foswiki=HASH(0xfc4cd8)', 'FORMELEMENT', '\\x{a}\\x{9}name="Name"\\x{a}\\x{9}type="text"\\x{a}\\x{9}title="Your name:"\\x{a}\\x{9}mandatory="on"\\x{a}', 'Foswiki::Meta=HASH(0x198da58)') called at /var/www/foswiki/lib/Foswiki.pm line 2927, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::_processMacros('Foswiki=HASH(0xfc4cd8)', '%IF{"defined Name and $ Name != \\'\\'" then="---+!! Hello %URL...', 'CODE(0xf05398)', 'Foswiki::Meta=HASH(0x198da58)', 16) called at /var/www/foswiki/lib/Foswiki.pm line 2724, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::innerExpandMacros('Foswiki=HASH(0xfc4cd8)', 'SCALAR(0xf11d50)', 'Foswiki::Meta=HASH(0x198da58)') called at /var/www/foswiki/lib/Foswiki.pm line 3214, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::expandMacros('Foswiki=HASH(0xfc4cd8)', '%IF{"defined Name and $ Name != \\'\\'" then="---+!! Hello %URL...', 'Foswiki::Meta=HASH(0x198da58)') called at /var/www/foswiki/lib/Foswiki/Meta.pm line 3100, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x198da58)', '%IF{"defined Name and $ Name != \\'\\'" then="---+!! Hello %URL...') called at /var/www/foswiki/lib/Foswiki/UI/View.pm line 400, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::UI::View::_prepare('%IF{"defined Name and $ Name != \\'\\'" then="---+!! Hello %URL...', 'Foswiki::Meta=HASH(0x198da58)', 0) called at /var/www/foswiki/lib/Foswiki/UI/View.pm line 380, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::UI::View::view('Foswiki=HASH(0xfc4cd8)') called at /var/www/foswiki/lib/Foswiki/UI.pm line 316, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \teval {...} called at /usr/share/perl5/Error.pm line 408, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tError::subs::try('CODE(0x614f10)', 'HASH(0xfc4888)') called at /var/www/foswiki/lib/Foswiki/UI.pm line 435, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::UI::_execute('Foswiki::Request=HASH(0xf852d8)', 'CODE(0xf46018)', 'view', 1) called at /var/www/foswiki/lib/Foswiki/UI.pm line 277, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0xf852d8)') called at /var/www/foswiki/lib/Foswiki/Engine/CGI.pm line 37, referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x94ebb0)') called at /var/www/foswiki/bin/view line 24., referer: http://HOST.de/foswiki/bin/view/System/InstalledPlugins
[Tue May 31 15:00:58 2011] [error] [client ] File does not exist: /var/www/favicon.ico

-- PhilippLeufke - 31 May 2011

So as it seems that the foswiki debian packages are not the culprits, might it be, that there's something special about the perl environment?

The bug is present on 2 different machines running debian stable (lenny).

-- PhilippLeufke - 31 May 2011

Could you check if you have List::MoreUtils ?

-- ArthurClemens - 31 May 2011

Wow, that was easy. That did the trick!

apt-get install liblist-moreutils-perl

Regarding the debian packages: it seems, that this dependence doesn't get resolved, when SvenDowideit gets the packages built automatically...

But it seems, the dependency is also not listed in the plugin description?!

Thanks, Arthur

-- PhilippLeufke - 31 May 2011

I forgot to add it, or I assumed at the time that it was a standard module.

-- ArthurClemens - 31 May 2011

I have updated the plugin to version 2.0.2. This now lists the dependency.

-- ArthurClemens - 31 May 2011

 

ItemTemplate edit

Summary "FieldFactory" error breaks FormPlugin
ReportedBy PhilippLeufke
Codebase 1.1.3
SVN Range
AppliesTo Extension
Component FormPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins FormPlugin:9b88c6643de8
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 31 May 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