Every time I try to enable an existing view or try to create a new view the warning at the bottom of this message results. My views are actually visible in the browser, but I still want to find out what is wrong so don't run into more problems as the site grows in the future. This is a fairly fresh install of Drupal, and views.
My website address is http://www.buydestroyitshredders.com/.
This message appears in the admin's "edit" section of any view in my drupal site:
user warning: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' query: SELECT s.uid, v.updated FROM views_object_cache v INNER JOIN sessions s ON v.sid = s.sid WHERE s.sid != 'dee2d60aa1e2e63013b7ed77d396ecf5' and v.name = 'glossary' and v.obj = 'view' ORDER BY v.updated ASC in /home/buydestr/public_html/sites/default/modules/views/views_ui.module on line 242.
user warning: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' query: SELECT s.uid, v.updated FROM views_object_cache v INNER JOIN sessions s ON v.sid = s.sid WHERE s.sid != 'dee2d60aa1e2e63013b7ed77d396ecf5' and v.name = 'glossary' and v.obj = 'view' ORDER BY v.updated ASC in /home/buydestr/public_html/sites/default/modules/views/views_ui.module on line 242.
As you can see this user warning repeats twice.
If anyone can give me any ideas of what to do that would be great! Ive already tried reinstalling views, and still no good. Thank you so much for any tips!
-Eric Buhlman
Comments
Comment #1
karens commentedThis is not a Views issue, it says you have a sessions table with the wrong collation and you can't combine data from tables using different collations into the same query. Use something like PhpMyAdmin to see the collations for your tables and update them to the right collation (all should be utf8_general_ci). I don't remember exactly how to do that, Google around for instructions on how to do this if you can't figure it out.
Comment #2
EricBuhl commentedThanks for your help Karen. I will give this a try and let you know how I make out. :)
Comment #3
EricBuhl commentedYay, this completely fixed my problems! I logged into my phpMyAdmin from my hosting provider and changed all the existing collations to utf8_general_ci. I did this by clicking on each table and editing the collations manually, one table at a time. It took a little time, but as soon as all my collations were converted the error message disappeared. Thank you so much. I am very grateful for your help.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
allanh commentedInstead of doing this table by table in phpMyAdmin, you could also use this script:
http://dhani.web.id/index.php/2008/12/24/alter-all-tables-in-all-database/
Comment #6
dieDuiwel commentedNot sure if I'm missing something obvious, but I have had the same issue and have changed all collation settings to utf8_general_ci using the MySQL Administrator kit. All fields now have the right setting but I am still getting the warning from editing or cloning views?
One strange thing is phpMyAdmin which also shows all tables have in fact been set to utf8_general_ci but at the bottom (totals) row of the list of tables, the row heading for the Collation column has the caption utf8_unicode_ci? But this seem to me to be a co-incidence?..perhaps a phpMyAdmin bug or is it related to the warnings still appearing within drupal/views ?
Any help would be great.
Thanks
------
Found the problem... even though all table settings where set to utf8_general_ci, some table fields where still set to utf8_unicode_ci... sorting those out got rid of the collation warning
Comment #7
wackychimp commentedFor what it's worth, I had this same error with a Fantastico De Luxe installation of 6.13.
I went in with PHPMyAdmin and edited the "sessions" table to set the sid, hostname and session fields to all be "utf8_general_ci". At first I was trying to set ALL of the fields in the "views_object_cache" table to the "utf8_general_ci" collation, but you can't do that with the integer field.
Anyway, in case someone is having the same problem, it was in my "sessions" table not the "views_object_cache" table. I just needed to read the whole SQL statement to see that the inner join was looking for another table.
Comment #8
klucid commentedThis worked beautifully! Thank you.
Comment #9
Milkrow commentedI used convert.php and it solved this problem.
Comment #10
StingeyB commentedWorked perfectly.
Comment #11
ctraue commentedI just ran into the same problem (again) and found this utility that changes the collation of all columns in all tables in a given database. Also, it takes the connection parameters as form input values --- so, no risk of saving (and forgetting to delete) you database connection string somewhere accessible in your site.
http://www.phoca.cz/documents/38-tools/154-how-to-change-collation-in-da...
The actual ZIPped PHP script can be downloaded here
http://www.phoca.cz/download/category/17-phoca-changing-collation-tool?d...
It's a PHP script which you upload onto your web server, call it through your web browser, give it your credentials and it does the collation conversion. Worked like a charm for me!
Comment #12
mikeytown2 commentedThis can change the collation for you
http://drupal.org/project/dbtuner
Comment #13
llorberb commentedI used the dbtuner. It returned an warning about offset type but fixed all of my collation issures.
Thanks.