Feature #24005

cObject CONTENT does not allow to fetch records that have no translation parent

Added by Benjamin Mack over 4 years ago. Updated almost 2 years ago.

Status:Resolved Start date:2010-11-10
Priority:Should have Due date:
Assigned To:Benjamin Mack % Done:

100%

Category:TypoScript Spent time: -
Target version:6.2.0
PHP Version:5.3 Sprint Focus:
Complexity:

Description

When you fetch records through the TypoScript object "CONTENT" (or, let's say through ".select" in general), you have an option called "languageField" in order to fetch only records that match the current language.

What "select" does here is that it fetches all records in the default language ("0,-1") and then overlays them with the records of the current language.

However, it's not possible to fetch the records that don't have a localization parent.

The patch introduces a new option called "includeRecordsWithoutDefaultTranslation" that also checks for records with the languageField matching the current language, where there is no translation parent (l10n_parent = '').

(issue imported from #M16332)

nodefaulttranslation.patch Magnifier (1.5 kB) Administrator Admin, 2010-11-10 16:26


Related issues

related to TypoScript Reference (TSref) - Feature #49106: Add new option "includeRecordsWithoutDefaultTranslation" ... Resolved 2013-06-13
precedes Core - Bug #57087: Property includeRecordsWithoutDefaultTranslation of the s... Resolved 2014-03-19

Associated revisions

Revision b3b5c7d9
Added by Benjamin Mack almost 2 years ago

[FEATURE] Let select() fetch records without translation parent

When you fetch records through the TypoScript object
"CONTENT" (or, let's say through ".select" in general),
you have an option called "languageField" in order
to fetch only records that match the current language.

What "select" does here, is that it fetches all records in
the default language ("0,-1") and then overlays them
with the records of the current language.

However, it's not possible to fetch the records that
don't have a localization parent.

The patch introduces a new option called
"includeRecordsWithoutDefaultTranslation" that also
checks for records with the languageField matching the
current language, where there is no translation parent
(l10n_parent = 0).

Change-Id: I48dc3a3b72a1dce515c5e5dd2278137888a1fe7f
Resolves: #24005
Releases: 6.2
Reviewed-on: https://review.typo3.org/13083
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13083

#2 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13083

#3 Updated by Markus Klein about 2 years ago

  • Category deleted (Communication)
  • Target version changed from 0 to 6.2.0

#4 Updated by Markus Klein about 2 years ago

  • Category set to TypoScript

#5 Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13083

#6 Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13083

#7 Updated by Gerrit Code Review almost 2 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13083

#8 Updated by Benjamin Mack almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF