Bug #68575
closedNewContentElementController generates wrong icon path when using EXT:myext
100%
Description
Since 195fbb3fe088215d8c3128a208c35b6fad6db157 it should be possible to use EXT:myicon.png instead of just relative paths for the new Content Element wizard. That currently only works for sysext. I tried the following:
mod.wizards.newContentElement.wizardItems.special.elements.div.icon = EXT:myext/Resources/Public/Icons/Content/Div.png
$icon = substr($icon, strlen(PATH_typo3));
in NewContentElementController (Line 245) alters the path to onf/ext/myext/Resources/Public/Icons/Content/Div.png
.
Using strlen(PATH_typo3)
for sysext generates working relative paths like sysext/<extension>/...
but non working paths like onf/ext/<extension>/...
for extensions in typo3_conf/ext/
. Using strlen(PATH_site) - 1
would generate working absolute paths like /sysext/<extension>/...
or /typo3conf/ext/<extension>/...
.
Another problem is the condition if (strpos($wInfo['icon'], '..') === FALSE) {
(Line 243). This works for icons set in e.g. ext_localconf.php
by using either \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY)
or EXT:myext/...
but not for absolute icons (/typo3conf/ext/myext/...
). Also testing for absolute paths here with if (strpos($wInfo['icon'], '..') === FALSE && GeneralUtility::isAbsPath($icon) === FALSE) {
would again allow absolute paths (which were possible before the commit) and are e. g. used by EXT:fluidcontent.