cross is now running Foswiki 2.1.3 Beta 1. Please open a task for any issues.

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 20 Jan 2017 - 05:08.

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