From 729b7081f93e6376fc3ceb7afbbbd29b0a2ad0e0 Mon Sep 17 00:00:00 2001 From: Jonathan Heilmann Date: Wed, 2 May 2018 17:34:30 +0200 Subject: [PATCH 1/4] [BUG] TYPO3 8 and mergeIfNotBlank Problem (Related to #63) --- Classes/Service/OgRendererService.php | 10 +++++++--- Documentation/ChangeLog/Index.rst | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Classes/Service/OgRendererService.php b/Classes/Service/OgRendererService.php index 8448939..9ecbbb7 100644 --- a/Classes/Service/OgRendererService.php +++ b/Classes/Service/OgRendererService.php @@ -104,6 +104,9 @@ public function main($content, $conf) $fileObjects = array(); if ($GLOBALS['TSFE']->page['_PAGES_OVERLAY_UID']) { + // Get extension configuration + $extConf = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jh_opengraphprotocol']) ? GeneralUtility::removeDotsFromTS(unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jh_opengraphprotocol'])) : array(); + // Get images if there is a language overlay // This is somehow a hack, as l10n_mode 'mergeIfNotBlack' does not work in this case. // PageRepository->shouldFieldBeOverlaid does not work for config type 'inline' with "DEFAULT '0'" database config, @@ -112,11 +115,12 @@ public function main($content, $conf) // $GLOBALS['TSFE']->page['tx_jhopengraphprotocol_ogtype'] is related to table 'pages' or 'pages_language_overlay'. $overlayFileObjects = $fileRepository->findByRelation('pages_language_overlay', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->page['_PAGES_OVERLAY_UID']); - if (count($overlayFileObjects) > 0) + if (count($overlayFileObjects) > 0) { $fileObjects = $overlayFileObjects; - else if (isset($GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode']) && - $GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode'] === 'mergeIfNotBlank') + } else if (isset($extConf['languageOverlay']['tx_jhopengraphprotocol_ogfalimages']['mergeIfNotBlank']) && + $extConf['languageOverlay']['tx_jhopengraphprotocol_ogfalimages']['mergeIfNotBlank']) { $fileObjects = $fileRepository->findByRelation('pages', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->id); + } } else $fileObjects = $fileRepository->findByRelation('pages', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->id); diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index 7252e18..f1c9c60 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -22,6 +22,12 @@ ChangeLog :Changes: Changes + - :Version: + 1.3.2 + + :Changes: + \* [BUG] #63 TYPO3 8 and mergeIfNotBlank Problem + - :Version: 1.3.1 From 16320bb029b9477c53ff091e9e7dac130c2d3980 Mon Sep 17 00:00:00 2001 From: Jonathan Heilmann Date: Wed, 2 May 2018 17:34:43 +0200 Subject: [PATCH 2/4] [RELEASE] Release of version 1.3.2-rc.1 --- composer.json | 2 +- ext_emconf.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9d0b4d3..1e2f956 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "support": { "issues": "https://github.com/jonathanheilmann/ext-jh_opengraphprotocol/issues" }, - "version": "1.3.1", + "version": "1.3.2-rc.1", "require": { "typo3/cms": "~7.6||~8.7" }, diff --git a/ext_emconf.php b/ext_emconf.php index f2010dc..db505c5 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -14,7 +14,7 @@ 'title' => 'Open Graph protocol', 'description' => 'Adds the Open Graph protocol properties in meta-tags to the html-header supporting multilingual-websites.', 'category' => 'plugin', - 'version' => '1.3.1', + 'version' => '1.3.2-rc.1', 'state' => 'stable', 'uploadfolder' => false, 'createDirs' => '', From 83596e31aac14c4611b34d1d9f6a870a10e54d5d Mon Sep 17 00:00:00 2001 From: Jonathan Heilmann Date: Mon, 2 Jul 2018 07:00:40 +0200 Subject: [PATCH 3/4] [TASK] Set version to 1.3.2 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index db505c5..3591c2a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -14,7 +14,7 @@ 'title' => 'Open Graph protocol', 'description' => 'Adds the Open Graph protocol properties in meta-tags to the html-header supporting multilingual-websites.', 'category' => 'plugin', - 'version' => '1.3.2-rc.1', + 'version' => '1.3.2', 'state' => 'stable', 'uploadfolder' => false, 'createDirs' => '', From 4a513c43f5a80bdfa13b2bb5391fd72bb83c2181 Mon Sep 17 00:00:00 2001 From: Jonathan Heilmann Date: Mon, 2 Jul 2018 07:02:51 +0200 Subject: [PATCH 4/4] [TASK] Set composer version to 1.3.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1e2f956..9067dcd 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "support": { "issues": "https://github.com/jonathanheilmann/ext-jh_opengraphprotocol/issues" }, - "version": "1.3.2-rc.1", + "version": "1.3.2", "require": { "typo3/cms": "~7.6||~8.7" },