function restoreAlias should verify if an alias really doesn't exist before adding it

Created on 18 January 2024, 11 months ago

Problem/Motivation

We use this module, and for some reason it floods the path_alias table with duplicate aliasses. So bad that an url will take really long to load because 400.000 records of the same alias are processed at every request.

Steps to reproduce

We have an aliasmanager in which an alias is not always available, while it is actually present in the alias table. In this case we end up in the fixed_alias_manager.

Proposed resolution

Before adding the alias, check if it doesn't exist yet. I can imagine that you expect it doesn't exist when you end up in this function. But our case clearly states that it is possible to end up here, while the alias actually exists in the table. Thus adding the check is not a luxury I think. And it does'nt hurt, so I think it is only improving the reliability.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇳🇱Netherlands joshahubbers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024