Problem/Motivation
In our code base for a project an infinite loop seems to occur when accessing the website as the anonymous user.
Proposed resolution
Adding this at the beginning of l10n_quick_links_entity_load() fixes it:
if ($entity_type_id === 'user_role') {
return;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3201430-6-pass.patch | 4.28 KB | swentel |
| #6 | 3201430-6-fail.patch | 1.93 KB | swentel |
Comments
Comment #2
cyberwolf commentedComment #3
cyberwolf commentedComment #4
swentel commentedHi, thanks for reporting!
Interesting crash, this might be related with #3198690: Error Symfony\Component\Routing\Exception\RouteNotFoundException on install too, but in that case maybe with another entity that is being checked too early or so.
Haven't tested it yet anonymously, will do today!
Comment #5
swentel commentedUltimately, this is related with #3198136: Check entry point of loading fields, it's clear that hook_entity_load is dangerous in certain circumstances!
Closed the other one, digging further now!
Comment #6
swentel commentedFound a better entry point instead of hook_entity_load to record the fields.
Added a test for installation of the module. First one crashes heavily, second one passes green.
Doesn't test actual string recording yet, but manual testing was fine. Will add more later!
Comment #9
swentel commentedDone! Will push a new release in a few minutes.
Comment #10
swentel commented