levelLinksPosition=bottom is not working correctly especially with minitems=1 set and leads to misbehaviour in inline children
If record has inline elements with a "maxitems" value configured and the number of elements already assigned is "maxitems" - 1, the buttons "Add image" and "Select & upload files" are missing for the last added element. If "maxitems" is set to "1", the problem is already visible when adding one inline element.
The button does appear after saving the parent element though.
The buttons "Add image" and "Select & upload files" should appear right away when an inline element is added, even if "maxitems" is set to 1, or the number of already assigned element is maxitems-1.
Steps to reproduce (using EXT:news as an example)
1. Install EXT:news
2. Set the following PageTS
TCEFORM.tx_news_domain_model_news.content_elements.config.maxitems = 1 TCAdefaults.tt_content.CType = image
3. Add a content element in tab "Content elements" of the news record. A new content element of type "image" appears, but the "Add image" and "Select & upload files" are missing.
Tested in TYPO3 10.4.8 and news 8.4.0
Updated by Oliver Bartsch 10 months ago
- Subject changed from Button "Add image" is missing for last inline (IRRE) element if "maxitems" is configured to levelLinksPosition=bottom is not working correctly especially with minitems=1 set and leads to misbehaviour in inline children
I investigated that even further and it seems the reason is the combination of
['config']['maxitems'] = 1 and
['config']['appearance']['levelLinksPosition'] = 'bottom'.
If you change one of these, the inline-controls for FAL are displayed correctly.
However there seems to be a general misbehaviour as in my tests the newRecordLink button of the parent inline element (in this case
content_elements) is not hidden after the first element is created. And does also not show up again after removing one. This is partly also the case if maxitems > 1.
I added a test case to EXT:styleguide ( https://github.com/TYPO3/styleguide/pull/162) to reproduce the behaviour and changed the issue title accordingly.