Loading...
 
Skip to main content

user watches don't work after an upgrade from 2.x to 3.0

Status
Closed
Subject
user watches don't work after an upgrade from 2.x to 3.0
Version
3.x
Category
  • Error
Feature
Wiki (page view, edit, history, rename, etc)
Watch (email notifications of changes)
Resolution status
Fixed or Solved
Submitted by
magowiz
Lastmod by
magowiz
Rating
(0)
Description

After an upgrade from 2.x to 3.0 if I edit a page while user watches are enabled I get an error similar to this :

Errore

An error occured in a database query!

Context:
File tiki-editpage.php
Url tiki-editpage.php?page=Italiano
Query:
select tuw.*, tup1.`value` as language, tup2.`value` as mailCharset from `tiki_user_watches` tuw left join `tiki_user_preferences` tup1 on (tup1.`user`=tuw.`user` and tup1.`prefName`='language') left join `tiki_user_preferences` tup2 on (tup2.`user`=tuw.`user` and tup2.`prefName`='mailCharset') where `event`=?and (`object`=?) UNION DISTINCT select tgw.watchId, uu.login, tgw.event, tgw.object, tgw.title, tgw.type, tgw.url, uu.email, tup1.value as language, tup2.value as mailCharset from tiki_group_watches tgw inner join users_usergroups ug on tgw.`group` = ug.groupName inner join users_users uu on ug.userId = uu.userId and uu.email is not null and uu.email <> '' left join `tiki_user_preferences` tup1 on (tup1.`user`=uu.`login` and tup1.`prefName`='language') left join `tiki_user_preferences` tup2 on (tup2.`user`=uu.`login` and tup2.`prefName`='mailCharset') where `event`=?and (`object`=?)
Values:
0 wiki_page_changed
1 Italiano
2 wiki_page_changed
3 Italiano
Message:
Built query was probably:
select tuw.*, tup1.`value` as language, tup2.`value` as mailCharset from `tiki_user_watches` tuw left join `tiki_user_preferences` tup1 on (tup1.`user`=tuw.`user` and tup1.`prefName`='language') left join `tiki_user_preferences` tup2 on (tup2.`user`=tuw.`user` and tup2.`prefName`='mailCharset') where `event`='wiki_page_changed'and (`object`='Italiano') UNION DISTINCT select tgw.watchId, uu.login, tgw.event, tgw.object, tgw.title, tgw.type, tgw.url, uu.email, tup1.value as language, tup2.value as mailCharset from tiki_group_watches tgw inner join users_usergroups ug on tgw.`group` = ug.groupName inner join users_users uu on ug.userId = uu.userId and uu.email is not null and uu.email <> '' left join `tiki_user_preferences` tup1 on (tup1.`user`=uu.`login` and tup1.`prefName`='language') left join `tiki_user_preferences` tup2 on (tup2.`user`=uu.`login` and tup2.`prefName`='mailCharset') where `event`='wiki_page_changed'and (`object`='Italiano')


Only if I disable the feature "monitoring" the error doesn't show up.

Solution

It was a problem with some tables in my database, infact if I query directly the database I get the error :
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

I checked my db and I found some tables that was set in utf8_general_ci while the others (almost all) was set to utf8_unicode_ci

To solve my issue I had to convert the tables that has a different collation to the right collation :
ALTER TABLE tiki_webservice_template CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2595
Created
Saturday 27 June, 2009 16:19:19 UTC
by Unknown
LastModif
Sunday 18 June, 2017 23:01:14 UTC


Show PHP error messages