Item13768: Fix odd behavior in afterSaveHandler with unusual base topic.
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
The
DBCachePlugin afterSaveHandler defaults to $baseWeb and $baseTopic (actually $web and $topic from initPlugin()). When called with an unusual web, i.e. via a REST handler, e.g. bin/rest/ExamplePlugin/handlername?arg=val $web might be set to
"ExamplePlugin" in initPlugin(), causing suprisingly hard to trace errors.
--
MaikGlatki - 30 Sep 2015
Proposed patch: https://github.com/foswiki/DBCachePlugin/pull/1
-- MaikGlatki - 30 Sep 2015 Was wrong. --
Main.MaikGlatki - 01 Oct 2015 - 08:04
Will look into this. However remember to ALWAYS set the
topic
parameter to any REST call. This is important. ALL of the Foswiki core will behave unusual when no proper web.topic can be derived from the pathinfo ... as is the case for REST calls.
--
MichaelDaum - 30 Sep 2015
After careful review by
JanKrueger, we came up with a better solution proposal:
https://github.com/mgla/DBCachePlugin/commit/890362e550d7b7c91b6ba12e260ef30201d13b70
--
MaikGlatki - 01 Oct 2015
Did you read my previous comment from 30 Sep 2015, as adding a
topic
parameter to your REST call fixes the problem not only for
DBCachePlugin assuming
$session->{webName}
and
$session->{topicName}
are correct web and topic entries.
--
MichaelDaum - 26 Jan 2016
Don't seem to get a reply here. Please reopen in case there is still an issue.
--
MichaelDaum - 08 Mar 2016