Bug #85934

DatabaseQueryProcessor - doesn't respect the translation config

Added by Tanel Põld over 2 years ago. Updated 8 months ago.

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

0%

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

Description

Not sure, bug or a missing feature...

Using DatabaseQueryProcessor seems not to respect the translation config.
It shows pages in original language if translation does not exist.

Config:

config.sys_language_mode = strict
config.sys_language_overlay = hideNonTranslated

TypoScript:

dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
dataProcessing.10 {
    table = pages
    pidInList.field = pages
    as = pages
}

In the very same setup TYPO3\CMS\Frontend\DataProcessing\MenuProcessor works as expected and hides pages with no translations.


Related issues

Related to TYPO3 Core - Bug #85284: Workspace shows unchecked sectionIndex in previewNew2018-06-15

Actions
#1

Updated by Tanel Põld over 2 years ago

As a workaround this works, but obviously this is not respecting language config either and has other limitations...

[globalVar = GP:L > 0]
  dataProcessing.10 {
      table = pages
      pidInList.field = pages
      join = pages_language_overlay ON pages_language_overlay.pid = pages.uid
      where (
        pages_language_overlay.hidden = 0
        AND pages_language_overlay.deleted = 0
        AND pages_language_overlay.sys_language_uid = ###language###
        AND (pages_language_overlay.starttime < ###now### OR pages_language_overlay.starttime = 0)
        AND (pages_language_overlay.endtime > ###now### OR pages_language_overlay.endtime = 0)
      )
      selectFields = pages_language_overlay.*
      markers {
        language.data = GP:L
        now.data = date:U
      }
     as = pages
    }
[end]
#2

Updated by Christian von Holten about 2 years ago

  • TYPO3 Version changed from 8 to 9

For me it´s almost the same incorrect behaviour. If content is in free mode no content is shown on translated pages. I have tried a workaround with "select.includeRecordsWithoutDefaultTranslation = 1" which is not working as well.

tt_content.menu_contacts =< lib.contentElement
tt_content.menu_contacts {
    templateName = MenuContacts
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        10 {
            table = tt_content
            pidInList.field = pages

            # Does not work
            #select {
            #    includeRecordsWithoutDefaultTranslation = 1
            #    languageField = sys_language_uid
            #}

            as = content
            dataProcessing {
                10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
                10 {
                    references.fieldName = image
                }
            }
        }
    }
}
#3

Updated by Benni Mack almost 2 years ago

  • Status changed from New to Needs Feedback

We've made some improvements here now in the last weeks (9.5.2-dev), can you recheck this please?

#4

Updated by Rainer Roskothen almost 2 years ago

Hello, the improvements do their job. In version 9.5.2-dev from today it works without setting the parameter "includeRecordsWithoutDefaultTranslation". The example listed under #2 is a part of our project and works now.
Thanks!

#5

Updated by Marco Strotmeier almost 2 years ago

Are there any chances to get this running also under the current 8LTS (can reproduce the behaviour as described above in version 8.7.24)?

#6

Updated by Benni Mack over 1 year ago

Fixing this in v8 is really really hard, I'd suggest to rather do a proper XCLASS of this for v8 in your project. The main issue here is that until v9, "pages" had their translations in a separate table, which made it almost impossible to fix all issues related to that, as this behavior does not comply with any other record type in TYPO3.

#7

Updated by Tanel Põld over 1 year ago

Benni Mack wrote:

We've made some improvements here now in the last weeks (9.5.2-dev), can you recheck this please?

dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
dataProcessing.10 {
table = pages
pidInList.field = pages
as = pages
}

Language fallback modes:

1. Fallback Type -> Strict: Show only translated content, based on overlays
works NOT as expected, shows non translated pages as well.

2. Fallback Type -> Free mode: Ignore translation and overlay concept, only show data from selected language
Works as expected, shows only translated pages.

#8

Updated by Susanne Moog 8 months ago

  • Category set to Link Handling, Site Handling & Routing
#9

Updated by Christian Kuhn 4 months ago

  • Related to Bug #85284: Workspace shows unchecked sectionIndex in preview added

Also available in: Atom PDF