[BUGFIX] Qualify referrer column in referrer-domain queries#76
Merged
einpraegsam merged 1 commit intoJul 22, 2026
Merged
Conversation
The Sources analysis (LuxAnalysis/Analysis/sources) builds a subquery in getIdentifiedVisitorsPerReferrerSql() that joins tx_lux_domain_model_pagevisit with tx_lux_domain_model_visitor but references `referrer` unqualified in the SELECT expression. When the visitor table still carries a legacy `referrer` column (left over from older LUX versions, since schema migrations never drop obsolete columns), MySQL raises #1052 "Column 'referrer' in SELECT is ambiguous" and the whole module crashes. Qualify the column with the `pv.` alias in both referrer-domain query builders so it always resolves to tx_lux_domain_model_pagevisit regardless of legacy columns on joined tables.
Contributor
|
Thx for digging into that issue |
einpraegsam
deleted the
bugfix/ambiguous-referrer-column-in-sources-analysis
branch
July 22, 2026 17:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Claude Code]
Problem
Das Sources-Analysemodul (
LuxAnalysis/Analysis/sources) stürzt mit folgendem Fehler ab:#1052 An exception occurred while executing a query: Column 'referrer' in SELECT is ambiguousDer Fehler tritt auf, sobald die Tabelle
tx_lux_domain_model_visitornoch eine altereferrer-Spalte enthält (Überbleibsel aus älteren LUX-Versionen — Schema-Migrationen entfernen veraltete Spalten nie automatisch).Ursache
getIdentifiedVisitorsPerReferrerSql()verknüpfttx_lux_domain_model_pagevisitperINNER JOINmittx_lux_domain_model_visitor, referenziertreferrerimSELECTaber unqualifiziert:Haben beide Tabellen eine referrer-Spalte, kann MySQL die Spalte nicht mehr eindeutig auflösen und das gesamte Modul bricht ab.
Fix
Die Spalte wird in beiden Referrer-Domain-Queries mit dem Alias pv. qualifiziert, sodass sie unabhängig von veralteten Spalten auf verknüpften Tabellen immer auf tx_lux_domain_model_pagevisit verweist.
Geändert in Classes/Domain/Repository/PagevisitRepository.php (3 Zeilen):
Test