64582[BUGFIX] Show errors when failing to write site configuration
Commit message
Review
-
Code review CR +2 Done
- Anja Leichsenring +2
- Stefan Bürk +1
- Christian Kuhn +1
-
Verified V +2 Done
- Anja Leichsenring +2
- Stefan Bürk +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php+20 −5
- typo3/sysext/core/Classes/Configuration/Exception/SiteConfigurationWriteException.phpnew+27 −0
- typo3/sysext/core/Classes/Configuration/SiteConfiguration.php4+15 −9
- typo3/sysext/core/Classes/Hooks/CreateSiteConfiguration.php+16 −6
- typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php+13 −1
Review log 2636
Show 911 earlier messages
-
Stephan Großberndt uploaded patch set 1 05/26/20, 13:24
-
TYPO3com voted on patch set 1 V +1 05/26/20, 17:25 Completed build in 1h 13m 27s on Tue, 26 May, 05:25 PM Test Summary: 73808 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3564
-
Simon Gilli commented on patch set 1 05/27/20, 06:43
-
Stephan Großberndt commented on patch set 1 05/27/20, 07:20
SiteConfiguration.php:224ReplyI have oriented myself to the code twenty lines below -
Benni Mack commented on patch set 1 06/03/20, 08:00
And do we want this error to be caught in the backend module? -
Stephan Großberndt commented on patch set 1 06/03/20, 08:02
That would be nice - currently none of the errors ocurring here are caught AFAIS -
Stephan Großberndt commented on patch set 1 06/03/20, 08:04
Do you think its better to do that in this patch or in a separate? -
Benni Mack commented on patch set 1 06/03/20, 08:05
if you could do this in this patch, this would be great (since we're backporting this to 9.5, I'd like to have the full solution all at once) -
Simon Gilli commented on patch set 1 CR +1 06/05/20, 20:34
SiteConfiguration.php:224ReplyWhich also is superfluous btw imho. I'm not sure about the exact behaviour of the PHP interpreter for this case but looking at other compilers using here a variable could end with a transfer from the cpu registers or stack to ram and without, the existing value in the register or stack will be used for the later comparison, it's a question of the code optimization capabilities and settings of the interpreter or compiler. But I also guess it's not measurable, so go ahead with your solution, it's just a suggestion, no down vote -
Stephan Großberndt uploaded patch set 2 08/03/20, 14:18
-
TYPO3com voted on patch set 2 V -1 08/03/20, 14:18 Completed build in 32s on Mon, 3 Aug, 02:18 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4378
-
Stephan Großberndt commented on patch set 2 08/03/20, 14:31
SiteConfiguration.php:224ReplyDone -
Stephan Großberndt uploaded patch set 3 08/03/20, 14:34
-
Stephan Großberndt commented on patch set 3 08/03/20, 14:37
> Patch Set 1: > > if you could do this in this patch, this would be great (since we're backporting this to 9.5, I'd like to have the full solution all at once) I did this but I am not sure if this is a good idea as a lot has changed in the site configuration area, especially between v9 and v10. Please have a look at the patch and lets consider to just throw RuntimeException on failing to write or delete in 9.5 and rework the error message handling in master (and maybe v10). InstallerController::createSiteConfiguration still throws the exception on failure. -
TYPO3com voted on patch set 3 V -1 08/03/20, 14:44 Completed build in 09m 48s on Mon, 3 Aug, 02:44 PM Test Summary: 31 of 73456 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4379
-
Stephan Großberndt uploaded patch set 4 08/03/20, 15:23
-
TYPO3com voted on patch set 4 V +1 08/03/20, 15:34 Completed build in 10m 54s on Mon, 3 Aug, 03:34 PM Test Summary: 72969 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4380
-
Christian Kuhn commented on patch set 4 CR -1 08/04/20, 15:14
Thanks for this patch, Stephan! I'm all in for better dealing with write issues in the site configuration handling and especially the backend module. Two points on the patch however: * Imho we should skip v9 if nobody heavily objects * The patch should switch to specific exceptions instead of generic RuntimeExceptions. See https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/CodingGuidelines/CglPhp/PhpArchitecture/WorkingWithExceptions.html for the general idea on how core should deal with exceptions. Following this, it seems this case should throw dedicated exceptions that can be dealed-with, imho? We have a pretty clean API here, so that should be do-able. Maybe some Configuration/Exception/SiteConfigurationWriteException if there is no other one that would fit? Is this ok with you? -
Stephan Großberndt commented on patch set 4 08/04/20, 15:44
> Patch Set 4: Code-Review-1 > > Thanks for this patch, Stephan! > > I'm all in for better dealing with write issues in the site configuration handling and especially the backend module. > > Two points on the patch however: > * Imho we should skip v9 if nobody heavily objects I still think it would be good to throw RuntimeExceptions on failing to write or delete in 9.5 as the current behaviour to silently ignore and not update/delete the site configuration on failures in production (LiveContext) is really bad. The patch properly handling the display of site configuration error messages should be for v10/master only then. > * The patch should switch to specific exceptions instead of generic RuntimeExceptions. See https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/CodingGuidelines/CglPhp/PhpArchitecture/WorkingWithExceptions.html for the general idea on how core should deal with exceptions. Following this, it seems this case should throw dedicated exceptions that can be dealed-with, imho? We have a pretty clean API here, so that should be do-able. Maybe some Configuration/Exception/SiteConfigurationWriteException if there is no other one that would fit? Yes, I found that lonely 'typo3/sysext/core/Classes/Exception/SiteNotFoundException.php' and already suspected the way to go would be to enhance by adding exception classes there.. So my proposal is that I'll upload a new patch version throwing the RuntimeExceptions here which gets "master, 10.4, 9.5" and add a new change to improve the display of site configuration error messages including those new exceptions targeting "master, 10.4" -
Christian Kuhn uploaded patch set 5 11/03/21, 20:18
-
Christian Kuhn commented on patch set 5 CR -1 11/03/21, 20:18
rebased for now. will continues to work on it. -
core-ci voted on patch set 5 V -1 11/03/21, 20:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18827
-
Christian Kuhn uploaded patch set 6 11/03/21, 21:01
-
Christian Kuhn uploaded patch set 7 11/03/21, 21:01
-
Christian Kuhn uploaded patch set 8 11/03/21, 21:03
-
core-ci voted on patch set 6 V -1 11/03/21, 21:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18832
-
Christian Kuhn updated the commit message in patch set 9 11/03/21, 21:06
-
Christian Kuhn uploaded patch set 10 11/03/21, 21:08
-
Christian Kuhn voted on patch set 10 V +1 CR +1 11/03/21, 21:10
-
core-ci voted on patch set 7 V +1 11/03/21, 21:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18833
-
core-ci voted on patch set 8 V +1 11/03/21, 21:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18835
-
core-ci voted on patch set 10 V +1 11/03/21, 21:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18838
-
core-ci voted on patch set 9 V +1 11/03/21, 21:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18837
-
Stefan Bürk voted on patch set 10 V +1 CR +1 11/03/21, 23:30
-
Anja Leichsenring voted on patch set 10 V +2 CR +2 11/04/21, 07:51
-
Anja Leichsenring merged patch set 11 11/04/21, 07:51
SiteConfiguration.php:224