Project

General

Profile

Actions

Bug #82880

open

Synchronize inline records triggers maxItemsError

Added by Nicole Cordes over 6 years ago. Updated over 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2017-10-29
Due date:
% Done:

0%

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

Description

How to reproduce:

1. Install attached extension.
2. Add new page.
3. Insert "Container" record on the created page.
3.1 Add two content records to "Container" field.
4. Translate the page to another language.
5. Translate the content element with "Translate" mode.
6. Open the container element in default language and attach a third inline content element.
7. Open the translated container element. You will see the third inline content element without translation.
8. Synchronize translated records with "Synchronize with original language"

Expected result:

I see three translated content records.

Actual result:

I see only two content elements afterwards. An error "A maximum of 3 child records are allowed." is triggered. Reloading the page however shows the expected records.

Guess:

I think the error is triggered before the untranslated record is removed. Thus the JavaScript prevents add the new (translated) content record. It seems the PHP-part of the localization works without errors.


Files


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #80036: FAL translation with TCA maxitems setNew2017-02-27

Actions
Actions #1

Updated by Andreas Wolf over 6 years ago

  • Status changed from New to Accepted

After investigation, I found out that this is indeed a pure JS issue:

  • memorizeAddRecord() adds the new element’s ID to the hidden field value, after which isBelowMax() will return false => this is required to remove the control buttons above/below the record list
  • domAddNewRecord() is called afterwards, to add the record to the list. Unfortunately, this also uses isBelowMax() to check if the limits have been exceeded. This fails because the hidden field value was extended in the previous call

Unlike I initially suspected, this is in no way related to the placeholder, as far as I can see.

IMO, the best fix for this would be to change isBelowMax and the code that writes to the hidden field to use the actually present records, as these are the source of truth in this case. This would require us to add the record UIDs to the rendered record HTML, but that is really simple, and change the code accordingly. I'm unsure if this would have any additional impact.

Actions #2

Updated by Gerrit Code Review over 6 years ago

  • Status changed from Accepted to Under Review

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/54521

Actions #3

Updated by Susanne Moog over 6 years ago

  • Category set to DataHandler aka TCEmain
Actions #4

Updated by Oliver Hader about 6 years ago

  • Category changed from DataHandler aka TCEmain to FormEngine aka TCEforms
Actions #5

Updated by Gerrit Code Review almost 6 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/54521

Actions #6

Updated by Peter Rauber almost 6 years ago

Any news when the fix will be released?

Actions #7

Updated by Riccardo De Contardi almost 6 years ago

  • Related to Bug #80036: FAL translation with TCA maxitems set added
Actions #8

Updated by Susanne Moog about 5 years ago

  • Status changed from Under Review to New

Patch has been abandoned.

Actions #9

Updated by Benni Mack about 5 years ago

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

Updated by Steffen G/G over 4 years ago

Its kind of wrong question. isBelowMax tests recordCount >= this.data.config[objectPrefix].max.

While configured in TCA maxItem are allowed.

So lets ask if isNotAboveMax e.g.
!(recordCount > this.data.config[objectPrefix].max)

Actions

Also available in: Atom PDF