From 00818a87aa902a5dca486744d20ab9b2ecb47c3c Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Tue, 24 Jul 2018 13:39:18 +0200 Subject: [PATCH 1/4] [Bugfix] take care of absRefPrefix for images fixes #19 --- Classes/Controller/ImageRenderingController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Classes/Controller/ImageRenderingController.php b/Classes/Controller/ImageRenderingController.php index bde47353..a565ce31 100644 --- a/Classes/Controller/ImageRenderingController.php +++ b/Classes/Controller/ImageRenderingController.php @@ -16,6 +16,7 @@ use TYPO3\CMS\Core\Resource; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Service\ImageService; /** * Render the image attributes and reconstruct magic images, if necessary (and possible) @@ -76,6 +77,7 @@ public function renderImageAttributes($content = '', $conf) if ($fileUid) { try { $file = Resource\ResourceFactory::getInstance()->getFileObject($fileUid); + $imageService = new ImageService(); if ($imageAttributes['src'] !== $file->getPublicUrl()) { // Source file is a processed image $imageConfiguration = [ @@ -84,13 +86,15 @@ public function renderImageAttributes($content = '', $conf) ]; $processedFile = $this->getMagicImageService()->createMagicImage($file, $imageConfiguration); $additionalAttributes = [ - 'src' => $processedFile->getPublicUrl(), + 'src' => $imageService->getImageUri($processedFile), 'title' => $imageAttributes['title'] ?: $file->getProperty('title'), 'alt' => $imageAttributes['alt'] ?: $file->getProperty('alternative'), 'width' => $processedFile->getProperty('width'), 'height' => $processedFile->getProperty('height'), ]; $imageAttributes = array_merge($imageAttributes, $additionalAttributes); + } else { + $imageAttributes['src'] = $imageService->getImageUri($file); } } catch (Resource\Exception\FileDoesNotExistException $fileDoesNotExistException) { // Log the fact the file could not be retrieved. @@ -98,7 +102,9 @@ public function renderImageAttributes($content = '', $conf) $this->getLogger()->error($message); } } + } + return ''; } From ef08b115d002436ad4394772b36a663237847ab0 Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Tue, 24 Jul 2018 14:10:25 +0200 Subject: [PATCH 2/4] [Cleanup] fix CS --- Classes/Controller/ImageRenderingController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/Controller/ImageRenderingController.php b/Classes/Controller/ImageRenderingController.php index a565ce31..88c77a30 100644 --- a/Classes/Controller/ImageRenderingController.php +++ b/Classes/Controller/ImageRenderingController.php @@ -102,7 +102,6 @@ public function renderImageAttributes($content = '', $conf) $this->getLogger()->error($message); } } - } return ''; From 81f1312dd2daea800c7f7056a7c307a8eede8acf Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Wed, 25 Jul 2018 11:57:53 +0200 Subject: [PATCH 3/4] [Bugfix] fixed instatiating of ImageService --- Classes/Controller/ImageRenderingController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Controller/ImageRenderingController.php b/Classes/Controller/ImageRenderingController.php index 88c77a30..4205e725 100644 --- a/Classes/Controller/ImageRenderingController.php +++ b/Classes/Controller/ImageRenderingController.php @@ -17,6 +17,7 @@ use TYPO3\CMS\Core\Resource; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Service\ImageService; +use TYPO3\CMS\Extbase\Object\ObjectManager; /** * Render the image attributes and reconstruct magic images, if necessary (and possible) @@ -77,7 +78,8 @@ public function renderImageAttributes($content = '', $conf) if ($fileUid) { try { $file = Resource\ResourceFactory::getInstance()->getFileObject($fileUid); - $imageService = new ImageService(); + $objectManager = GeneralUtility::makeInstance(ObjectManager::class); + $imageService = $objectManager->get(ImageService::class); if ($imageAttributes['src'] !== $file->getPublicUrl()) { // Source file is a processed image $imageConfiguration = [ From 51d3b9d45ef55b419d0e842e0c5607010f80ea03 Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Tue, 29 Jan 2019 15:10:27 +0100 Subject: [PATCH 4/4] cleanup use packagist for be_acl --- Resources/Public/JavaScript/Plugins/TableOperations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Public/JavaScript/Plugins/TableOperations.js b/Resources/Public/JavaScript/Plugins/TableOperations.js index 7ff6aa28..03201e62 100644 --- a/Resources/Public/JavaScript/Plugins/TableOperations.js +++ b/Resources/Public/JavaScript/Plugins/TableOperations.js @@ -1459,7 +1459,7 @@ define([ * @param {Object} params The field values entered in the form */ setHeaders: function (table, params) { - var headers = params.f_headers; + var headers = params.typeof; var doc = this.editor.document; var tbody = table.tBodies[0]; var thead = table.tHead;