Item15025: FORMFIELD and QUERY don't read the correct topic object
Current State: Closed
Released In: 2.1.7
Target Release: patch
Applies To: Engine
Branches: Release02x01 master
A string may be expanded within the scope of a given Foswiki::Meta object as per
Foswiki::Func::expandCommonVariables( $text, $topic, $web, $meta );
The passed meta object may either be already in existence in the store ... or not (yet).
In any case, should this topic object made use of when expanding common varliables such as %FORMFIELD and %QUERY.
However, both of them check whether the "latest revision of the topic has not been loaded yet" ... and the reload it again
from the store. This fails when this topic object doesn't exist yet in the store, thus returing the wrong values.
Instead %FORMFIELD and %QUERY must return the values stored in the topic object passed to the API ... and never reload a different
one from the store.
- 18 May 2021
The problem isn't fully fixed. There seems to be a difference between Store implementations.
- 21 May 2021