Feature #16332
closedIncluding ext_localconf.php of extensions NOT being installed
0%
Description
When installing extensions, you can add form-fields for setting up some configuration (indexed_search and others use it). Now there is a hook to manipulate those field-contents before displaying. (It's about the detail-few including the setup-forms)
Problem-Situation:
If you have an extension where you want to manipulate those fields when displaying the first time, the extension is NOT installed, so ext_localconf.php is NOT included, and the hook-function is NOT called.
There is a patch attached, where ext_localconf.php is included if the extension is not installed. Problem is, that if it does include ext_localconf.php, that file might include content which is related to the installed extension, therefore it does not work.
So this is not the right way to go, as it only works in the few cases where this file is hardly containing any code, but the code for using the hooks.
I suggest some feature to add a hook in this case, which does work if the extension is not installed, but this is a rather very-low-level-feature request...
JH
Index: TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php
===================================================================
--- TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php (revision 143)
++ TYPO3/typo3_src-4.0/typo3/mod/tools/em/class.em_index.php (revision 160)@ -4515,6 +4515,12
@
$arr = unserialize($TYPO3_CONF_VARS['EXT']['extConf'][$extKey]);
$arr = is_array($arr) ? $arr : array(); // Call processing function for constants config and data before write and form rendering:
+ // load ext_localconf.php for singleview of extension, if extension is not already installed:
+ if (!t3lib_extMgm::isLoaded($extKey)) {
+ echo ($absPath.'ext_localconf.php');
+ #require_once($absPath.'ext_localconf.php');
+ }
// Call processing function for constants config and data before write and form rendering:
if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/mod/tools/em/index.php']['tsStyleConfigForm'])) {
$_params = array('fields' => &$theConstants, 'data' => &$arr, 'extKey' => $extKey);
(issue imported from #M3814)