From a36d25f68b0f24965e0b7f8de1a404b1f16a1660 Mon Sep 17 00:00:00 2001 From: Franz Holzinger Date: Fri, 14 Feb 2020 18:31:42 +0100 Subject: [PATCH] * bugfix: List view failed to show up because of uninitialized parser object. --- ChangeLog | 3 ++- marker/class.tx_ttproducts_marker.php | 5 ++++- view/class.tx_ttproducts_list_view.php | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57ab85ee7..3b3b1d687 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ - +2020-02-14 Franz Holzinger + * bugfix: List view failed to show up because of uninitialized parser object. 2020-02-13 Franz Holzinger * bugfix for TYPO3 9.5: Do not use cObj->substituteMarkerArrayCached. diff --git a/marker/class.tx_ttproducts_marker.php b/marker/class.tx_ttproducts_marker.php index a0d071f4b..d23789415 100755 --- a/marker/class.tx_ttproducts_marker.php +++ b/marker/class.tx_ttproducts_marker.php @@ -240,7 +240,7 @@ public function setGlobalMarkerArray ($piVars, $locallang, $LLkey) { $langArray[$key] = $value; $out = $value; } - $markerArray['###'.strtoupper($key).'###'] = $out; + $markerArray['###' . strtoupper($key) . '###'] = $out; } } } @@ -364,7 +364,10 @@ public function getMarkerFields (&$templateCode, &$tableFieldArray, &$requiredFi } } $tagArray = $retTagArray; + } else { + $tagArray = array(); } + $parentArray = array_unique($parentArray); sort($parentArray); diff --git a/view/class.tx_ttproducts_list_view.php b/view/class.tx_ttproducts_list_view.php index 3b7ce530d..e6e66e4a5 100755 --- a/view/class.tx_ttproducts_list_view.php +++ b/view/class.tx_ttproducts_list_view.php @@ -2,7 +2,7 @@ /*************************************************************** * Copyright notice * -* (c) 2019 Franz Holzinger (franz@ttproducts.de) +* (c) 2020 Franz Holzinger (franz@ttproducts.de) * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is @@ -144,7 +144,7 @@ public function &advanceCategory ( } - public function &advanceProduct ( + public function advanceProduct ( &$productAndItemsFrameWork, &$productFrameWork, &$itemListOut, @@ -448,6 +448,14 @@ public function printView ( $globalMarkerArray = $markerObj->getGlobalMarkerArray(); $whereCat = ''; + $parser = $this->cObj; + if ( + defined('TYPO3_version') && + version_compare(TYPO3_version, '7.0.0', '>=') + ) { + $parser = tx_div2007_core::newHtmlParser(false); + } + $relatedListView = GeneralUtility::makeInstance('tx_ttproducts_relatedlist_view'); $relatedListView->init($this->cObj, $this->pidListObj->getPidlist(), $this->pidListObj->getRecursive());