typo3-realurl icon indicating copy to clipboard operation
typo3-realurl copied to clipboard

[FEATURE] Method/Hook for config on (other)extension installation

Open kludikovsky opened this issue 7 years ago • 6 comments

@dmitry this is just a question/discussion

In https://github.com/dmitryd/typo3-realurl/issues/381 I reported a (false positive) issue in realurl, where you explaind the concept. This led to a change in the affected extension.

During review we had some more discussions about the inserting of configs during extension installation. This would it make easier to include a extension specific realurl-configuration, when an extension ist installed after realurl. You can find the discussion here https://github.com/mindshape-GmbH/mindshape_seo/commit/07a66d45d181d5b90b299de06166814dff4d868f#commitcomment-20713183

The question is now: Wouldn't it make sense to have a function in realurl, which allows an extension to send a config, which is then added properly. The advantages would be:

  • only realurl handles it's config
  • basic realurl settings are automatically included if realurl has been installed previous installation of the extension
  • no manual changes to the config necessary in most cases
  • consistent config regardless if menual or automatic config selected.
  • config file can always be up to date

Implementation (bear with me I lack some experience) could be by calling a function like addConfigFromExtension with the default configuration for this extension.

What's your opinion to this?

kludikovsky avatar Feb 03 '17 13:02 kludikovsky

/cc @dmitryd

dmitry avatar Feb 05 '17 13:02 dmitry

@dmitry sorry.

kludikovsky avatar Feb 06 '17 08:02 kludikovsky

Yes, this is a good idea! I am going to review & add that. Thanks for suggestion!

dmitryd avatar Feb 06 '17 13:02 dmitryd

What about using this hook?

dmitryd avatar Feb 20 '17 12:02 dmitryd

@dmitryd as I said already upfront, I am not the specialist, so bear with me please if I am wrong.

As I can see the added postProcessConfiguration function is a hook to call beack the the added extension and passes all params with it. This shall then process the add the params itself. Is this correct?

Lets start with this before I go into it further.

kludikovsky avatar Feb 22 '17 12:02 kludikovsky

Please, try & investigate if the hook works for you. It is needed by you, so you are expected to invest some time in it too :)

dmitryd avatar Mar 28 '17 09:03 dmitryd