#82880Synchronize inline records triggers maxItemsError
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.
Reviews 1
Related issues 2
Files 1
History 1012
-
Andreas Wolf commented and changed status
NewAccepted <span data-processor="relativetime" data-value="2017-10-31T23:04:08+00:00" > 10/31/17, 23:04 </span> -
Gerrit Code Review pushed patch set 2 for master to change 54521 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2017-11-02T11:22:49+00:00" > 11/02/17, 11:22 </span> -
Susanne Moog changed category <span data-processor="relativetime" data-value="2017-11-04T11:39:29+00:00" > 11/04/17, 11:39 </span>
-
Oliver Hader changed category <span data-processor="relativetime" data-value="2018-03-07T13:20:49+00:00" > 03/07/18, 13:20 </span>
-
Gerrit Code Review pushed patch set 3 for master to change 54521 <span data-processor="relativetime" data-value="2018-05-08T12:28:24+00:00" > 05/08/18, 12:28 </span>
-
Peter Rauber commented <span data-processor="relativetime" data-value="2018-07-23T11:09:33+00:00" > 07/23/18, 11:09 </span>
Any news when the fix will be released?
-
Riccardo De Contardi changed Related to #80036 <span data-processor="relativetime" data-value="2018-07-23T14:51:15+00:00" > 07/23/18, 14:51 </span>
-
Susanne Moog commented and changed status
Under ReviewNew <span data-processor="relativetime" data-value="2019-03-01T20:06:38+00:00" > 03/01/19, 20:06 </span>Patch has been abandoned.
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2019-04-17T23:41:37+00:00" > 04/17/19, 23:41 </span>
-
Steffen G/G commented <span data-processor="relativetime" data-value="2019-10-24T17:35:32+00:00" > 10/24/19, 17:35 </span>
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) -
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-06T10:57:58+00:00" > 11/06/26, 10:57 </span>The client-side IRRE code was rewritten in TYPO3 v10.0 (#88182). The old domAddNewRecord(), which ran the max-items check again after the new uid had already been memorized, no longer exists. Synchronize/localize now adds the returned records first and memorizes them afterwards, so the false “A maximum of N child records are allowed.” notification can no longer appear. This was also confirmed on v13 in #80036. Closing, please open a new issue if this still happens on a supported version.
-
Benni Mack changed Related to #88182 <span data-processor="relativetime" data-value="2026-11-06T10:58:08+00:00" > 11/06/26, 10:58 </span>
After investigation, I found out that this is indeed a pure JS issue:
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.