Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into v13.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	Classes/Verdict/Redirect.php
  • Loading branch information
davkraid committed Jan 6, 2025
2 parents d49168c + 4dcb79b commit 860e02f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Verdict/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ private function redirectToPage(): ?RedirectResponse
$page = GeneralUtility::makeInstance(PageRepository::class)->getPageOverlay($page, $targetLanguageId);

// Overlay record does not exist
if (!isset($page['_LOCALIZED_UID'])) {
$allowFallback = (bool) ($this->configuration['allowFallback'] ?? false);
if (!isset($page['_LOCALIZED_UID']) && $allowFallback === false) {
$this->logger->info(sprintf('There is no page overlay for page %d and language %d', $page['uid'], $targetLanguageId));

return null;
Expand Down
17 changes: 17 additions & 0 deletions Documentation/Functions/AssignLanguage/Verdicts/Redirect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,23 @@ Override Query Parameter
directed to the German language version of the page e.g. by clicking in the language menu. The language menu must then
generate all links with the query parameter attached (:code:`/de/?setLang`). The value of the parameter does not matter.

.. _functions-assignLanguage-verdicts-redirect-configuration-allowFallback:

Allow Fallback
~~~~~~~~~~~~~~~~~~~~~~
.. container:: table-row

Property
config.tx_locate.verdicts.[name].allowFallback
Data type
integer
Default
:code:`0`
Description
If the option is enabled, redirection to a non-localized page is allowed. In this case, the page is accessed under the
corresponding language URL, even if it does not exist. The displayed content corresponds to the defined fallback page
of your site configuration.

.. _functions-assignLanguage-verdicts-redirect-example:

Example
Expand Down

0 comments on commit 860e02f

Please sign in to comment.