diff --git a/ChangeLog b/ChangeLog index b82b357aa..0ea0f03f8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ - +2021-03-09 Franz Holzinger + * bugfix issue #76: marks not parsed because of wrong initialization order. 2021-03-05 Franz Holzinger * bugfix: $assetCollector->addInlineJavaScript is no useful replacement for $GLOBALS['TSFE']->additionalHeaderData. diff --git a/control/class.tx_ttproducts_control_creator.php b/control/class.tx_ttproducts_control_creator.php index eb0ed6675..21868d95a 100755 --- a/control/class.tx_ttproducts_control_creator.php +++ b/control/class.tx_ttproducts_control_creator.php @@ -60,17 +60,20 @@ public function init ( $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); $tablesObj->init(); - $languageObj = static::getLanguageObj($pLangObj, $cObj, $conf); if (is_object($pObj)) { $pLangObj = &$pObj; } else { $pLangObj = &$this; } + $languageObj = static::getLanguageObj($pLangObj, $cObj, $conf); + $config['LLkey'] = $languageObj->getLocalLangKey(); /* $pibaseObj->LLkey; */ $markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker'); $res = $markerObj->init( $cObj, - $pObj->piVars + $pObj->piVars, + $conf, + $config ); if ($res == false) { @@ -85,8 +88,6 @@ public function init ( $basketRec ); - $config['LLkey'] = $languageObj->getLocalLangKey(); /* $pibaseObj->LLkey; */ - $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); $cnf->init( $conf, diff --git a/marker/class.tx_ttproducts_marker.php b/marker/class.tx_ttproducts_marker.php index ee103dba3..2bd086853 100755 --- a/marker/class.tx_ttproducts_marker.php +++ b/marker/class.tx_ttproducts_marker.php @@ -62,11 +62,11 @@ class tx_ttproducts_marker implements \TYPO3\CMS\Core\SingletonInterface { * @param array array urls which should be overridden with marker key as index * @return void */ - public function init ($cObj, $piVars) { + public function init ($cObj, $piVars, $conf, $config) { $this->cObj = $cObj; $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $this->conf = &$cnf->conf; - $this->config = &$cnf->config; + $this->conf = $conf; + $this->config = $config; $this->markerArray = array('CATEGORY', 'PRODUCT', 'ARTICLE'); $markerFile = $this->conf['markerFile']; $languageObj = GeneralUtility::makeInstance(\JambageCom\TtProducts\Api\Localization::class);