Important Notice: Effective immediately, all support will be handled through Discord. Read more about the changes coming to Anodyne's services.

Deck Listings Database Error

Having a problem getting Nova installed? Can't figure out why something isn't working right? This is the place to get help and report any bugs you find with Nova!

dellucci Sat Aug 26, 2017 5:05 pm

Deck Listings Database Error


I've just installed Nova and updated the specs page. When I click the 'Desk Listing' link I get the following error:

A Database Error Occurred
Error Number: 1055

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nova_tour_decks.deck_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT * FROM (`nova_tour_decks`) GROUP BY `deck_item`

Filename: \nova\ci\database\DB_driver.php

Line Number: 331

I've checked the database and the table is there but is empty. Any help would be most welcome.

Posts: 1

AgentPhoenix Tue Aug 29, 2017 8:46 am

Re: Deck Listings Database Error

The error you're seeing is a new feature in MySQL 5.7 which is the latest version. Nova 2 wasn't designed with some of that stuff in mind. The first thing to do is going to be to reach out to your host and see if they can disable the ONLY_FULL_GROUP_BY SQL mode. If they can't or won't do that, then we'll need to look at other solutions, but that's probably the simplest right now.
User avatar

Posts: 7596

optimashprime Sat Feb 22, 2020 4:09 pm

Re: Deck Listings Database Error

Sorry to bump an old thread, but I am also having this issue.

I reached out to my hosting company and they basically said that the database is global, therefore they cant disable that mode.

They do have a potential fix, though I am not exactly sure how to deploy it.

I attempted to add it into the code like this:

Code: Select all

public function count_deck_items()
      $query = $this->db->get();
      return $query->num_rows();

But it just threw another error. What would be the correct method of doing it? I have a feeling that I will need to add this into several pieces of code, is there a way to set this globally, without having to edit each line of code?

Any help would be appreciated.


P.S. I also get a similar error when trying to add pages to the wiki

Code: Select all

A Database Error Occurred
Error Number: 1364

Field 'page_draft' doesn't have a default value

INSERT INTO `ebsims_cerberuswiki_pages` (`page_created_at`, `page_created_by_user`, `page_created_by_character`, `page_comments`) VALUES (1582435416, '1', '1', 'open')

Filename: /usr/www/ebsims/public/cerberus/nova/modules/core/models/nova_wiki_model.php

Line Number: 376

Posts: 2

AgentPhoenix Mon Feb 24, 2020 7:28 am

Re: Deck Listings Database Error

That won't work because it's a MySQL function, not a PHP function. In reality, your only option is to do the first thing they mentioned.

Nova already does some setup work with the SQL mode in the core system model with the prepare_database_session method. You'll likely need to modify that to make sure that particular mode is pulled out before Nova sets the mode. (Of course, make sure you copy the method out of the core and put it into the normal system model in application/models first.)

I believe you may be able to potentially duplicate the checks that are there for that mode as well.
User avatar

Posts: 7596

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest