Bug #86361
closed
Filtering for a Backend User Group leads to an Exception in the Backend User Module
Added by Daniel Goerz about 6 years ago.
Updated almost 5 years ago.
Category:
Backend User Interface
Description
Reproduce:
- Create some backend users and some backend user groups
- Assign groups to users
- filter for a specific group
An exception ('Serialization of 'Closure' is not allowed') is thrown (at least for some people).
While discussing this in the core-dev slack channel it turned out that the serialization of the full blown demand object most likely is the issue here. However some people could not reproduce the exception.
Suggested solution by Frank:
the UC should not store the whole object.
The demand object contains the selected backend user group object, which also containts the extbase overhead.
backendUserGroup in UC should only be the UID of the group
In v8 the filter does not work, but no exception is thrown.
In v7 the filter work as expected.
We discovered another issue with this filtering:
If a group record is disabled it still shows up in the filter but it is not present in the demand object (since extbase does not do mapping for hidden records). If the filter is set to such a record no exception occurs but the filtering is not applied either.
My conclusio so far: 9.5 master, php 7.2, apache, Linux, MySQL 5.6
- √ I don't get any exception at all
- There is no difference if any of the users is disabled
- If you want to filter by a group which is disabled, the filter doesn't work
- √ If you want to filter by a group which is enabled (no matter if their related users are disabled or not) , the filter work without changing anything
- Basically I can't get an exception (tried some scenarios with Daniel already)
- For me – another bug – the query for the usergroup needs a rewrite (see
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserRepository.php:97
) to also support disabled usergroups, as this is something the module must support for such scenario.
- Category set to Backend User Interface
TYPO3 Version 9.5.0-dev
Webserver Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.2
PHP Version 7.2.2
Database (Default) MySQL 5.5.5-10.1.30-MariaDB
After filtering a group:
(1/2) Doctrine\DBAL\DBALException
An exception occurred while executing 'UPDATE `be_users` SET `uc` = ? WHERE `uid` = ?' with params... (Really biiiig object ;-))
And i can see a disabled group in the filter, too.
- Has duplicate Bug #88245: Group filter in backend user module throws an exception added
Please note that this issue exists since <https://forge.typo3.org/issues/39141> (since TYPO3 6.something).
When BE users have selected a group, and so added this big overhead in their UC, each time the UC is updated (which is quite often in typical BE usage), a lot of MySQL write operations happen (example: up to several MB per BE request that modifify UC).
When using a MySQL master/slave setup, even for a non-busy instance (only 3 BE admins using the BE at the same time, only a few dozen of BE users per BE groups), this can lead to several GB/minute additions to the MySQL binary log (which will "slow down", and then crash)!
So I think that the priority of this bug should be raised, and that the fix should be backported to all supproted versions.
Basically the idea of storing everything does not seem that good. Besides that LazyObjectStorage
extends ObjectStorage
which has serialize
and unserialize
methods that would throw an exception - however since \Serializable
is not (correctly) implemented, this is not triggered. In my scenario on master (10.0-dev) the backend user uc
should be filled with 16 MB of serialized data...
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Related to Bug #88451: Module Backend User, Filtering leads to Exception added
- Status changed from Resolved to Closed
Also available in: Atom
PDF