Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

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.
6/26/2011 4:04:47 PM
Gravatar
Total Posts 44

Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

My site was working fine locally I uploaded it to the server and the setup process ran some mssql upgrade scripts and now I am receiving am error that has stopped the site.  

The config log entry is;
2011-06-26 22:01:38,015 INFO mojoPortal.Web.Global - Global.asax.cs Application_End
2011-06-26 22:01:59,921 INFO mojoPortal.Web.Global - Application Started.
2011-06-26 22:02:00,531 ERROR mojoPortal.Web.mojoBasePage - 78.121.97.159-en-GB - /Default.aspx
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
   at System.Guid..ctor(String g)
   at mojoPortal.Business.PageSettings.LoadFromReader(IDataReader reader)
   at mojoPortal.Business.PageSettings.GetPage(Int32 siteId, Int32 pageId)
   at mojoPortal.Business.PageSettings..ctor(Int32 siteId, Int32 pageId)
   at mojoPortal.Business.WebHelpers.CacheHelper.LoadCurrentPage()
   at mojoPortal.Business.WebHelpers.CacheHelper.GetCurrentPage()
   at mojoPortal.Web.SiteUtils.GetMasterPage(Page page, SiteSettings siteSettings, Boolean allowOverride)
   at mojoPortal.Web.UI.CmsPage.SetupMasterPage()
   at mojoPortal.Web.UI.CmsPage.OnPreInit(EventArgs e)
   at System.Web.UI.Page.PerformPreInit()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2011-06-26 22:02:00,546 ERROR mojoPortal.Web.Global - 78.121.97.159-en-GB - /Default.aspx
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
   at System.Guid..ctor(String g)
   at mojoPortal.Business.PageSettings.LoadFromReader(IDataReader reader)
   at mojoPortal.Business.PageSettings.GetPage(Int32 siteId, Int32 pageId)
   at mojoPortal.Business.PageSettings..ctor(Int32 siteId, Int32 pageId)
   at mojoPortal.Business.WebHelpers.CacheHelper.LoadCurrentPage()
   at mojoPortal.Business.WebHelpers.CacheHelper.GetCurrentPage()
   at mojoPortal.Web.SiteUtils.GetMasterPage(Page page, SiteSettings siteSettings, Boolean allowOverride)
   at mojoPortal.Web.UI.CmsPage.SetupMasterPage()
   at mojoPortal.Web.UI.CmsPage.OnPreInit(EventArgs e)
   at System.Web.UI.Page.PerformPreInit()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Any ideas, Thanks.

Vince.

6/26/2011 9:15:04 PM
Gravatar
Total Posts 355

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Vince - have you tried re-running the install, to verify that everything ran correctly? Also - I see that you've recently posted about some custom functionality - is this the same site?

6/27/2011 3:33:57 AM
Gravatar
Total Posts 44

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi IndigoTea,

The site is at www.fpan.net, or it was until I tried to upgrade it.  The site literally fell apart during the upgrade to 2.3.6.6, the database is now corrupt, I can't log in and no pages are being displayed.  I do have a very limited amount of custom functionality, but surely not enough to cause this mayhem.  The latest series of errors relate to "Unknown server tag 'portal:OuterWrapperPanel'.   

Thanks again for your reply, but I think this is a case of hacking my way through it.

Best Regards,

Vince.

6/27/2011 6:07:37 AM
Gravatar
Total Posts 18439

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi,

Moving a site should not make it run any upgrade scripts and you should not complicate the migration process by trying to upgrade at the same time. 

You need to explain more about how you moved the site from your local machine and especially how you moved the database. It sounds like you tried just importing objects from the database on your local machine to the host. That will not work, it loses all primary keys, column defaults foreign keys, indexes etc. To move a database you need to make a backup and restore the backup, or there are 3rd party tools you can use to script off your database and the data in a away to move it to another machine.

See the article Moving an Installation of mojoPortal to a different Server.

Hope that helps,

Joe

6/27/2011 6:42:01 AM
Gravatar
Total Posts 44

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi Joe,

Yes I know, but I didn't think the upgrade would cause this problem, the database is obviously corrupt as I am still getting the Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) error.

I didn't touch the database, mojoPortal decided all by itself to run the setup scripts, it wouldn't let get pass the please set "disablesetup" in web.config.

I uploaded the 2.3.6.6 files, amended the web.config, user.config and off it went.  If I swap back to the backed up database, that doesn't work either, I have to go back to a previous version and lose some pages. That does work, but then I am faced with a plethora script errors, such as the Outer Wrapper one and for example;
2011-06-27 10:39:56,375 ERROR mojoPortal.Web.Global - 207.46.195.231-en-US - /house-buying-is-seasonal.aspx
System.Web.HttpParseException: The base class includes the field 'gmap', but its type (mojoPortal.Web.UI.LocationMap) is not compatible with the type of control (mojoPortal.Web.Controls.google.LocationMap).

Which is strange because as far as I know I don't use a Google map anywhere.

I appreciate your response Joe, I will just have to work my way through it, the real pain is that I had some prospective clients who were going to look at the site today. Still, it will not happen again, measure twice and cut once etc.

Best Regards,

Vince.

6/27/2011 6:54:36 AM
Gravatar
Total Posts 18439

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi Vince,

You keep blaming mojoPortal but you have not explained how you moved the database. These errors have to do with how you moved the database. No way did mojoPortal mess up your database, but mojoPortal can't fix it once it has been messed up, so it looks to me like you then tried to upgrade after there were already problems (hoping that mojoPortal would somehow fix it) and that only made things worse.

If you still have the site running locally I suggest clean out all the files you uploaded at the host and then start over with uploading the files from your local copy and a new empty database at the host, following the instructions about how to move a site. You may need your host to restore a backup you create from your local machine. Don't think about upgrading until the site is working correctly at the host.

Hope that helps,

Joe

 

6/27/2011 7:10:45 AM
Gravatar
Total Posts 44

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi Joe,

Sorry if I gave that impression, it was certainly not my intention, mojoPortal is a fantastic CMS system and I really do appreciate how much effort you put into the project.

With regard to the database, I didn't move the local database to the server, I just updated the file system on the server with the new mojoPortal files and left the database as it was.

I was in a hurry and that has caused these issues, as soon as I have resolved it I will let you know how.

Best Regards,

Vince.

6/27/2011 7:25:39 AM
Gravatar
Total Posts 18439

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi Vince,

To move your site to hosting you do have to move the database by restoring it to the host. If you don't do that then it will be like a new installation on an empty database at the host.

All the pages and content in the site except for user uploaded files is in the database not in the file system, so just copying the files is not sufficient to move a site.

The only exception to this is if using a file based database like SQL CE (which has a file on disk so when you copy the site the database file is also copied), but SQL CE is not as robust a database, a site will run much faster with MS SQL database. It sounds like your current site is using a local MS SQL database. Again, to move it you should clean out all the files you already uploaded since you tried upgrading the files on the host now are not all of the same version as your local copy, so start over. And you will need to get a backup of your local database and restore it on the host and set the connection string at the host to the hosted database after it is restored.

If you already had a database at the host that was working then I would never move again from local to the host, but always if I want an updated copy of the data I would get a backup from the host and restore it local for testing but never try to go back and forth with the database, only go one direction after deploying to production and that direction would be getting a backup from production and restoring it locally for testing. 

If you are doing custom development of your own features and need to redeploy custom code to production the right way to do it will depend on if you are working with the mojoPortal source code or developing against release packages. 

Hope that helps,

Joe

6/27/2011 8:22:36 AM
Gravatar
Total Posts 44

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Hi Joe,

The error is being produced at line 587 in PageSettings.cs in LoadFromReader()

this.pubTeamId = new Guid(reader["PubTeamId"].ToString());

Format Exception - Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Is this rectifiable?

Best Regards,

Vince.

6/27/2011 8:25:55 AM
Gravatar
Total Posts 18439

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

UPDATE mp_Pages
SET PubTeamId = '00000000-0000-0000-0000-000000000000'

but this field was added and populated in script for 2.3.6.0 so the column should not currently be empty

Hope that helps,

Joe

6/28/2011 7:52:17 AM
Gravatar
Total Posts 44

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade - RESOLVED

Hi Joe,

All is well now, I took a copy of the latest source code, linked my local project to the remote database and worked through it.

My problems arose due to my workflow, the local and remote databases were synchronised in terms of objects, but not data, so I had the correct columns in the table, but not the default data. The GUID error was caused by a NULL return as opposed to the expected empty GUID, a result of not running the upgrade scripts on both the local and remote databases.   

Lesson learnt!

Thanks for all help.

Vince.

6/28/2011 11:22:49 AM
Gravatar
Total Posts 355

Re: Help - Error Guid should contain 32 digits with 4 dashes After Upgrade

Vince - glad you sorted it through. I actually saw the same error briefly last night when upgrading a client site, but since I use the source code to compile locally before publishing to the "live" site, it was a simple thing to skip the error msg and finish running the scripts, which solved the issue. It's good to remember when you're updating any site with custom code, to make sure your upgrade scripts also set data when adding new columns.  Good luck with your project!

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