Bug #86597

Incorrect query of the fallback uids in the core

Added by Kay Röseler 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-10-08
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

Hello core team,

if only the default language is selected during fallback in the site configuration, the query in the file sysext/core/Classes/Site/Entity/SiteLanguage.php in line 153-155 no longer works because the query

if (!empty($attributes['fallbacks']))

fails because the array Attributes contains

fallbacks => '0'.

Instead, it should be checked for isset here.

Incorrect:

if (!empty($attributes['fallbacks'])) {
    $this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}

Correct:

if (isset($attributes['fallbacks'])) {
    $this->fallbackLanguageIds = is_array($attributes['fallbacks']) ? $attributes['fallbacks'] : explode(',', $attributes['fallbacks']);
}

Associated revisions

Revision 8ef66824 (diff)
Added by Daniel Goerz about 2 months ago

[BUGFIX] Allow fallback to default language in site config

Resolves: #86597
Releases: master
Change-Id: I119a83a76bb3b5695965490434daef78245c27dd
Reviewed-on: https://review.typo3.org/58698
Tested-by: TYPO3com <>
Reviewed-by: Jasmina Ließmann Tested-by: Jasmina Ließmann <code@frauliessmann.de> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> Reviewed-by: Markus Klein <markus.klein@typo3.org> Tested-by: Markus Klein <markus.klein@typo3.org>

History

#1 Updated by Josef Glatz 2 months ago

  • Description updated (diff)

#2 Updated by Josef Glatz 2 months ago

  • Description updated (diff)

#3 Updated by Georg Ringer 2 months ago

  • Category changed from Localization to Link Handling, Site Handling & Routing

#4 Updated by Susanne Moog about 2 months ago

  • Sprint Focus set to On Location Sprint

#5 Updated by Gerrit Code Review about 2 months 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/58698

#6 Updated by Anonymous about 2 months ago

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

Also available in: Atom PDF