Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows 2000 Server SP4 & Cygwin 1.5.18(0.13242) (cygwin-thread-multi-64int)
Web server: Apache/2.2.4 (Win32)
Perl version: 5.008007 (cygwin)
Client OS: Windows XP SP2, Mac OS X 10.4.8
Web Browser: Firefox, Internet Explorer, Safari
Categories: Forms, Search

-- FrankSpangenberg - 08 Jun 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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

 
Change status to:
Topic revision: r4 - 2007-06-16 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.