[TYPO3-dev] TYPO3 6.2.4 - unexpected behaviour of sys_category relations vs 6.2.3

Christian Reiter cr at cNOSPAMxd.de
Thu Jul 10 23:55:05 CEST 2014


Hi,

I have found a strange behaviour in 6.2.4 versus 6.2.3 that may be 
considered a bug resulting from this change:

https://review.typo3.org/#/c/27378/4/typo3/sysext/backend/Classes/Form/FormEngine.php

In a TYPO3 6.2 website, backend users are categorizing FAL images per 
sys_category (they create the relations through the Filelist backend).

Every now and then a category itself is renamed, or moved into a 
different category etc. This is done by editing sys_category in the List 
module on the root (id=0) and has never been a problem in 6.2.3

With 6.2.4, there is always a warning /!\ on the tab "Items" and the 
category record cannot be saved (with or without changes). Saving always 
fails with the alert: "The fields marked with a yellow exclamation mark 
are not yet correctly filled in. Please complete them properly".

The tab "Items" of course contains the list of the category relations.
The only way to save it is to remove all relations in the "Items" tab 
exept one. Even with two relations it is not possible to save the 
category record.

The problem appears with previously existing categories as well as newly 
created test categories with new relations.

The problem disappears after switching the TYPO3 source to git tag 
"TYPO3_6-2-3" and clearing cache. It appears again instantly when 
switching back to tag "TYPO3_6-2-4".

Going through the git commits between 6.2.3 and 6.2.4 I consider the 
most probable cause for the new, unexpected limitation to be
https://review.typo3.org/#/c/27378/4/typo3/sysext/backend/Classes/Form/FormEngine.php

When I revert this change alone within the 6.2.4 code base it works 
again as expected.

The TCA in typo3\sysext\core\Configuration\TCA\sys_category.php doesn't 
set a value for 'maxitems' in the 'type' => 'group' definition for "items".

Therefore the new code will set it to maxitems =1 as I see it, while 
previously there was a catch-all of
	if (!$maxitems) {$maxitems = 100000;}

i.e.

the default 6.2.4 behaviour is effectively "if no maxitems set, allow 
only 1 relation"

the default 6.2.3 behaviour was "if no maxitems set, allow 100000 which 
should be enough for anyone;)

If so, shouldn't TCA\sys_category.php be updated with a maxitems setting 
to reflect that "Items" can have lots of relations? - basically 
unlimited since it uses an MM table which shouldn't have a fixed 
limitation of "maximum number of relations"?

This could also hit extensions or any other TCA definition that implied 
"unlimited relations" by not setting maxitems in a type=group field?

Best regards,

Christian






More information about the TYPO3-dev mailing list