Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSSQL] Duplicate Column in ORDER BY Causes SQL Error in Tailor Entries (blog_post) #5838

Open
phongle8912 opened this issue Mar 3, 2025 · 0 comments

Comments

@phongle8912
Copy link

When accessing the Tailor entries page for blog_post, the following SQL error occurs:

SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique. (SQL: select top 50 [xc_edcd102e05254e4db07e633ae6c18db6c].* from [xc_edcd102e05254e4db07e633ae6c18db6c] where [xc_edcd102e05254e4db07e633ae6c18db6c].[draft_mode] not in (2, 4) and [xc_edcd102e05254e4db07e633ae6c18db6c].[is_version] = 0 and [xc_edcd102e05254e4db07e633ae6c18db6c].[deleted_at] is null order by [published_at_date] desc, [published_at_date] desc)

Steps to Reproduce

Navigate to tailor/entries/blog_post in the OctoberCMS backend.
The system attempts to retrieve the entries list.
The error appears due to a duplicate column in the ORDER BY clause (published_at_date appears twice).

Environment

October CMS Version: 3.7.11
PHP Version: 8.2
Database: Microsoft SQL Server (ODBC Driver 17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant