#80036FAL translation with TCA maxitems set
Description
There is a bug with “Localize all records” and “Synchronize with original language”.
In my TCA a have a FAL field with maxitems=1.
If I go to the translated record and hit one of those buttons, I get the error message “A maximum of 1 child records are allowed.”.
However, after reloading the form, it seems the FAL record is translated.
Reviews 1
Related issues 1
History 1314
-
Georg Ringer changed category status
NewAccepted Is Regression01 Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2017-02-27T13:21:04+00:00" > 02/27/17, 13:21 </span> -
Alexander Stehlik commented <span data-processor="relativetime" data-value="2017-03-30T00:43:36+00:00" > 03/30/17, 00:43 </span>
I can confirm this bug. It also affects version 7.
-
Stefan Herndler commented <span data-processor="relativetime" data-value="2018-03-08T15:30:48+00:00" > 03/08/18, 15:30 </span>
This is a JS error message and luckily does not affect the ajax request to localize any child records.
Affected line of code: typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js:155The script fires an error notification if the number of childs is equal or greater than the defined ‘maxitems’ of the TCA (only ‘below max’ is valid).
Typo3 version is 8.7.10
-
Gerrit Code Review pushed patch set 1 for TYPO3_7-6 to change 57124 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2018-06-04T16:10:58+00:00" > 06/04/18, 16:10 </span> -
Eduard Luft commented <span data-processor="relativetime" data-value="2018-06-04T16:15:30+00:00" > 06/04/18, 16:15 </span>
Gerrit Code Review wrote:
> Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
> It is available at https://review.typo3.org/57124Patch for TYPO3_7.6!
By removing the redundant isBelowMax condition in domAddNewRecord the localize or synchronize function will no longer throw a fake message for elements with the tca setting ‘maxitems=1’. I removed the message output completely in domAddNewRecord, because the new button disappears if the ‘maxitems’ amount is reached. Also adding the ‘isBelowMax’ condition in synchronizeLocalizeRecords to prevent an fatal error by create a new element followed by the localize button.
-
Peter Rauber commented <span data-processor="relativetime" data-value="2018-07-23T11:07:40+00:00" > 07/23/18, 11:07 </span>
Possibly another ticket duplicates this one: https://forge.typo3.org/issues/82880
Seems a little more progress has been done there. -
Riccardo De Contardi changed Related to #82880 <span data-processor="relativetime" data-value="2018-07-23T14:51:14+00:00" > 07/23/18, 14:51 </span>
-
Wouter Wolters changed status
Under ReviewNew <span data-processor="relativetime" data-value="2018-10-28T13:00:05+00:00" > 10/28/18, 13:00 </span> -
Steffen G/G commented <span data-processor="relativetime" data-value="2019-10-24T17:35:06+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) -
Lidia Demin commented <span data-processor="relativetime" data-value="2020-09-02T10:30:01+00:00" > 09/02/20, 10:30 </span>
Can still confirm this issue on TYPO3 9.5.20 with PHP 7.2
-
Marcin Sągol commented <span data-processor="relativetime" data-value="2023-10-30T13:38:36+00:00" > 10/30/23, 13:38 </span>
Could you please provide more information, such as:
- what language configuration for the site do you have
- attach the TCA for the problematic field
I tested it on T3-dev (13) by modifying the core image field and setting maxitems to 1 or 2, and enabling the showSynchronizationLink and showAllLocalizationLink options. In both cases, the translation worked fine for me (a page with 2 languages available). There were no JS errors displayed in the TYPO3 panel.
-
Lidia Demin commented <span data-processor="relativetime" data-value="2023-10-31T07:40:06+00:00" > 10/31/23, 07:40 </span>
Sadly, I can’t provide information about this issue anymore. Maybe one of the other contributors can.
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-06T10:59:22+00:00" > 11/06/26, 10:59 </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 here. Closing, please open a new issue if this still happens on a supported version.
TYPO3 Version is 8.6.0