Upgrading from 1.6.1 to 1.7.2 failed (no menus)

Topics: Troubleshooting
Jan 17, 2014 at 10:09 AM

I'm trying to migrate a site from 1.6.1 to 1.7.2 and seem to have everything going but get an error when trying to upgrade the menus, the content picker upgrade gives me this error and the side effect seems to be that I have no menus, anyone have any idea how to get my menus back? I can see them in the admin panel ok?
2014-01-17 10:50:17,725 [7] Upgrade.Controllers.ContentPickerController - Unexpected error while migrating to Orchard.ContentPicker. Please check the log.
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Navigation_ContentMenuItemPartRecord'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Upgrade.Services.UpgradeService.ExecuteReader(String sqlStatement, Action`2 action)
   at Upgrade.Services.UpgradeService.CopyTable(String fromTableName, String toTableName, String[] ignoreColumns)
   at Upgrade.Controllers.ContentPickerController.IndexPOST()
Many thanks in advance.
Jan 19, 2014 at 8:11 PM
It seems that the table Navigation_ContentMenuItemPartRecord was not created for some reason. Can you restore your site to 1.6.1, including the DB, then upgrade the source, then try to run it again and see what happens? Also, are there any log entries after the first page load after the upgrade?
Jan 31, 2014 at 3:03 PM

Thanks for the reply, in the end I found the problem was the MenuPosition in the table Navigation_MenuPartRecord was null, so I manually updated the database and all is working.

Thanks again
Marked as answer by sonicm on 1/31/2014 at 8:03 AM
Feb 2, 2014 at 5:25 PM
Hmm I have noticed the same issue, glad I haven't had too look to far for the culprit!