New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item13944: Foswiki::Func::addToHEAD (deprecated in 2010) breaks with Foswiki 2.1 Zones rewrite.

Priority: Urgent
Current State: Closed
Released In: 2.1.1
Target Release: patch
Applies To: Engine
Component: FoswikiFunc
Branches: master Item13897
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Here is the patch:

diff --git a/core/lib/Foswiki/ b/core/lib/Foswiki/
index 3e43aed..851ce6b 100644
--- a/core/lib/Foswiki/
+++ b/core/lib/Foswiki/
@@ -3802,7 +3802,9 @@ See Foswiki:Development/UpdatingExtensionsScriptZone for more details.
 sub addToHEAD {
-    $Foswiki::Plugins::SESSION->addToZone( 'head', @_ );
+    my $session = $Foswiki::Plugins::SESSION;
+    ASSERT($session) if DEBUG;
+    $session->zones()->addToZone('head', @_);
 =begin TML

-- GeorgeClark - 04 Feb 2016


ItemTemplate edit

Summary Foswiki::Func::addToHEAD (deprecated in 2010) breaks with Foswiki 2.1 Zones rewrite.
ReportedBy GeorgeClark
Codebase 2.1.0
SVN Range
AppliesTo Engine
Component FoswikiFunc
Priority Urgent
CurrentState Closed
Checkins distro:7c038d0bcc90
TargetRelease patch
ReleasedIn 2.1.1
CheckinsOnBranches master Item13897
masterCheckins distro:7c038d0bcc90
ItemBranchCheckins distro:7c038d0bcc90
Topic revision: r5 - 01 May 2016, GeorgeClark - This page was cached on 11 Mar 2018 - 02:10.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License