Feature #24037

Add "edit end token" to allow custom post configuration in localconf.php

Added by Steffen Müller over 4 years ago. Updated over 3 years ago.

Status:Resolved Start date:2010-11-12
Priority:Should have Due date:
Assigned To:Tobias Liebig % Done:

100%

Category:Install Tool Spent time: -
Target version:-
PHP Version: Sprint Focus:
Complexity:

Description

Problem:
"INSTALL SCRIPT EDIT POINT TOKEN" limits the range in localconf.php which is handled by class t3lib_install. Configuration ABOVE this token is not touched by the t3lib_install.

In some deployment cases it is useful to have some configuration BELOW this range, which is also not touched by t3lib_install. (e.g. to override config before extensions are loaded).
Details and use cases have already been discussed in TYPO3-dev newsgroup: http://lists.typo3.org/pipermail/typo3-dev/2010-October/041857.html

Solution:
Add handling of an end token, which limits the editable range of class t3lib_install.

I tested this successfully with introduction package.

Since introduction package does not completely use the API of t3lib_install, I added a second patch to preserve compatibility.

We could also think about adding this end token in localconf.php of dummy and introduction package

P.S. Please don't blame me for the smelly code. t3lib_install is a hassle. :)

(issue imported from #M16369)

16369.diff Magnifier (10.1 kB) Administrator Admin, 2010-11-12 17:54

16369-introduction.diff Magnifier (906 Bytes) Administrator Admin, 2010-11-12 17:54


Related issues

related to Core - Feature #23911: Allow array as localconf.php configuration values Closed 2010-11-02

Associated revisions

Revision 7ca368e2
Added by Tobias Liebig over 3 years ago

[FEATURE] New token for custom post configuraton in localconf.php

Some setups require to add a require() statement at the end of the
localconf.php to be able to override the configurations. This patch
introduces a new "edit end token" similar to the existing
"edit token". Only the lines between the "edit token" and the
"edit end token" will be updated by the install tool. The code above
and below that will stay untouched.

Change-Id: I87877503fe71196a7d099f96fb9f4a3018624bd5
Resolves: #24037
Releases: 6.0
Reviewed-on: http://review.typo3.org/10492
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch

Revision bf4e379e
Added by Tobias Liebig over 3 years ago

[FEATURE] New token for custom post configuraton in localconf.php

Some setups require to add a require() statement at the end of the
localconf.php to be able to override the configurations. This patch
introduces a new "edit end token" similar to the existing
"edit token". Only the lines between the "edit token" and the
"edit end token" will be updated by the install tool. The code above
and below that will stay untouched.

Change-Id: I87877503fe71196a7d099f96fb9f4a3018624bd5
Resolves: #24037
Releases: 6.0
Reviewed-on: http://review.typo3.org/10492
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch

History

#1 Updated by Steffen Müller over 4 years ago

Example localconf.php:

// lines untouched by t3lib_install
...

  1. INSTALL SCRIPT EDIT POINT TOKEN - all lines after this points may be changed by the install script!'
// lines touched by t3lib_install
$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'] = 1;
$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] = 1;
$GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'] = 72
// Updated by ...
  1. INSTALL SCRIPT EDIT END POINT TOKEN - all lines before this points may be changed by the install script!
    // lines untouched by t3lib_install
    ...
    $GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'] =96

?>

#2 Updated by Chris topher over 4 years ago

Is there a way to see in the Install Tool, that some settings (in your example $GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi']) will be overwritten with unchangable values?
If there is none, people might think that writing to localconf does not work correctly...

#3 Updated by Xavier Perseguers over 4 years ago

@Steffen: please note that I added a relationship to a change that will committed soon.

@Christopher: this could be the opportunity to add a flash message with the reason why a setting was not updated once you click the update button.

#4 Updated by Tobias Liebig over 3 years ago

  • Assigned To set to Tobias Liebig
  • Target version deleted (0)

#5 Updated by Tobias Liebig over 3 years ago

accidentally voted -1, should have been +1

#6 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10492

#7 Updated by Tobias Liebig over 3 years ago

  • Category set to Install Tool
  • % Done changed from 0 to 100
  • TYPO3 Version changed from 4.5 to 6.0

We will need that to setup a "best practice" deployment setup with server/envoirment specific localconf configurations. E.g. different database credentials for the staging and live system.

#8 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10492

#9 Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10492

#10 Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10492

#11 Updated by Tobias Liebig over 3 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF