Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Blog module group by issue 1055 error

edited August 22 in Modules

Some Fuel sites I have migrated to a new server, and on at least 2 occasions (so far) the Blog module has hit errors regarding MySQL 1055 error (where MySQL is v5.7.23).

In the Blog users and posts models' common queries, there is only 1 column in the GROUP BY, but this is denied by the MySQL settings.

I fixed the errors using:

posts model _common_query()
$this->db->group_by([$this->_tables['blog_posts'].'.id', $this->_tables['blog_users'].'.display_name' ]);

and in users model _common_query():
$this->db->group_by([$this->_tables['fuel_users'].'.id', $this->_tables['blog_users'].'.id']);

Comments

  • Can you run $this->debug_query() after it executes the query to output the raw SQL statement?

  • Actually... that won't work if it's erring before that.

  • It looks like it has something to do with the MySQL setting of "STRICT_TRANS_TABLES" (new one for me). I've pushed that fix to the blog module.

  • edited August 23

    I was getting this specifically:
    Error Code: 1055. Expression #26 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'display_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    The expression number varied in each model instance .

    It was new to me too - a new Cpanel / MySQL configuration default!?

Sign In or Register to comment.