Project

General

Profile

Actions

Bug #68575

closed

NewContentElementController generates wrong icon path when using EXT:myext

Added by Georg Tiefenbrunn over 8 years ago. Updated over 6 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 #1

Updated by Wouter Wolters over 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Wouter Wolters
  • Target version set to 7.4 (Backend)
  • Sprint Focus set to Stabilization Sprint
Actions #2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42044

Actions #3

Updated by Wouter Wolters over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Georg Tiefenbrunn over 8 years ago

Thanks for this speedfix!

Actions #5

Updated by Wouter Wolters over 8 years ago

Your welcome, and thanks for testing it too :)

Actions #6

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF