From 4b4701519d1c0e9a4eafe30d6c1dbc817655d680 Mon Sep 17 00:00:00 2001 From: Pieter van Linschoten Date: Thu, 24 Jan 2019 22:42:46 +0100 Subject: [PATCH] Only apped URL params to the ESI URL when scope=page Fix for problem introduced in commit 9819529 and discussed here: https://github.com/nexcess/magento-turpentine/commit/981952971914971aac37ea466bc9833fbe4b5d4e#commitcomment-30272072 --- .../community/Nexcessnet/Turpentine/Model/Observer/Esi.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php b/app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php index 7cfc60dc0..6312ca660 100644 --- a/app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php +++ b/app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php @@ -295,12 +295,9 @@ public function injectEsi($eventObject) { $urlOptions[$referrerParam] = Mage::helper('core')->urlEncode( Mage::getUrl('*/*/*', array('_use_rewrite' => true, '_current' => true)) ); + // If scope is 'page': Keep params from original url + $urlOptions['_query'] = Mage::app()->getRequest()->getParams(); } - - /** - * Keep params from original url - */ - $urlOptions['_query'] = Mage::app()->getRequest()->getParams(); $esiUrl = Mage::getUrl('turpentine/esi/getBlock', $urlOptions); if ($esiOptions[$methodParam] == 'esi') {