Skip to content
Snippets Groups Projects
Commit c52b932a authored by Josef Glatz's avatar Josef Glatz Committed by Georg Ringer
Browse files

[BUGFIX] Don't render broken extension icons in language packs updater

The icon path of an extension is only returned if the icon can be found.
This prevents the JavaScript from rendering a broken extension icon.

Resolves: #91038
Releases: master, 9.5
Change-Id: Ic0a4fb874215408c1781b3acb29e9ec4769150fd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64176


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 19dc7fa9
No related merge requests found
......@@ -442,7 +442,7 @@ class LanguagePacks extends AbstractInteractableModule {
const $tbody = $('<tbody>');
data.extensions.forEach((extension: any): void => {
rowCount++;
if (extension.icon !== '') {
if (typeof extension.icon !== 'undefined') {
extensionTitle = $('<span>').append(
$('<img>', {
'style': 'max-height: 16px; max-width: 16px;',
......
......@@ -173,8 +173,10 @@ class LanguagePackService implements LoggerAwareInterface
$extension = [
'key' => $key,
'title' => $title,
'icon' => PathUtility::stripPathSitePrefix(ExtensionManagementUtility::getExtensionIcon($path, true)),
];
if (!empty(ExtensionManagementUtility::getExtensionIcon($path, false))) {
$extension['icon'] = PathUtility::stripPathSitePrefix(ExtensionManagementUtility::getExtensionIcon($path, true));
}
$extension['packs'] = [];
foreach ($activeLanguages as $iso) {
$isLanguagePackDownloaded = is_dir(Environment::getLabelsPath() . '/' . $iso . '/' . $key . '/');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment