Project

General

Profile

Actions

Bug #89498

open

FSC menu_categorized_content doesn't return content of non default language

Added by Jan Kiesewetter over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-10-24
Due date:
% Done:

0%

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

Description

Envireonment:
A site with multible languages and categorised content elements.

On a overview page we use the fsc ctype menu_categorized_content to display all ces related to a branch (category).
On the page with the default language menu_categorized_content returns all ces related to the category. Perfect!
On the translated page menu_categorized_content doesn't return any ce.

After checking the sql query there are two problems.

Query in default language:

SELECT tt_content.* FROM `tt_content` INNER JOIN `sys_category_record_mm` ON uid = sys_category_record_mm.uid_foreign AND sys_category_record_mm.uid_local IN(18) WHERE (`tt_content`.`pid` IN (1, 2, 3, 4, 5, 6, 7, 8, 9)) AND (tablenames='tt_content' and fieldname='categories') AND (`tt_content`.`sys_language_uid` IN (0, -1)) AND ((`tt_content`.`deleted` = 0) AND (`tt_content`.`t3ver_state` <= 0) AND (`tt_content`.`pid` <> -1) AND (`tt_content`.`hidden` = 0) AND (`tt_content`.`starttime` <= 1571910180) AND ((`tt_content`.`endtime` = 0) OR (`tt_content`.`endtime` > 1571910180)) AND (((`tt_content`.`fe_group` = '') OR (`tt_content`.`fe_group` IS NULL) OR (`tt_content`.`fe_group` = '0') OR (FIND_IN_SET('0', `tt_content`.`fe_group`)) OR (FIND_IN_SET('-2', `tt_content`.`fe_group`)) OR (FIND_IN_SET('13', `tt_content`.`fe_group`))))) GROUP BY `uid` ORDER BY `tt_content`.`header` ASC

Query in lang 1:

SELECT tt_content.* FROM `tt_content` INNER JOIN `sys_category_record_mm` ON uid = sys_category_record_mm.uid_foreign AND sys_category_record_mm.uid_local IN(18) WHERE (`tt_content`.`pid` IN (1, 2, 3, 4, 5, 6, 7, 8, 9)) AND (tablenames='tt_content' and fieldname='0') AND (`tt_content`.`sys_language_uid` IN (0, -1)) AND ((`tt_content`.`deleted` = 0) AND (`tt_content`.`t3ver_state` <= 0) AND (`tt_content`.`pid` <> -1) AND (`tt_content`.`hidden` = 0) AND (`tt_content`.`starttime` <= 1571909640) AND ((`tt_content`.`endtime` = 0) OR (`tt_content`.`endtime` > 1571909640)) AND (((`tt_content`.`fe_group` = '') OR (`tt_content`.`fe_group` IS NULL) OR (`tt_content`.`fe_group` = '0') OR (FIND_IN_SET('0', `tt_content`.`fe_group`)) OR (FIND_IN_SET('-2', `tt_content`.`fe_group`)) OR (FIND_IN_SET('13', `tt_content`.`fe_group`))))) GROUP BY `uid` ORDER BY `tt_content`.`header` ASC

Problems in the query:

1:

(tablenames='tt_content' and fieldname='0')

Seems like "data = field:category_field" returns 0 in non default lannguage.
https://github.com/TYPO3/TYPO3.CMS/blob/v8.7.28/typo3/sysext/fluid_styled_content/Configuration/TypoScript/ContentElement/MenuCategorizedContent.txt#L19

2:

(`tt_content`.`sys_language_uid` IN (0, -1)

It just queries default and all language records instead of the current language.

The first I have workedaround with fixing the fieldname

tt_content.menu_categorized_content.dataProcessing.10.where >
tt_content.menu_categorized_content.dataProcessing.10.where = {#tablenames}='tt_content' and {#fieldname}='categories'

For problem 2 I haven't a workaround yet.


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