TYPO3-Caretaker / caretaker_instance

TYPO3 extension caretaker_instance
GNU General Public License v2.0
14 stars 23 forks source link

Updating LocalConfiguration doesn't work in v9.5 #74

Open AstCommodore opened 5 years ago

AstCommodore commented 5 years ago

Hello there! Thank you for the compatibility update for TYPO3 9.5, but sadly there is a bug in version 2.0.0:

You can't store the created keys by class.ext_update.php to LocalConfiguration. I wrote a hot fix patch, but maybe there is a better way to do it.

class.ext_update.patch.zip

TehTux commented 5 years ago

Thanks for the feedback, I'll check it out.

TehTux commented 5 years ago

@AstCommodore I can't reproduce this problem. Can you give me more information?

AstCommodore commented 5 years ago

I've got some TYPO3 9.5.9 installations / PHP 7.2 in 'classic' mode and loaded caretaker_instance 2.0.0 from TER. Clicking on the Update button in Extension manager opens the success message and shows the public key, but both keys are not added to the LocalConfiguration. Looking at Admin tools > Extension Configuration the entries for caretaker are empty and there is no entry in the LC file.

TehTux commented 5 years ago

Sorry, I can't reproduce this with composer and classic mode (both TYPO3 9.5.9 + PHP 7.2).

Maybe a server side problem? Write permissons for LocalConfiguration.php?

TehTux commented 5 years ago

I made a screen recording: https://youtu.be/14NXJbhaAcA

AstCommodore commented 5 years ago

I could follow you, the video makes it clear! Nice. :) But sadly my writeable LocalConfiguration on a DDEV system like yours (composer) isn't wirtten as well as my classic installations on Mittwald accounts.

Your class.ext_update.php uses $configurationManager->setLocalConfigurationValueByPath. Maybe this is the point. Also see the "Scan results" form Install Tool:

Bildschirmfoto 2019-09-26 um 08 43 21

I replaced the call in method writeExtensionConfiguration (see patch) by

$extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class);
$extensionConfiguration->set('caretaker_instance', '', $extConf);

and this is the key in my installations: Both, the old LocalConfiguration key ['EXT']['extConf'] and the new one ['EXTENSIONS']['caretaker_instance'] are set.

TehTux commented 5 years ago

The one in the video is a classic installation (not with composer). I know the output from the install tool, but deprecation doesn't mean it doesn't work. Only from v10 it is removed. So when I adjusted the extension for v9, I decided to make these adjustments with 3.0.0 (TYPO3 9-10).

TehTux commented 4 years ago

@AstCommodore 3.0.0 is LIVE, fixed?

AstCommodore commented 4 years ago

Hello @TehTux

yes and no ... I installed the new version 3.0.0 both in composer (DDEV) and classic (Mittwald):

With composer everything is working fine, the keys are generated and stored.

On classic I've got an error while activating the extension by the extension manager:

Oops, an error occurred!
Could not scan for classes inside "/typo3/typo3conf/ext/caretaker_instance/eid" which does not appear to be a file nor a folder

I've cleared every cache and dump autoload, reinstalled the EXT, but the error is the same. Maybe I could test it on some more installations.

Greetings!

TehTux commented 4 years ago

Thank you for this feedback! I think there is the old path in the autoloader file. I have to remove it.

Cretection commented 4 years ago

Thank you for this feedback! I think there is the old path in the autoloader file. I have to remove it.

I have the same problem. Is the problem solved yet or what do I have to remove to prevent this error from occurring again.

Cretection commented 4 years ago

Perfect - It seems to work:)