Title: Issue on Multisite with WPML
Last modified: August 15, 2017

---

# Issue on Multisite with WPML

 *  Resolved [tajenli](https://wordpress.org/support/users/tajenli/)
 * (@tajenli)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/)
 * I love your plugin and we use it for some mini-snippets in our multisite environment.
   We recently encountered a problem:
 * 1. We setup a new blank site, activate WPML.
    2. We added one snippet and found
   it’s not working (which was working in another subsite of the same network). 
   3. We checked the debug.log under /wp-content and we found this error: `WordPress
   database error Illegal mix of collations for operation 'UNION' for query SELECT
   id, code FROM wp_49_snippets WHERE active=1 AND (scope=0 OR scope=2) UNION ALL
   SELECT id, code FROM wp_ms_snippets WHERE active=1 AND (scope=0 OR scope=2) /*
   From [tjc.org/eastbayint/] in [/nas/content/live/tjcorg/wp-content/plugins/code-
   snippets/php/snippet-ops.php:496] */ made by require('wp-blog-header.php'), require_once('
   wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'),
   do_action('plugins_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array,
   execute_active_snippets` 4. We checked the tables in DB, the collation of wp_ms_snippets
   is utf8mb4_unicode_ci, but the collation of wp_49_snippets is utf8mb4_unicode_520_ci.
 * How do we fix this issue?
    Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissue-on-multisite-with-wpml%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9472541)
 * Well, an easy fix might be to manually convert the coalitions of your database
   tables to match. A tool such as PhpMyAdmin can do this. I can provide extra instructions
   if you would like; do you think that this would be possible?
 *  Thread Starter [tajenli](https://wordpress.org/support/users/tajenli/)
 * (@tajenli)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9473385)
 * Hi Shea,
    Thank you for the reply. I have done that, and it still not working.
   I still get the same error after I change the tables’ collation and make them
   all same. This is a strange issue. Thanks, Darren
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9474454)
 * It looks like changing the table collation is not enough; you need to change 
   the collation for the individual columns – at least, for the code column.
 * I was able to reproduce this and I think I have found a fix for it, by specifying
   a collation in the query itself. I’ve just released version 2.9.1; please try
   it out and let me know if it fixes things.
 *  Thread Starter [tajenli](https://wordpress.org/support/users/tajenli/)
 * (@tajenli)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9477784)
 * Hi Shea,
 * It’s working now! Thank you so much for looking into this issue!!! I really appreciate!
 * Darren
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9478016)
 * Thanks for confirming! And I’m sorry that it took me so long to solve this one.
 *  Thread Starter [tajenli](https://wordpress.org/support/users/tajenli/)
 * (@tajenli)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9487930)
 * Consider this is not a simple issue. You fixed it in quite short time.
    Again,
   thank you so much!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Issue on Multisite with WPML’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

 * [collation](https://wordpress.org/support/topic-tag/collation/)

 * 6 replies
 * 2 participants
 * Last reply from: [tajenli](https://wordpress.org/support/users/tajenli/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/issue-on-multisite-with-wpml/#post-9487930)
 * Status: resolved