Weird css error

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

Weird css error

Post by nervino »

Hello, I have uploaded a cmsms' 2.1.4 site from development environment to production server and I got this error in Design Manager => Stylesheets tab:

Code: Select all

SELECT SQL_CALC_FOUND_ROWS DISTINCT S.id FROM cms_layout_stylesheets S ORDER BY S.name ASC LIMIT 0, 100 -- Expression #1 of ORDER BY clause is not in SELECT list, references column 'mydb.S.name' which is not in SELECT list; this is incompatible with DISTINCT
The frontend works fine except for css.

- Server: ubuntu 16.04 (both development and production).
- I have exported/imported the db with phpmyadmin tool.
- I tried to install in two different ubuntu 16.04 servers with the same result.
- In dev it works great, of course...

Any ideas..?

Thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Weird css error

Post by calguy1000 »

So you have two Ubuntu 16.04 servers... and in one environment it works.. and in another you get the error.

This tells me that there is a difference in Mysql versions and/or configurations.

A little bit of googling brings me to this link: https://dev.mysql.com/doc/refman/5.7/en ... dling.html

which states:
MySQL 5.7.5 and up implements detection of functional dependence. If the ONLY_FULL_GROUP_BY SQL mode is enabled (which it is by default), MySQL rejects queries for which the select list, HAVING condition, or ORDER BY list refer to nonaggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on them. (Before 5.7.5, MySQL does not detect functional dependency and ONLY_FULL_GROUP_BY is not enabled by default. For a description of pre-5.7.5 behavior, see the MySQL 5.6 Reference Manual.)
So it looks like the problem was solved in your development server and you need to also solve it in your production server.

At this time I would suggest solving it at the server level as there may be other problems with this new mysqli default setting in other places.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

Re: Weird css error

Post by nervino »

I think you are right, as usual.
Thank you for the hint!

(I discovered that the production server isn't an ubuntu 16.04 - as I took for granted - but a 14.04.4 version with upgraded versions of PHP and MySQL.
The ubuntu 16.04 that I had installed in vmware has not the ONLY_FULL_GROUP_BY sql mode enabled, hence I think that it is shipped with ONLY_FULL_GROUP_BY disabled by default, cause I didn't disabled it).
Locked

Return to “[locked] Installation, Setup and Upgrade”