clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

503 Error: Snippetpreview & Usergroups #311

Closed Ranunzel closed 1 year ago

Ranunzel commented 1 year ago

Typo3 12.4 : If you select Access-> Usergroup in the page settings, the Snippetpreview throws an error (503 -> page settings).

Bildschirmfoto vom 2023-06-01 13-51-51 Bildschirmfoto vom 2023-06-01 13-51-51 Bildschirmfoto vom 2023-06-01 13-26-20

clickstorm commented 1 year ago

Thanks for the hint. May you can test the fix.

mhirdes commented 1 year ago

Fixed in version 8.1.0

Ranunzel commented 1 year ago

Moin,

Tut mir leid ich war leider die letzten 2 Wochen krank. Habe es heute getestet - funktioniert leider nicht. Ihr habt eine andere Stelle gefixt, solange eine Seite Zugriffsbeschränkt ist (durch usergroups), kann man nicht mehr auf Page properties zugreifen.

Viele Grüße Renana

Am 5. Juni 2023 13:53:37 MESZ schrieb clickstorm @.***>:

Thanks for the hint. May you can test the fix.

-- Reply to this email directly or view it on GitHub: https://github.com/clickstorm/cs_seo/issues/311#issuecomment-1576645057 You are receiving this because you authored the thread.

Message ID: @.***>

mhirdes commented 1 year ago

Hi, hast du alle Caches geleert nach dem Update? Kannst du mich vllt. bei Slack kontaktieren und wir schauen mal zusammen drauf? VG

websi commented 1 week ago

@mhirdes Ich kann das Problem in der Version 8.2.1 für TYPO3 12 bestätigen. Das Problem ist das die Methode $GLOBALS['TSFE']->determineId($GLOBALS['TYPO3_REQUEST']); den Datensatz für die Seite wieder zurücksetzt. Dies wird nach euren Aufruf ausgeführt. Daher ist der Page Record wieder leer. https://github.com/clickstorm/cs_seo/blob/8x/Classes/Utility/TSFEUtility.php#L123

In der aktuellen 9er Version für TYPO3 13 ist scheint das behoben zu sein, aber für TYPO3 12 ist das Problem noch vorhanden.

websi commented 1 week ago

Quick fix:

Index: Classes/Utility/TSFEUtility.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Classes/Utility/TSFEUtility.php b/Classes/Utility/TSFEUtility.php
--- a/Classes/Utility/TSFEUtility.php
+++ b/Classes/Utility/TSFEUtility.php   (date 1728908987647)
@@ -123,6 +123,8 @@
                 $GLOBALS['TSFE']->determineId($GLOBALS['TYPO3_REQUEST']);
             }

+            $GLOBALS['TSFE']->page = $GLOBALS['TSFE']->sys_page->getPage($this->pageUid, true);
+
             // get TypoScript - see https://www.in2code.de/aktuelles/php-typoscript-im-backend-oder-command-kontext-nutzen/
             $rootlineUtil = GeneralUtility::makeInstance(RootlineUtility::class, $this->pageUid);