Project

General

Profile

Actions

Bug #87982

open

Insert Records now only inserts records, if in the same language or if sys_language_uid = -1 - up to 8LTS it inserted records independent of sys_language_uid

Added by Daxboeck no-lastname-given over 5 years ago. Updated about 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Start date:
2019-03-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Insert Records
Complexity:
easy
Is Regression:
Yes
Sprint Focus:
Remote Sprint

Description

Dear Ladies and Gentlemen,

up to 8LTS, when selecting the "Insert Records" content element, TYPO3 just did show the inserted records on the target page without any language check.
with 9LTS, "Insert Records" performs a language check requiring the source content to be either of the same sys_language_uid or of -1.
It is my opionion that this breaks compatibility and that the language check in this case should be removed.

Next week I will investigate the core together with my developers to find a solution.

Best regards,

Patrick


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #89181: Behaviour of inserting content element "Insert Records [shortcut]" from other language changedClosed2019-09-16

Actions
Related to TYPO3 Core - Bug #88074: Language overlay on Content -> Insert RecordClosed2019-04-04

Actions
Actions #1

Updated by Daxboeck no-lastname-given over 5 years ago

Dear Ladies and Gentlemen,

I found a fix:

--- RecordsContentObject.php-2019-03-22-dax 2019-03-22 08:57:14.250440251 0100
++ RecordsContentObject.php 2019-03-22 11:54:13.442445523 0100
@ -95,9 +95,9 @
// Versioning preview
$this->getPageRepository()->versionOL($val['table'], $row);
// Language overlay
- if (is_array($row)) {
- $row = $this->getPageRepository()->getLanguageOverlay($val['table'], $row);
- }
// if (is_array($row)) {
// $row = $this->getPageRepository()->getLanguageOverlay($val['table'], $row);
// }
}
// Might be unset during the overlay process
if (is_array($row)) {

The LanguageOverlay check in this case is unnecessary as the records are inserted by uid and the language check is also incompatible with 8LTS.
However I am currently testing in my upgrade testing site clone.

Have a nice weekend and best regards,

Patrick

Actions #2

Updated by Benni Mack over 5 years ago

Hello Patrick,

I now rechecked this with various v8 installations we have:

On L=0
- Only L=-1 or L=0 records are shown, if you have selected other translated records, they are not rendered.

On L=2 (greek e.g.)
- If you reference a content element with L=0, then the translation gets shown
- If you reference a content element with language that does not match the current language (e.g. L=3) then it does NOT show up.

So, the current 9.5.6 behaviour (see my previous) comment allows this setup as well.

Actions #3

Updated by Benni Mack over 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #4

Updated by Daxboeck no-lastname-given over 5 years ago

Dear Benni,

In my opinion "Insert Records" does not need a sys_language_uid check.
If I want to insert a record intentionally of a different language, that check blocks it and it removes the option to do so for whatever reason.

But here an example: Assume I create an Address element which is in Language 0 in Latin characters and in Language 27 in Cyrillic Characters.
Now I have a site with English (sys_language_uid = 0), Ukrainian (sys_language_uid = 27) and Russian (sys_language_uid = 22) and then for my lazyness, I refer to the Latin version of the content element in the whole english site by "insert records", but for Ukrainian and Russian I use the same cyrillic version which is the Ukrainian version of that address.

For me the language check is unnecessary, as it gives no benefit at all.
Do you see a need to protect people from inserting records of another language ? Do you know a case ?

Alternatively, a configuration option could be introduced:
e.g. something like: insert_records.strict_language_check

For now I will keep my core patched to remove that check.

Best regards,

Patrick

Actions #5

Updated by Susanne Moog almost 5 years ago

  • Sprint Focus set to On Location Sprint
Actions #6

Updated by Susanne Moog over 4 years ago

  • Tracker changed from Bug to Feature
Actions #7

Updated by Daxboeck no-lastname-given over 4 years ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 9
  • Complexity set to easy
  • Is Regression set to Yes
  • Sprint Focus changed from On Location Sprint to Remote Sprint

Dear Susanne,

I do not agree with the redeclaration to "Feature". It would be a Feature, if it was working the current way with previous TYPO3 versions.
This breaks compatibility unnecessarily and is quite easy to fix by removing the language check in the code.

Best regards,
Patrick

Actions #8

Updated by Georg Ringer over 4 years ago

  • Related to Bug #89181: Behaviour of inserting content element "Insert Records [shortcut]" from other language changed added
Actions #9

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #10

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #11

Updated by Georg Ringer over 4 years ago

Dear Patrick,

as long as this patch is not merged, you can use https://github.com/georgringer/insert-records-overlaymode to achieve the same output

Actions #12

Updated by Georg Ringer over 4 years ago

  • Related to Bug #88074: Language overlay on Content -> Insert Record added
Actions #13

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #14

Updated by Gerrit Code Review about 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #15

Updated by Gerrit Code Review about 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #16

Updated by Gerrit Code Review about 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #17

Updated by Gerrit Code Review about 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64098

Actions #18

Updated by Georg Ringer about 3 years ago

  • Status changed from Under Review to New
Actions

Also available in: Atom PDF