Could not find specified column in results: SiteID

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

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.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/17/2011 12:21:34 PM
Gravatar
Total Posts 87

Re: Could not find specified column in results: SiteID

Hi ,

I have similar problem. But my site works ok for first instance - SiteID=1, but when i try to go to Site 2 it gives me next errors

2011-12-17 17:55:30,496 ERROR (null) - (null) - (null) - mojoPortal.Web.Global - Referrer(none) useragent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
System.IndexOutOfRangeException: Could not find specified column in results: SiteID
at MySql.Data.MySqlClient.ResultSet.GetOrdinal(String name)
at MySql.Data.MySqlClient.MySqlDataReader.GetOrdinal(String name)
at MySql.Data.MySqlClient.MySqlDataReader.get_Item(String name)
at mojoPortal.Data.DBSiteSettings.GetSiteIdByFolder(String folderName)
at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromCache()
at mojoPortal.Business.WebHelpers.CacheHelper.GetSiteSettingsFromContext()
at mojoPortal.Web.SiteUtils.GetDefaultCulture()
at mojoPortal.Web.CultureHelperHttpModule.BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2011-12-17 17:56:02,636 ERROR (null) - (null) - (null) - mojoPortal.Web.Global - Referrer(none) useragent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
System.IndexOutOfRangeException: Could not find specified column in results: SiteID
at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

I checked mp_Sites and it's there.

I can't say when exactly it stopped working, 2 things happened recently:

1) i moved from one provider to another and this new provider has MySql locally on windows server, before this the Mysql was remotely on Unix version of MySql,

2) i've made upgrade of the portal to 2.3.7.0 MySQL vesrion

but this second subsite was not used and i never checked it after this two changes and can't say if it failed after move or after upgrade.

Any clues?

Regards,

Victor

 

 

12/17/2011 12:34:33 PM
Gravatar
Total Posts 87

Re: Could not find specified column in results: SiteID

one more thing - i tried to create new subsite (it is folder based) and it do not work too.

12/18/2011 10:37:40 AM
Gravatar
Total Posts 18439

Re: Could not find specified column in results: SiteID

Hi Sorvik,

I've just uploaded a patched MySql Data layer for version 2.3.7.5. If you download it again and replace mojoPortal.Data.dll with the new one it should solve it.

The solution was to change from this:

sqlCommand.Append("SELECT COALESCE(s.SiteID, -1) ");

to this:

sqlCommand.Append("SELECT COALESCE(s.SiteID, -1) AS SiteID ");

Thanks,

Joe

12/18/2011 2:02:06 PM
Gravatar
Total Posts 87

Re: Could not find specified column in results: SiteID

Thank you,

Now everything works

Regards,

Victor

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