Project

General

Profile

Actions

Bug #88934

open

TypolinkViewHelper: Links to disabled pages in another language

Added by Chris Müller over 4 years ago. Updated over 1 year ago.

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

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I am using the URI\TypolinkViewHelper in a Fluid template to generate a link from, e.g. t3://page?uid=42 (which an editor entered in a backend form field).

Correct behaviour:
When there is a link from a page in the default language (let's take English) to a page of the same language which is disabled, the TypolinkViewHelper returns an empty string. So I can check and hide the link and its text. That's okay.

Wrong behaviour:
Now I have a link in another language (e.g. German) to a disabled page in the same language (e.g. with the slug /german-page-slug). The TypolinkViewHelper returns a string which looks like /de/english-page-slug, which is wrong and results in a 404 page when following in the browser. But I expect the same behaviour as in the default language: returning an empty string.

In site configuration the fallback type of the language is set to strict.

I debugged the issue, and came to the PageRepository: In the getPagesOverlay method the overlay is identified, which is empty in the case. After that the output pages are assigned, the original page is set and if there is an overlay, it overwrites the original page fields. But if the overlay is empty, the original page fields are returned.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Story #101565: Frontend related translation issuesNew2023-08-03

Actions
Actions

Also available in: Atom PDF