#1087651 ambiguous column name: uid
Description
Editing ‘defaultAsReadonly “1” on page “l10nreadonly”’ from styleguide on current main causes 3 error messages
> An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 ambiguous column name: uid. A SQL error occurred. This may indicate a schema mismatch between TCA and the database. Try running database compare in the Install Tool.
Debugging shows that “select_single” field is on of the fields causing this.
This is tested on sqlite.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 7
-
Markus Klein changed Related to #106502 <span data-processor="relativetime" data-value="2026-01-25T12:22:13+00:00" > 01/25/26, 12:22 </span>
-
Markus Klein commented <span data-processor="relativetime" data-value="2026-01-25T12:23:24+00:00" > 01/25/26, 12:23 </span>
TCA has `foreign_table_where = AND {#tx_styleguide_staticdata}.{#value_1} LIKE ‘foo’ ORDER BY uid`
In query the “order by uid” is the problem.
-
Markus Klein commented <span data-processor="relativetime" data-value="2026-01-25T12:30:33+00:00" > 01/25/26, 12:30 </span>
A possible solution probably is using `ORDER BY tx_styleguide_staticdata.uid` in TCA, but I’m not sure if the result is correct, because I presume the result should be sorted by `joined_table.uid`.
Sidenote:
foreign_table_where = AND {#tx_styleguide_staticdata}.{#value_1} LIKE '%foo%' ORDER BY {#tx_styleguide_staticdata}.uiddoes NOT work, the escaping is not processed for the orderby part. -
Benni Mack commented <span data-processor="relativetime" data-value="2026-01-25T12:59:13+00:00" > 01/25/26, 12:59 </span>
Markus Klein wrote in #note-4:
> A possible solution probably is using `ORDER BY tx_styleguide_staticdata.uid` in TCA, but I’m not sure if the result is correct, because I presume the result should be sorted by `joined_table.uid`.
>
> Sidenote:foreign_table_where = AND {#tx_styleguide_staticdata}.{#value_1} LIKE '%foo%' ORDER BY {#tx_styleguide_staticdata}.uiddoes NOT work, the escaping is not processed for the orderby part.This might be related to this issue then? #108534
-
Markus Klein changed Duplicates #108534 <span data-processor="relativetime" data-value="2026-01-25T23:59:56+00:00" > 01/25/26, 23:59 </span>
-
Markus Klein changed status
AcceptedClosed <span data-processor="relativetime" data-value="2026-01-26T00:00:16+00:00" > 01/26/26, 00:00 </span>
Query causing this: