[BUGFIX] Catch orphaned language related exception 42/59642/2
authorPatrick Schriner <patrick.schriner@diemedialen.de>
Tue, 5 Feb 2019 11:57:21 +0000 (12:57 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 20 Feb 2019 12:17:48 +0000 (13:17 +0100)
Generating a preview link will not crash the backend when the relevant
site is missing the language information to build the proper url.

Resolves: #87510
Releases: master, 9.5
Change-Id: I49b006f83cb6dcf4f105f215e8c069b465b6408c
Reviewed-on: https://review.typo3.org/c/59642
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: dmst <sascha.ternes@diemedialen.de>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: dmst <sascha.ternes@diemedialen.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Utility/BackendUtility.php

index 09bfd2c..afc1315 100644 (file)
@@ -2403,7 +2403,7 @@ class BackendUtility
                     $anchorSection,
                     RouterInterface::ABSOLUTE_URL
                 );
-            } catch (SiteNotFoundException | InvalidRouteArgumentsException $e) {
+            } catch (SiteNotFoundException | \InvalidArgumentException | InvalidRouteArgumentsException $e) {
                 $previewUrl = self::createPreviewUrl($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript);
             }
         }