Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

justincase breaks TYPO3 10.4.36 #15

Closed
CDRO opened this issue Feb 7, 2023 · 3 comments
Closed

justincase breaks TYPO3 10.4.36 #15

CDRO opened this issue Feb 7, 2023 · 3 comments

Comments

@CDRO
Copy link

CDRO commented Feb 7, 2023

Hi there,

when updating to the latest TYPO3 10.4.36 version (for obvious security reasons), one of our customers site broke.

This is our site configuration. The expected behaviour (as it was before and how it works if we disable justincase) is that on access to / you'll get redirected to /en/:

sites/site/config.yaml
base: '/'
disableStaticFileCache: false
errorHandling:
 -
   errorCode: '404'
   errorHandler: Page
   errorContentSource: 't3://page?uid=87'
languages:
 -
   languageId: '0'
   title: English
   navigationTitle: en
   base: /en/
   locale: en_GB.UTF-8
   iso-639-1: en
   hreflang: en-GB
   direction: ltr
   typo3Language: default
   flag: en-us-gb
   enabled: true
   websiteTitle: ''
   fallbackType: strict
   fallbacks: ''
 -
   languageId: '1'
   title: Deutsch
   navigationTitle: de
   base: /de/
   locale: de_CH.UTF-8
   iso-639-1: de
   hreflang: de-CH
   direction: ltr
   typo3Language: de
   flag: de
   enabled: true
   websiteTitle: ''
   fallbackType: strict
   fallbacks: ''
 -
   languageId: '2'
   title: Francais
   navigationTitle: fr
   base: /fr/
   locale: fr_CH.UTF-8
   iso-639-1: fr
   hreflang: fr-CH
   direction: ltr
   typo3Language: fr
   flag: fr
   enabled: true
   websiteTitle: ''
   fallbackType: strict
   fallbacks: ''
rootPageId: 1
websiteTitle: 'Customers page'
imports:
 -
   resource: ../global/route-enhancers.yaml
sites/globals/route-enhancers.yaml
routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: ''
    index: ''
    map:
      .html: 0
      rss.xml: 10
      sitemap.xml: 1533906435
What I've discovered so far:
  1. Something has changed in TYPO3 10.4.36 (or probably earlier => I was able to confirm that this has to with the latest change in TYPO3 10.4.36) that disallows "null" als LanguageObject (or maybe this was already the case before but the way the information is usually gathered changed).
  2. Nothing more... :-/

I don't like to create tickets without having an idea on how to fix this but I was sadly unable to find the reason why this happens :-( I hope you are luckier.

Best Regards
Tizian

@CDRO CDRO changed the title justincase breaks TYPO3 10.4.36 (and probably earlier) justincase breaks TYPO3 10.4.36 Feb 7, 2023
@bmack
Copy link
Member

bmack commented Feb 7, 2023

Hey Tizian,

thanks for the feedback. I wonder what change was conflicting this. Can you find that out? https://get.typo3.org/release-notes/10.4.36

@CDRO
Copy link
Author

CDRO commented Feb 8, 2023

Hi Benni,

I'm not sure yet, but I have another project using b13/justincase with TYPO3 11 that seems to have the same issue. As this is an ongoing project, I'll be able to invest more time in debugging and I'll post the progress and a potential solution here.

EDIT: I've looked into it, the $language is needed and for some reason, this was available before and passed to matchRequest via the $previousResult but does not work like this anymore. I've gone through all changes between 10.4.34 and 10.4.36 but I couldn't find what leads to the issue.

What did solve the issue was adapting the load order like this:

Configuration/RequestMilddlewares.php <?php return [ 'frontend' => [ 'b13/just-in-case' => [ 'target' => \B13\JustInCase\Middleware\LowerCaseUri::class, 'after' => [ 'typo3/cms-frontend/base-redirect-resolver', ], 'before' => [ 'typo3/cms-frontend/static-route-resolver', ], ] ] ];

@achimfritz
Copy link
Contributor

should be solved with 12917e0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants