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;
}
CommentFileSizeAuthor
#6 3201430-6-pass.patch4.28 KBswentel
#6 3201430-6-fail.patch1.93 KBswentel

Comments

Cyberwolf created an issue. See original summary.

cyberwolf’s picture

Issue summary: View changes
cyberwolf’s picture

Issue summary: View changes
swentel’s picture

Hi, 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!

swentel’s picture

Ultimately, 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!

swentel’s picture

Status: Active » Needs review
StatusFileSize
new1.93 KB
new4.28 KB

Found 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!

The last submitted patch, 6: 3201430-6-fail.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • swentel committed 69a15e2 on 1.0.x
    Issue #3201430 by swentel: Infinite loop in hook_entity_load()...
swentel’s picture

Status: Needs review » Fixed

Done! Will push a new release in a few minutes.

swentel’s picture

Status: Fixed » Closed (fixed)