• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

One of my users wanted to have a list of all attachments from another web.

Lists of attachments can be done with FormQueryPlugin, which, however, always is acting on the web from where it is being used.

No problem, I thought, let's build the attachment list in the web where the attachments are using FQP, and then pull this list in with INCLUDE.

However, this doesn't work: TWiki throws an internal error:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

Can't call method "formQuery" on an undefined value

In the Apache logfile I see a line saying:

Can't call method "formQuery" on an undefined value at /home/httpd/twiki/lib/TWiki/Plugins/FormQueryPlugin.pm line 77

In FormQueryPlugin.pm, (most) callers of the initialisation routine _lazyInit pass the web where the FQP tag occurs. The routine, however, ignores the parameter, thus falls back to the global variable with the same name $web. This global variable gets its value from initPlugin and thus from the base topic. So _lazyInit initializes the wrong database.

Just pick the web which is passed to lazyInit

Summary 'Can't call method "formQuery" on an undefined value' if FORMQUERY is included in another web
ReportedBy TWiki:Main.HaraldJoerg
Codebase 4.0.2
SVN Range Mon, 05 Jun 2006 build 10479
AppliesTo Extension
Component FormQueryPlugin
Priority Normal
CurrentState Closed

Checkins 10618
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-06-16 - HaraldJoerg
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback