Question
I have a form where users should be able to select contact persons. The values are comming from a search for topics containing "CompanyABC" or "CompanyXYZ" and "UserForm". So all registered users from these companies will be listed.
Search:
%SEARCH{"(CompanyABC|CompanyXYZ);UserForm" scope="text" type="regex" web="%MAINWEB%" nonoise="on" format="$topic=$web.$topic" separator=", " }%
The regex search is working in the advanced site search and in the view of the form topic (e.g.
ContactPersonsForm). All users are listed correctly!
BUT, if I add the form through edit to a topic (
ContactPersons), after selecting the form, the follwing error appears:
TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.
Unmatched ( in regex; marked by <-- HERE in m/^(.*,)?\s*%SEARCH{"( <-- HERE CompanyABC\s*(,.*)?$/
Error log:
| 08 Jun 2007 - 18:14 | Unmatched ( in regex; marked by <-- HERE in m/^(.*,)?\s*%SEARCH{"( <-- HERE CompanyABC\s*(,.*)?$/ at D:/Server/twiki/lib/TWiki/Form.pm line 533.
at D:/Server/twiki/lib/TWiki/Form.pm line 533
TWiki::Form::renderFieldForEdit('TWiki::Form=HASH(0x10d3887c)', 'HASH(0x10e62f10)', 'Prepress', 'TestThema', 'ARRAY(0x10d3e500)') called at D:/Server/twiki/lib/TWiki/Form.pm line 389
TWiki::Form::renderForEdit('TWiki::Form=HASH(0x10d3887c)', 'Prepress', 'TestThema', 'TWiki::Meta=HASH(0x10d08dd4)') called at D:/Server/twiki/lib/TWiki/UI/Edit.pm line 344
TWiki::UI::Edit::init_edit('TWiki=HASH(0x101df9fc)', 'edit') called at D:/Server/twiki/lib/TWiki/UI/Edit.pm line 72
TWiki::UI::Edit::edit('TWiki=HASH(0x101df9fc)') called at D:/Server/twiki/lib/TWiki/UI.pm line 159
TWiki::UI::__ANON__() called at D:/Server/twiki/lib/CPAN/lib//Error.pm line 379
eval {...} called at D:/Server/twiki/lib/CPAN/lib//Error.pm line 371
Error::subs::try('CODE(0x100130f4)', 'HASH(0x10d08aa4)') called at D:/Server/twiki/lib/TWiki/UI.pm line 199
TWiki::UI::run('CODE(0x101cf3d0)', 'edit', 1) called
Removing or changing
$TWiki::cfg{NameFilter} (
UnmatchedBracketInRegex,
UnmatchedLeftBracketInSgeDotPm) doesn't solve the problem...
Environment
--
FrankSpangenberg - 08 Jun 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Form.pm says in line 533
/^(.*,)?\s*$itemValue\s*(,.*)?$/ but the error message shows only
/^(.*,)?\s*%SEARCH{"( <-- HERE CompanyABC\s*(,.*)?$/ so the part of the search after "|" is missing.
The error appears on twiki.org, too. Try to add the form
SelectMultiForm to a topic. (sorry for misusing this existing form, but I'm not allowed to enable a new form)
--
FrankSpangenberg - 15 Jun 2007
Bugs:Item4250
--
FrankSpangenberg - 15 Jun 2007