Item14439: Remote option in DBQUERY causes server error
Priority: Normal
Current State: Closed
Released In: n/a
Target Release:
After updating a site to 2.1.4, some pages using DBQUERY would not load. The page would display error:
Not a SCALAR reference
. The apache log pointed to
lib/Foswiki/Plugins/DBCachePlugin/Core.pm
, line 1256.
After testing via trial and error, I narrowed the issue to the "remote" option in DBQUERY macro. If this option is set to "on", the error occurs. If left un-set or set to off, the page loads normally. Subsequently, I tested on 4 other 2.1.4 installations (2 "clean" new ones and 2 updated ones) using the simple query below. The result was the same in all cases.
%DBQUERY{"topic = 'Web.*'"
web="Extensions"
format=" * $web.$topic"
separator=" $n"
remote="on"
}%
--
LynnwoodBrown - 17 Jul 2017
Confirmed. There's a typo in
fixInclude
of
Core.pm
$_[0] = _takeOutBlocks($_[0], 'noautolink', $removed);
# 'TopicName' to 'Web.TopicName'
- $_[0] =~ s/(^|[\s(])($this->{webNameRegex}\.$$this->{wikiWordRegex})/$1$TranslationToken$2/g;
+ $_[2] =~ s/(^|[\s(])($this->{webNameRegex}\.$this->{wikiWordRegex})/$1$TranslationToken$2/g;
$$this
must be
$this
.
--
Main.MichaelDaum - 18 Jul 2017 - 08:40
Also reported in
Item14274
--
MichaelDaum - 28 Jul 2017