Bug #70684

ExtensionManagementUtility::extPath returns different file paths

Added by Christopher Orth almost 6 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-10-14
Due date:
% Done:

0%

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

Description

Hi,

since TYPO3 7.5, \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(); returns different file paths.

Reproduce:
- Create a dummy extension including a valid TCA
- Edit TCA and add following in ext_tables.php:
$GLOBALS['TCA']['tx_dummy_domain_model_dummy'] = array(
'ctrl' => array(
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Dummy.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_dummy_domain_model_dummy.gif'
),
);

Go to the Backend, open "Configuration" check "$GLOBALS[TCA]" Array.
- iconfile will be: "../typo3conf/ext/dummy/Resources/Public/Icons/tx_dummy_domain_model_dummy.gif"
- dynamicConfigFile will be: "/var/www/public/typo3conf/ext/dummy/Configuration/TCA/Dummy.php"

Because of "iconfile" has to be prefixed with "EXT:" the iconfile will never been shown in the Backend List-View.
If you return the complete TCA array in "typo3conf/ext/dummy/Configuration/TCA/tx_dummy_domain_model_dummy.php" instead of set the ctrl array in ext_tables.php "extRelPath()" will return the correct prefixed file paths for both keys (dynamicConfigFile and iconfile)

Best,
Christopher

Also available in: Atom PDF