Error when I try to use blog or forum

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
6/25/2008 5:30:16 AM
Gravatar
Total Posts 12

Error when I try to use blog or forum

Hi, I'm in the process of evaluating Graffiti CMS and Mojoportal, of which I really like Mojoportal the best, but when I add a blog post or try to add a forum I get the following error:
"We're sorry but a server error has occurred while trying to process your request. The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.".
 

Adding html-pages works ok.
Adding a blog works, until I'm adding a post to it.

I'm using medium trust in a hosted environment, and MySql.
I have done nothing but a fresh install, and adding a top page/menu and renamed the site.
I have followed your suggestions in the article "Quick Fix for Medium Trust".
I did not download the source files, but the other (Distribution files?) ones.
I  downloaded the mysql files and added them to the bin-directory.

Could it be related to the following:
<add key="Lucene.Net.lockdir" value="E:\CustomerData\webspaces\webspace_00108785\wwwroot\storkenkommer.se\Data\Sites\2\index"/>
If I go to the file manager in mojoportal, this is the path I get.
I also tried "\Data\Sites\2\index"
I'm only using one site, and havo no clue to why it is in the "\sites\2"-path.

The system info:
mojoPortal Version 2.2.5.8 MySQL

The log:
2008-06-25 12:01:56,140 [20400] ERROR mojoPortal.Web.mojoBasePage [(null)] - 213.185.29.243-sv-SE - /blog.aspx
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated.
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBBlog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Business.Blog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Web.BlogUI.BlogModule.PopulateNavigation()
at mojoPortal.Web.BlogUI.BlogModule.PopulateControls()
at mojoPortal.Web.BlogUI.BlogModule.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2008-06-25 12:01:56,156 [20400] ERROR mojoPortal.Web.Global [(null)] - 213.185.29.243-sv-SE - /blog.aspx
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated.
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBBlog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Business.Blog.GetBlogMonthArchive(Int32 moduleId)
at mojoPortal.Web.BlogUI.BlogModule.PopulateNavigation()
at mojoPortal.Web.BlogUI.BlogModule.PopulateControls()
at mojoPortal.Web.BlogUI.BlogModule.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

6/25/2008 7:09:06 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

Hi,

For MySql to work in medium trust the host must have the MySql Connector for .NET installed in the GAC. Perahps the version they have in the GAC has bugs. When I google this error "MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated" I find a lot of results, looking at a few of them it looks like maybe a bug in particualr versions of the Connector. I've only looked at a few of the results though so maybe further looking will find more answers.

The fact that its using /Data/Sites/2 instead of Data/Sites/1 is strange and makes me think some errors happened during setup or something. I would look in the mp_Sites table and check if the SiteID is 2, then it should be ok to have /Data/Sites/2, but makes me wonder what happened to Site 1.

If you haven't entered a lot of content yet, one option is to drop all tables from the db and visit setup/Default.aspx again and it will re-create the initial tables and data and you should be back at Site 1 and using /Data/Sites/1

Nothing in your error makes me think its a lucene issue or medium trust as those typically manifest as security exceptions.

Hope it helps,

Joe

6/25/2008 10:43:21 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Wow, that was quick. Thanks. I guess you guys never sleeps :-)

I have reinstalled it several times with no result. I also re-deployed all files and did a clean setup. The error is still there and it still uses site 2.
The id in mp_Sites is 2 though.

I will contact my host about mySql. Thanks again!

6/26/2008 12:11:56 PM
Gravatar
Total Posts 36
Anchorage, Alaska

Re: Error when I try to use blog or forum

On the MySql download page, the default connector is 5.1.  There are some exceptions thrown when using more than one MySql connection.  When I did testing, I could open a connection, do my task, close the connection.  Then, create another connection, do my task, close the connection, etc.  When the test app close, it throw an exception.

I upgraded to version 5.2 connector and everything works great.

6/26/2008 4:11:43 PM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Oops, big mistake: I forgot to mention that my host only provides mySql 4. Can this be it?

6/27/2008 5:42:46 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

I don't know if the version of MySql is a factor. If I were you I would google for "MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated" and study the results for possible causes to figure out the most likely actual cause.

Hope it helps,

Joe

6/27/2008 7:02:03 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

another thing I'm wondering about. In several places it is said you have to have sharpziplib.dll in your bin folder if using mySql.

Is this correct?

I cannot find the file anywhere.

6/27/2008 7:33:27 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

No, that was needed in older version of the MySql connector but not in newer ones. Since you are running in Medium Trust, the MySql.Data.dll in the bin folder is probably not being used and you could even probably delete it. Instead its using whatever version of this they have the GAC on the hosted machine.

6/27/2008 11:31:40 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Thanks for your great support. I'll go on vacation to the french riviera, so I hope my host have given me some response to the questions I've sent them when I come back.

8/20/2008 6:22:31 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Back from vacation and numerous attemts of getting my host to react. Still nothing.

I tried to update to the new version 2.2.6.8 though, hoping it would fix anything broken.

Who known? It gets a new error with the mysql connector: Could not load file or assembly 'MySql.Data, Version=5.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies

The same message on my local machine as on the host.

Is it because I'm running MySql 4?

Best regards...

 

 

8/20/2008 6:28:21 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

No, the error is talking about MySql.Data.dll, not your version of the database. Did you get the files from the mojopoportal-2-2-6-8-mysqldatalayer.zip?

In medium trust its probably using the MySql.Data.dll from the GAC that was installed by the host and that one may not be the expected version.

If it were me I'd stay away from trying to use MySql in Medium Trust and use MS SQL instead or move to full trust hosting.

Best,

Joe

8/20/2008 1:38:37 PM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Ok, thanks. I did use the correct files.

I am stuck with 2 years left of my hosting lease though. I'll see if I can get off of it because of their really lousy service.

Thanks for your help.

 

8/21/2008 8:09:10 AM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

Doh!, I just found out that I failed to include the MySql.Data.dll in the zip for my sql data layer for 2.2.6.8. I have just corrected the download so you can try downloading it again and addingthe MySql.Data.dll to your bin folder. It still may not work due to Medium Trust, but it definitely won't work if the file is missing.

Best,

Joe

9/23/2008 7:57:46 AM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

gee, I have finally got a reply from my host.

MySQL connector on the  server is version 3.51.12.0 according to them, I guess that means the same as GAC?
They support only version 4 of mysql, but can get me a version 5 for testing purposes.

By the way, I tried to upgrade to the new 2273 version, but perhaps there has been an error in the mysql datalayer?
There is a connection problem stating that mssql  cannot connect to the server. I have the mysql connection string defined.

Best regards

9/23/2008 1:25:10 PM
Gravatar
Total Posts 18439

Re: Error when I try to use blog or forum

Version 4 of MySql database should be no problem.

What they said about the MySql Connector makes no sense to me. We use the 5.2 connector, as far as I know there is only 1.x and 5.x versions ever made so I don't get any usefull information by 3.51.12.0, that may be a build number rather than the formal version.

The cannot connect to the server message doesn't tell a lie. If the connection string is there it is not correct.

Hope it helps,

Joe

9/23/2008 4:11:58 PM
Gravatar
Total Posts 12

Re: Error when I try to use blog or forum

Hi, somehow I must have replaced the MySql files in bin with the MSSql ones instead of the other way round.

I have finally gotten to test MySql 5, and it works!
Perhaps there is some kind of mismatch between the Mysql connector, v 4 and medium trust.
With v 5 it seems to work this far at least.

Once again, thanks for your great support. I really hope you get many votes in the CMS awards.
I get angry every time I see some kind of comparisons or evaluations of different CMS's and Mojoportal isn't one of them.
I have tried most of them and mojoportal is the simplest to use of them - but perhaps a bit more complex when it comes to all the files it comes with.
Umbraco brags about having the best / fastest support forum, but you alone competes with all of them, as you have almost instant answers to all our questions.

Perhaps I just found a bug? I tried to use the smiley icon in the editor and my browser somehow hangs, waiting for some kind of input. There is a popup of some kind that cannot appear correctly, perhaps hindered by some popup blocker I have???
I had the same error in my site when I tried to add an image. When I switched the default editor it worked though.

I use Avant browser, based on IExplorer.

 

Cheers mate!

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