Project

General

Profile

Actions

Bug #86361

closed

Filtering for a Backend User Group leads to an Exception in the Backend User Module

Added by Daniel Goerz over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-09-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Reproduce:

  1. Create some backend users and some backend user groups
  2. Assign groups to users
  3. 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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #88451: Module Backend User, Filtering leads to ExceptionClosed2019-05-28

Actions
Has duplicate TYPO3 Core - Bug #88245: Group filter in backend user module throws an exceptionClosed2019-04-29

Actions
Actions #1

Updated by Frank Nägler over 5 years ago

In v8 the filter does not work, but no exception is thrown.
In v7 the filter work as expected.

Actions #2

Updated by Daniel Goerz over 5 years ago

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.

Actions #3

Updated by Josef Glatz over 5 years ago

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.
Actions #4

Updated by Daniel Goerz over 5 years ago

  • Category set to Backend User Interface
Actions #5

Updated by Guido Schmechel over 5 years ago

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.

Actions #6

Updated by Guillaume Crico about 5 years ago

  • Has duplicate Bug #88245: Group filter in backend user module throws an exception added
Actions #7

Updated by Guillaume Crico about 5 years ago

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.

Actions #8

Updated by Oliver Hader almost 5 years ago

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...

Actions #9

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61117

Actions #10

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61117

Actions #11

Updated by Gerrit Code Review almost 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61117

Actions #12

Updated by Gerrit Code Review almost 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61117

Actions #13

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61264

Actions #14

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61265

Actions #15

Updated by Oliver Hader almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #16

Updated by Riccardo De Contardi over 4 years ago

  • Related to Bug #88451: Module Backend User, Filtering leads to Exception added
Actions #17

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF