Project

General

Profile

Actions

Bug #68575

closed

NewContentElementController generates wrong icon path when using EXT:myext

Added by Georg Tiefenbrunn over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend User Interface
Target version:
Start date:
2015-07-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #46433: Path for the icon in new content element wizardClosed2013-03-19

Actions
Actions

Also available in: Atom PDF