Bug #90127

ambiguous column name title when editing content elements

Added by Daniel Siepmann about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Category:
DataHandler aka TCEmain
Start date:
2020-01-16
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When editing content elements, the following error is displayed when using sqlite:

Database Error

SQLSTATE[HY000]: General error: 1 ambiguous column name: title. A SQL error occurred. This may indicate a schema mismatch between TCA and the database. Try running database compare in the Install Tool.

This comes from fe_group field, where no sorting is defined. TYPO3 will add the ordering from CTRL section of foreign table without prefixing the table name.
In combination with pages, this results into "ambiguous column name: title":

SELECT "fe_groups"."uid", "fe_groups"."title", "fe_groups"."hidden" FROM "fe_groups", "pages" WHERE ( 1=1) AND ("pages"."uid" = "fe_groups"."pid") AND (("fe_groups"."deleted" = 0) AND ("pages"."deleted" = 0)) ORDER BY "title" ASC

Related issues

Related to TYPO3 Core - Bug #70677: Sorting of foreign records in TCA type select Resolved 2015-10-14

Associated revisions

Revision c2b99dd9 (diff)
Added by Daniel Siepmann about 1 month ago

[BUGFIX] Prevent ambiguous column name for TCA items

When fetching items from foreign table, they might be sorted based on
foreign table configured sorting. In such case the foreign table name is
prefixed to prevent ambiguous column name.

Resolves: #90127
Related: #70677
Releases: master, 9.5
Change-Id: Iebda2bd417481ae01b1265dd9be31b67af89991d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62929
Reviewed-by: Felix P. <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Tobi Kretschmann <>
Tested-by: Jörg Bösche <>
Tested-by: TYPO3com <>
Tested-by: Sascha Rademacher <>
Tested-by: Tobi Kretschmann <>

Revision 052a4501 (diff)
Added by Daniel Siepmann about 1 month ago

[BUGFIX] Prevent ambiguous column name for TCA items

When fetching items from foreign table, they might be sorted based on
foreign table configured sorting. In such case the foreign table name is
prefixed to prevent ambiguous column name.

Resolves: #90127
Related: #70677
Releases: master, 9.5
Change-Id: Iebda2bd417481ae01b1265dd9be31b67af89991d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62937
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Reviewed-by: Tobi Kretschmann <>

History

#1 Updated by Daniel Siepmann about 1 month ago

  • Assignee set to Daniel Siepmann
  • Target version set to Candidate for patchlevel

#2 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62927

#3 Updated by Gerrit Code Review about 1 month ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62929

#4 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62929

#5 Updated by Gerrit Code Review about 1 month ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62929

#6 Updated by Benni Mack about 1 month ago

  • Related to Bug #70677: Sorting of foreign records in TCA type select added

#7 Updated by Gerrit Code Review about 1 month ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62937

#8 Updated by Daniel Siepmann about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF