This project is read-only.

Navigation menus lost page URL in 1.6>1.7 Upgrade

Topics: Troubleshooting
Aug 26, 2013 at 11:32 PM

I upgraded to 1.7, following the steps from the documentation, and all went well until I noticed that the navigation menu links now show
/Contents/Item/Display/<id number> instead of the original URLs I added for each link via the Content Item "Browse" button in the navigation editing UI, before the upgrade.

Any ideas on how to correct this? (hopefully, w/o re-editing all 137 links) :/

Thanks in advance for any help on this!
Aug 27, 2013 at 11:17 PM
Edited Aug 27, 2013 at 11:24 PM
Update: I ran a trace against the site DB from both the old 1.6 instance and the new 1.7 instance: The 1.6 woks fine and returns a correct value ContentMenuItemRecord_id as expected:
exec sp_executesql N'SELECT contentmen0_.Id as Id53_0_, contentmen0_.ContentMenuItemRecord_id as ContentM2_53_0_ FROM orchard_Navigation_ContentMenuItemPartRecord contentmen0_ WHERE contentmen0_.Id=@p0',N'@p0 int',@p0=717 
The 1.7 query returns null for ContentMenuItemRecord_id, though; note the difference below in the generated table prefix as compared to the 1.6 query, where Navigation has been replaced by Orchard_ContentPicker. Is this by design in 1.7? And, in any case, is their a recommended method to correct for this?:
exec sp_executesql N'SELECT contentmen0_.Id as Id48_0_, contentmen0_.ContentMenuItemRecord_id as ContentM2_48_0_ FROM orchard_Orchard_ContentPicker_ContentMenuItemPartRecord contentmen0_ WHERE contentmen0_.Id=@p0',N'@p0 int',@p0=717
Thanks in advance for any help on this matter!
Aug 29, 2013 at 8:30 PM
OK, did some digging and I'm apparently a victim of the contentpicker migration (or lack there of?) .
   try {
                _upgradeService.ExecuteReader("DELETE FROM " + _upgradeService.GetPrefixedTableName("Orchard_ContentPicker_ContentMenuItemPartRecord"), null);
                _upgradeService.CopyTable("Navigation_ContentMenuItemPartRecord", "Orchard_ContentPicker_ContentMenuItemPartRecord", new string[0]);
                _orchardServices.Notifier.Information(T("Content Picker menu items were migrated successfully."));
Can anyone point me to some documentation on this matter? Is this migration indeed a requirement for the 1.7 upgrade?

Thanks in advance for any help on this!
Aug 29, 2013 at 9:07 PM
The table was moved by this code from the Navigation core module to the Orchard.ContentPicker module. That migration is a requirement, yes.
Aug 29, 2013 at 9:46 PM
Edited Aug 29, 2013 at 9:47 PM
Thanks! Since my last post I became familiar with the upgrade module (always wondered what exactly that did). Successfully migrated, and my menu items now working great. That makes me wonder about the other tabs on there, fields(1.5), Menu(1.5) and Routes(1.4), but I'm hesitant to mess with success. Quit while I'm "behind" as it were. What's the risk of standing pat on those?

Thanks again!
Aug 29, 2013 at 11:31 PM
Edited Aug 29, 2013 at 11:31 PM
If you don't need them, they will just do nothing. Always backup first.