Bug #88877

Redirects not working

Added by Edward A. Gabdullin 3 months ago. Updated 20 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-08-01
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
CodingNight
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

We're working with TYPO3 10.0.0. We have a multilingual website.

Redirects are configured, in version 9.5.8 they worked, after updating to version 10.0.0 they stopped working.

Screenshot_20190801_141408.png View (30.6 KB) Jonas Eberle, 2019-08-01 14:14

Scr-080.jpg View (92.6 KB) Edward A. Gabdullin, 2019-08-01 14:36

Scr-081.jpg View (111 KB) Edward A. Gabdullin, 2019-08-01 14:36

Scr-082.jpg View (99.5 KB) Edward A. Gabdullin, 2019-08-01 14:36

Scr-083.jpg View (42.8 KB) Edward A. Gabdullin, 2019-08-01 14:36

Scr-084.jpg View (110 KB) Edward A. Gabdullin, 2019-08-05 09:30


Related issues

Related to TYPO3 Core - Bug #88906: Redirects broken with invalid frontend user object Resolved 2019-08-03
Related to TYPO3 Core - Bug #89297: Fatal error for regular redirects Resolved 2019-09-28
Related to TYPO3 Core - Bug #89317: RedirectService instanciated without SiteFinder Resolved 2019-09-30

Associated revisions

Revision 72a9cca0 (diff)
Added by Andreas Fernandez 20 days ago

[BUGFIX] Ensure correct site is used when redirecting

The RedirectService recives a NullSite instance from the current
request. This patch checks whether the redirect target is a page and
fetches its site configuration to be able to create a proper TSFE
instance.

Also, the TSFE instance now does not fetch any template configuration
anymore as it is rather extraneous for a redirect.

Resolves: #88877
Releases: master
Change-Id: If0463d3ad9e8af47950f001c8646dc8a15b6a02b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61838
Reviewed-by: Frank Nägler <>
Reviewed-by: Oliver Hader <>
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>

Revision 1d11c313 (diff)
Added by Andreas Fernandez 18 days ago

[BUGFIX] Pass SiteFinder to RedirectService instance

The patch for #89317 extended the RedirectService, but didn't adjust all
constructors. In this case, IntegrityService was forgotten and didn't
pass a SiteFinder to the RedirectService.

This patch now passes the SiteFinder instance.

Resolves: #89317
Related: #88877
Releases: master
Change-Id: I1758dc8549cf5f58c7dbaf1475d10288af86316b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61866
Tested-by: Benjamin Kott <>
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Reviewed-by: Benjamin Kott <>
Reviewed-by: Oliver Hader <>

History

#1 Updated by Jonas Eberle 3 months ago

Hi, could you post your site config and the redirect you are trying to configure?

It is working for me.

Site config:

rootPageId: 1
base: 'https://t3-master.ddev.site/'
languages:
  -
    title: English
    enabled: true
    languageId: '0'
    base: /
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-us
    direction: ltr
    flag: us

#2 Updated by Edward A. Gabdullin 3 months ago

My configuration:

rootPageId: 1
base: 'https://elarum.ru/'
baseVariants: {  }
languages:
  -
    title: Русский
    enabled: true
    languageId: '0'
    base: /
    typo3Language: ru
    locale: ru_RU.UTF-8
    iso-639-1: ru
    navigationTitle: Русский
    hreflang: ru-RU
    direction: ltr
    flag: ru
  -
    title: English
    enabled: true
    languageId: '1'
    base: 'https://elarum.com/'
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-US
    direction: ltr
    fallbackType: strict
    fallbacks: ''
    flag: gb
  -
    title: Қазақ
    enabled: false
    languageId: '2'
    base: 'https://elarum.kz/'
    typo3Language: ru
    locale: kk_KZ.UTF-8
    iso-639-1: kk
    navigationTitle: Қазақ
    hreflang: kk-KZ
    direction: ''
    fallbackType: fallback
    fallbacks: '0'
    flag: kz
errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=85'
  -
    errorCode: '503'
    errorHandler: Page
    errorContentSource: 't3://page?uid=86'
routes:
  -
    route: sitemap.xml
    type: uri
    source: 't3://page?uid=1&type=1533906435'
routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: /
    suffix: /
    index: ''
    map:
      /: 0

#3 Updated by Edward A. Gabdullin 3 months ago

The redirect to files did not work in 9.5

#4 Updated by Jonas Eberle 3 months ago

I am trying in master (which is basically the same as v10 currently):

When redirecting to a file it works.

When redirecting to a page I get:

Call to undefined method stdClass::fetchGroupData()
in /var/www/html/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 897

1 or 2 languages does not matter.

So I can confirm that there is a problem, although I get a different error.

#5 Updated by Susanne Moog 3 months ago

  • Tags set to CodingNight

#6 Updated by Jonas Eberle 3 months ago

  • Related to Bug #88906: Redirects broken with invalid frontend user object added

#7 Updated by Edward A. Gabdullin 2 months ago

Applied patches from Bug #88906
I get the error again.
Redirect not working

#8 Updated by Riccardo De Contardi 27 days ago

  • Category set to Link Handling, Site Handling & Routing

#9 Updated by Gerrit Code Review 22 days ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61838

#10 Updated by Gerrit Code Review 22 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61838

#11 Updated by Edward A. Gabdullin 22 days ago

Gerrit Code Review wrote:

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61838

Applied this patch
Page redirect works
File redirect not working

#12 Updated by Oliver Hader 20 days ago

  • Related to Bug #89297: Fatal error for regular redirects added

#13 Updated by Gerrit Code Review 20 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61838

#14 Updated by Andreas Fernandez 20 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#15 Updated by Andreas Fernandez 18 days ago

  • Related to Bug #89317: RedirectService instanciated without SiteFinder added

Also available in: Atom PDF