Priority: Normal
Current State: Closed
Released In: 2.1.8
Target Release: patch
Applies To: Engine
Component: FORMFIELD
Branches: Release02x01 master
The "rev" parameter for
FORMFIELD macro has recently stopped working. If one includes this parameter, no value for form field is rendered. Perhaps this is related to work done
Item15023?
Example:
--
LynnwoodBrown - 09 May 2022
Here's a patch that I am currently running unit tests with:
diff --git a/lib/Foswiki/Macros/FORMFIELD.pm b/lib/Foswiki/Macros/FORMFIELD.pm
index 2b55df8..7029a3f 100644
--- a/lib/Foswiki/Macros/FORMFIELD.pm
+++ b/lib/Foswiki/Macros/FORMFIELD.pm
@@ -62,7 +62,7 @@ sub FORMFIELD {
if ( defined $rev && length($rev) ) {
my $crev = $topicObject->getLoadedRev();
- if ( defined $crev && $crev != $rev ) {
+ if ( !defined($crev) || $crev != $rev ) {
$topicObject =
Foswiki::Meta->load( $topicObject->session, $topicObject->web,
$topicObject->topic, $rev );
--
MichaelDaum - 10 May 2022