Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8929 now.

MS SQL error on view all smilies after 3.0.6 upgrade (fix completed in vcs)

What version of phpBB are you using? phpBB 3.0.6
What is your board's URL? http://www.roverstalk.com
Who do you host your board with? self-hosted
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Conversion from phpBB2
Do you have any MODs installed? Yes
Is registration required to reproduce this issue? Yes
What MODs do you have installed? antibotquestion
What styles do you currently have installed? minimal
What language(s) is your board currently using? English
Which database type/version are you using? MS SQL Server
What is your level of experience? New to PHP but not phpBB
What username can be used to view this issue? test
What password can be used to view this issue? testtest
When did your problem begin? After upgrade to 3.0.6
Please describe your problem. When clicking to 'View more smilies' the following SQL error is displayed: -

SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]Column name 'phpbb_smilies.smiley_order' is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. [37000]

SQL

SELECT TOP 50 smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height FROM phpbb_smilies GROUP BY smiley_url, smiley_width, smiley_height ORDER BY smiley_order

BACKTRACE

FILE: includes/db/mssql_odbc.php
LINE: 165
CALL: dbal->sql_error()

FILE: includes/db/mssql_odbc.php
LINE: 217
CALL: dbal_mssql_odbc->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mssql_odbc->_sql_query_limit()

FILE: includes/functions_posting.php
LINE: 92
CALL: dbal->sql_query_limit()

FILE: posting.php
LINE: 133
CALL: generate_smilies()

While I can easily fix this I wondered if it had been picked up already.

Comments / History

Posted by bantu (3.0 Release Manager) on Dec 2nd 2009, 16:52

No, this hasn't been fixed yet.

Changed ticket severity from "Uncategorised/normal" to "Severe"

Action performed by Kellanved (Former Team Member) on Dec 13th 2009, 12:31

Posted by Kellanved (Former Team Member) on Dec 15th 2009, 08:44

Also happens in postgres.

Linked ticket with changeset: r10378

Action performed by APTX (Former Team Member) on Dec 24th 2009, 00:47

Changed ticket status from "New" to "Fix completed in SVN"

Action performed by APTX (Former Team Member) on Dec 24th 2009, 00:49

Marked ticket #58195 as duplicate of this ticket

Action performed by bantu (3.0 Release Manager) on Feb 26th 2010, 09:21

Posted by DavidIQ (MOD Team Leader) on Mar 2nd 2010, 17:20

This should fix it for both MSSQL and MySQL:
Code: Select all
       $sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height, MIN(smiley_order) AS min_smiley_order
           FROM ' . SMILIES_TABLE . '
           GROUP BY smiley_url, smiley_width, smiley_height
           ORDER BY min_smiley_order';

Tried the query in a MySQL4 installation I have.

Edited post #217385

Action performed by DavidIQ (MOD Team Leader) on Mar 2nd 2010, 17:28

Posted by ÜberRookie on Mar 4th 2010, 23:05

What should I do to fix this problem or what file do i need to apply the above fix?

Posted by A_Jelly_Doughnut (MOD Team Member) on Mar 4th 2010, 23:13

includes/functions_posting.php, specifically in function generate_smilies()

Marked ticket #58585 as duplicate of this ticket

Action performed by ToonArmy (Development Team Member) on Mar 5th 2010, 14:15

Changed ticket status from "Fix completed in SVN" to "Pending"

Action performed by DavidIQ (MOD Team Leader) on Mar 5th 2010, 16:31

Marked ticket #58705 as duplicate of this ticket

Action performed by nickvergessen (Development Team Member) on Mar 6th 2010, 19:00

Posted by Luchtzak on Mar 6th 2010, 19:24

In which update will this be fixed ?

Posted by Paul (MOD Team Member) on Mar 6th 2010, 19:37

In the next release probarly, 3.0.8

Changed ticket status from "Pending" to "Fix completed in SVN"

Action performed by ToonArmy (Development Team Member) on Mar 6th 2010, 20:52

Posted by ToonArmy (Development Team Member) on Mar 6th 2010, 20:52

MySQL regression reported here: Bug #PHPBB3-58585

Ticket details

Duplicates of this ticket

Related SVN changesets