Bug #88934

TypolinkViewHelper: Links to disabled pages in another language

Added by Chris Müller about 1 month ago. Updated about 1 month ago.

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

0%

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.

History

#1 Updated by Chris Müller about 1 month ago

  • Subject changed from TypolinkViewHelper: Links to hidden pages in another language to TypolinkViewHelper: Links to disabled pages in another language

#2 Updated by Chris Müller about 1 month ago

  • Description updated (diff)

Also available in: Atom PDF