Item11350: TablePlugin died for nonexistent topic include
Priority: Urgent
Current State: Closed
Released In: 1.1.4
Target Release: patch
When using the table definition from the another topic, like:
%TABLE{include="SomeTopic"}%
| table here |
and if the "SomeTopic" does not exists, Foswiki die with error:
TablePlugin: included topic WebTopicHelper does not exist. at /Users/jomo/Web/MVFOS/Foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 403.
at /opt/local/lib/perl5/5.14.1/CGI/Carp.pm line 379
CGI::Carp::realdie('TablePlugin: included topic WebTopicHelper does not exist. at...') called at /opt/local/lib/perl5/5.14.1/CGI/Carp.pm line 468
CGI::Carp::die('TablePlugin: included topic WebTopicHelper does not exist.') called at /Users/jomo/Web/MVFOS/Foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 403
Foswiki::Plugins::TablePlugin::Core::_getIncludeParams('WebTopicHelper') called at /Users/jomo/Web/MVFOS/Foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 236
Foswiki::Plugins::TablePlugin::Core::_parseAttributes(1, 'HASH(0x7ff5c874cae8)', 'HASH(0x7ff5c88e6e40)') called at /Users/jomo/Web/MVFOS/Foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 204
Foswiki::Plugins::TablePlugin::Core::_parseTableSpecificTableAttributes('include', 'WebTopicHelper') called at /Users/jomo/Web/MVFOS/Foswiki/lib/Foswiki/Plugins/TablePlugin/Core.pm line 1889
... deleted lines ...
I marked it as urgent, because causing "die"... BTW, calling CGI::Carp on error is ok?
Tested with RC2 unfortunately here is no checkbox for RC2.
--
JozefMojzis - 11 Dec 2011
The die is indeed wrong. Looks like the code was not finished.
Edit table returns:
<span class="foswikiAlert">%MAKETEXT{"Warning: \'include\' topic does not exist!"}%</span>
This line is already in the locale strings.
--
ArthurClemens - 11 Dec 2011
I've opened
Item11354 to address better error reporting. I looked at making the change, but the error is encountered 2 levels deep in processing of the macro arguments, and there is no other error handling that I can find other than debug logging. This needs more work than I wanted to patch into 1.1.4.
--
GeorgeClark - 13 Dec 2011