Bug #81993
closed'Uncaught TYPO3 Exception' pops up when news records are localized
0%
Description
I recently installed tx_news v6.0.0 in my TYPO3 8.7.3 system. When 'Use content element relation' is checked in plugin settings, I tried to localize a news record.
My system contains around 4,50,000 content elements. Suddenly backend breaks with an exception
Uncaught TYPO3 Exception: An exception occurred while executing 'SELECT uid FROM tt_content WHERE (pid= ?) AND (uid IN (?, ?, ?, ?, ### HERE ARE AROUND 4,50,000 PLACEHOLDERS!### , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) ASC' with params [-1, 6877, ... ###HERE ARE AROUND 4,50,000 IDS!###, 0] Too many placeholders
When I unchecked the option, every thing works perfectly. What if I want to use inline content elements in news record with this much of content elements in the system.
Way to reproduce :-
1. Make sure TYPO3 system has a huge number of content elements like mentioned.
2. Install tx_news v6.0.0
3. Create a news record. Check whether the entry has a tab 'Content elements' in it when selected.
4. Try to localize this record.
Bug #81555 is similar and patch explained in it solves this issue. It manages the solution by breaking up total placeholders in the prepared statement into chunks of placeholders (around 65,000) and processes it. Unfortunately in a system with a huge number of content elements, it takes too much time to process a single localization.