Create new page exception

mojoPortal is no longer supported on mono. This forum is here for archival purposes.

This thread is closed to new posts. You must sign in to post in the forums.
6/14/2007 1:47:33 AM
Gravatar
Total Posts 18

Create new page exception

Hi all!

I was able to login as admin since my last post, and found new exception. When I press "Create new page" icon, I receive nothing but this exception:

==================================================

Server Error in '/' Application
#HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

Description: Error processing request.

Error Message: HTTP 500. MySql.Data.MySqlClient.MySqlException: #HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

Stack Trace:

MySql.Data.MySqlClient.MySqlException: #HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
at MySql.Data.MySqlClient.PacketReader.CheckForError () [0x00000]
at MySql.Data.MySqlClient.PacketReader.ReadHeader () [0x00000]
at MySql.Data.MySqlClient.PacketReader.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.Int64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.CommandResult.ReadNextResult (Boolean isFirst) [0x00000]
at MySql.Data.MySqlClient.CommandResult..ctor (MySql.Data.MySqlClient.Driver d, Boolean isBinary) [0x00000]
at MySql.Data.MySqlClient.NativeDriver.SendQuery (System.Byte[] bytes, Int32 length, Boolean consume) [0x00000]
at MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet (MySql.Data.MySqlClient.MySqlDataReader reader) [0x00000]
at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlCommand:GetNextResultSet (MySql.Data.MySqlClient.MySqlDataReader)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]

14.06.2007 6:36:46

==================================================

A little bit strange. =)

I was able to solve encoding problems at previous portal, but I can not do it again. So all my Russian letters in utf8 encoding are converted to garbage when saved to db.

CarGa.

PS I'll checkout 2.x trunk and compile mijo from there, because this release (pgsqlrelease for mono with MySQL data layer) is not ready for public usage.

6/14/2007 4:41:13 AM
bob
Gravatar
Total Posts 126
YAF developer

Re: Create new page exception

I run it on PostgreSQL  and there is no such problem.There is a small bug, but the page can be added from  the top  admin menu (near key icon).

My testbed: Gentoo + PostgreSQL

6/14/2007 4:33:59 PM
Gravatar
Total Posts 18439

Re: Create new page exception

I don't think this is a mojoportal bug or a mono bug, I think it is a MySql configuration issue probably due to trying to use russian characters in a db configured for latin_swedish

You may need to change your configuration for MySql according to this document.

Adding charset=utf8; to your MySql connection string may also help.

Joe

6/14/2007 6:12:26 PM
Gravatar
Total Posts 18439

Re: Create new page exception

Adding a page works for me using MySql. Still doesn't rule out a bug in Mono 1.2.4, because I'm running a newer Mono built from svn.

Still I'm inclined to think this is a configuration issue that can be solved by configuring MySql and the connection string.

Joe

6/18/2007 8:20:33 AM
Gravatar
Total Posts 18

Re: Create new page exception

You are absolutely right! Sorry for this hole topic. This is fully MySQL configuration issue.

When using UTF8 encoding, I have to specify "Charset=utf8;" AND alter 1CreateDatabase.sql script. I have to execute CREATE DATABASE command with DEFAULT CHARSET clause this way:

CREATE DATABASE IF NOT EXISTS `mojoportal` DEFAULT CHARACTER SET utf8;

When doing both this things, I can get mojoPortal fully functioning with full Russian letters support.

Thank you,

CarGa.

6/18/2007 9:47:02 AM
bob
Gravatar
Total Posts 126
YAF developer

Re: Create new page exception

If you use utf-8 as default locale in your system then mysql compiles automatically with the default locale in my Gentoo.

2all Please  reveal  you distribution-sometimes it matters...

6/20/2007 7:57:01 AM
Gravatar
Total Posts 18

Re: Create new page exception

Hello Bob,

My OS is KUbuntu 7.04.

I prefer to use precompiled binary packages from trusted repositories. =)

CarGa

You must sign in to post in the forums. This thread is closed to new posts.