82142[BUGFIX] Prevent malformed SQL query in list module
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Guido Schmechel +1
-
Verified V +2 Done
- Stefan Bürk +2
- Guido Schmechel +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1821
-
Friedemann Altrock uploaded patch set 1 12/07/23, 12:28
-
core-ci voted on patch set 1 V +1 12/07/23, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50447
-
Garvin Hicking commented on patch set 1 12/07/23, 12:44
what would happen for admins without language restrictions, and if a page i.e. is temporarily moved outside a page tree and would be inspected? -
Stefan Bürk voted on patch set 1 CR -1 12/07/23, 12:53
-
Friedemann Altrock commented on patch set 1 12/07/23, 13:20
Reply
An admin has all languages available, so they can always see language 0. In the NullSite though they only see the default language, and the List module shows no page translations even though there are some. This query restriction only applies to the "Page translation" box at the start of the list module, so if the admin goes to the parent page, they see all translations in the table view of the child pages. If a page is moved from a site-covered page tree to a tree outside of any page, the translations vanish, but again: only for the list view on that particular page. -
Friedemann Altrock commented on patch set 1 12/07/23, 13:21
Reply
(s/any page/any site/ in that last sentence.) -
Stefan Bürk commented on patch set 1 12/07/23, 13:29
TBH - no qualified review yet, just a quick scrolling. See my comment for a suggestion to to it slightly in anotherway - not saying it's okay/or not or it should be dealt otherwise with.DatabaseRecordList.php:2375Instead of this if/else and non-sense dummy statement, we should do that in another way I guess: ``` $langConstraint = $queryBuilder->expr()->in( $GLOBALS['TCA']['pages']['ctrl']['languageField'], $queryBuilder->quoteArrayBasedValueListToIntegerList( array_keys($this->languagesAllowedForUser) ) ) ``` What do you think ? -
Christian Kuhn commented on patch set 1 CR -1 12/07/23, 13:37
hey. let's see if we could at least get rid of the nonsense query somehow? -
Friedemann Altrock uploaded patch set 2
CR -1V +112/07/23, 14:02 -
Friedemann Altrock commented on patch set 2 12/07/23, 14:03
Reply
Yeah Stefan pointed me to quoteArrayBasedValueListToIntegerList, much better that way.DatabaseRecordList.php:2375ReplyDone -
core-ci voted on patch set 2 V +1 12/07/23, 14:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50454
-
Jörg Bösche voted on patch set 2 CR +1 12/15/23, 10:19
-
Benni Mack voted on patch set 2 CR +1 01/25/24, 13:26
-
Friedemann Altrock rebased onto patch set 3
CR +1V +101/26/24, 11:33 -
core-ci voted on patch set 3 V +1 01/26/24, 11:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52236
-
Stefan Bürk voted on patch set 3 CR +1 V +1 01/26/24, 12:16
-
Guido Schmechel voted on patch set 3 CR +1 01/26/24, 12:25
-
Oliver Klee voted on patch set 3 CR +1 01/26/24, 12:30
-
Guido Schmechel commented on patch set 3 V +1 01/27/24, 14:09
In the end, I only managed to fix this error by setting a test group, but the patch works wonderfully in this context :-) -
Stefan Bürk voted on patch set 3 CR +2 V +2 03/06/24, 08:25
-
Stefan Bürk merged patch set 4 03/06/24, 08:39