Update Issue

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/12/2009 9:49:26 AM
Gravatar
Total Posts 110

Update Issue

Hi There,

I have just tried updating my site and got this failure returned.  Any ideas?

Probing system...
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
1 site(s) found.
Running script mojoportal-core - 2.3.1.4 - 00:00:00.1872048
Running script mojoportal-core - 2.3.1.5 - 00:00:00.2028052
Running script mojoportal-core - 2.3.1.6 - 00:00:00.2028052
Running script mojoportal-core - 2.3.1.7 - 00:00:00.2028052
Running script mojoportal-core - 2.3.1.8 - 00:00:00.2496064
Running script mojoportal-core - 2.3.1.9 - 00:00:00.2496064
Running script mojoportal-core - 2.3.2.0 - 00:00:00.2652068

An Error Occurred:Unknown column 'IpAddress' in 'field list'
Source:MySql.Data
Stack Trace at MySql.Data.MySqlClient.MySqlStream.ReadPacket() 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.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters) at MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(String connectionString, String commandText, MySqlParameter[] parms) at mojoPortal.Data.DBLetterSubscription.Create(Guid guid, Guid siteGuid, Guid letterInfoGuid, Guid userGuid, String email, Boolean isVerified, Guid verifyGuid, DateTime beginUtc, Boolean useHtml, String ipAddress) at mojoPortal.Data.DBPortal.DatabaseHelperDoVersion2320PostUpgradeTasks(String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.DoVersion2320PostUpgradeTasks(String overrideConnectionInfo) at mojoPortal.Web.mojoSetup.DoPostScriptTasks(Version scriptVersion, String overrideConnectionInfo) at mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) at mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks.

12/12/2009 11:43:40 AM
Gravatar
Total Posts 18439

Re: Update Issue

Hi David,

This looks like a bug in the upgrade process.

What version are you trying to upgrade to? 

Do you currently have newsletter subscribers?

It seems the problem is the post upgrade task for 2.3.2.0 calls the DBLetterSubscription.Create method, but the problem is the signature of that method changed in a later version to include this additional ipaddress field, but when this post build event runs it errors because that column is not added until a later script.

The reason I never encountered the error is because I upgraded after each version so this method had already run before the method signature changed for me and therefore no error occurred.

I can fix this going forward but I may have to create a custom page to help you fix the problem for existing newsletter subscribers. I recommend backup your mp_LetterSubscriber table as this table will get dropped and it will need to be restored to get the data correctly loaded into the newer table named mp_LetterSubscribe which is what this post build event was trying to do, but it will not run more than once since the 2.3.2.0 script already has run.

Sorry for the inconvenience but I will try to help you solve this. Backup your mp_LetterSubscriber table so you can get it back and then see if it can run the rest of the scripts by visiting setup again.

Best,

Joe

 

12/12/2009 12:03:24 PM
Gravatar
Total Posts 110

Re: Update Issue

Hi Joe,

I am trying to upgrade to the latest version.

I don't believe  have any newsletter subscribers (but not 100% sure) so I'll try your fix and let you know how I get on.

Thanks.

12/12/2009 12:09:09 PM
Gravatar
Total Posts 18439

Re: Update Issue

If you don't have any then it should be possible to just ignore this error and continue setup by visiting the page again.

If you backup the table as mentioned and there are only a few rows you could manually re-subscribe the users from the manage user page.

Best,

Joe

12/12/2009 12:10:28 PM
Gravatar
Total Posts 110

Re: Update Issue

I did as you suggested and now when I go to the setup page I am getting this:

Probing system...
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
1 site(s) found.
Running script mojoportal-core - 2.3.2.0 - 00:00:00.1560040
MySql.Data.MySqlClient.MySqlException: Duplicate column name 'SubscribeGuid' at MySql.Data.MySqlClient.MySqlStream.ReadPacket() 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.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlScript.Execute() at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.1560040
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

Is there anything else I could try?

Cheers.

12/12/2009 12:12:00 PM
Gravatar
Total Posts 18439

Re: Update Issue

It seems it is trying to run a script it already ran. If you can manually set the version for mojoportal-core in the mp_SchemaVersion table to 2.3.2.0 then it will pick up at the next script.

Hope it helps,

Joe 

12/12/2009 12:19:52 PM
Gravatar
Total Posts 110

Re: Update Issue

I know get this...

Probing system...
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
1 site(s) found.
Running script mojoportal-core - 2.3.2.1 - 00:00:00.0624016
MySql.Data.MySqlClient.MySqlException: Unknown table 'mp_lettersubscriber' at MySql.Data.MySqlClient.MySqlStream.ReadPacket() 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.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlScript.Execute() at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.0624016
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

12/12/2009 12:23:36 PM
Gravatar
Total Posts 18439

Re: Update Issue

Hi David,

That script is trying to drop the old tables

DROP TABLE mp_LetterSubscriber;
DROP TABLE mp_LetterSubscriberHx;

You could remove or comment out those lines in the script at

/Setup/applications/mojoportal-core/SchemaUpgradeScripts/mysql/2.3.2.1.config

Though I don't know why it would error if the tables do exist.

Hope it helps,

Joe

12/12/2009 12:27:36 PM
Gravatar
Total Posts 110

Re: Update Issue

That did it, I'm now back up and running, thanks !

Do I need to do anything else now or should everything work?

12/12/2009 12:33:16 PM
Gravatar
Total Posts 18439

Re: Update Issue

Everything should work except that users who were subscribed to newsletters are no longer subscribed so if you find the rows in the old table you can figure out who to manually subscribe from the manage users page.

Hope it helps,

Joe 

12/12/2009 1:22:40 PM
Gravatar
Total Posts 110

Re: Update Issue

Great, thanks.

Once again many thanks for the great responses :-)

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