You are here: Foswiki>Tasks Web>Item15025 (28 Mar 2022, MichaelDaum)Edit Attach

Item15025: FORMFIELD and QUERY don't read the correct topic object

pencil
Priority: Urgent
Current State: Closed
Released In: 2.1.7
Target Release: patch
Applies To: Engine
Component:
Branches: Release02x01 master
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
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.

-- MichaelDaum - 18 May 2021

The problem isn't fully fixed. There seems to be a difference between Store implementations.

-- MichaelDaum - 21 May 2021
 
Topic revision: r6 - 28 Mar 2022, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy