2

Closed

Migrating Content Item Menu Parts fails on NullReference

description

Query for contentPermissionPart yields null so following expression fails
upgradeService.ExecuteReader("SELECT TOP " + BATCH + " * FROM " + _upgradeService.GetPrefixedTableName("Orchard_ContentPicker_ContentMenuItemPartRecord") + " WHERE Id > " + id,
                (reader, connection) => {
                    lastContentItemId = (int)reader["Id"];
                    var contentPermissionPart = _orchardServices.ContentManager.Get(lastContentItemId);  

                    contentPermissionPart.As<InfosetPart>().Store("ContentMenuItemPart", "ContentItemId", (int)reader["ContentMenuItemRecord_id"]);
                });
Closed Jan 28 at 4:39 PM by Piedone

comments

Piedone wrote Jan 28 at 4:39 PM

Fixed in changeset dc4c362777b2f64656ad2e2f50b852671de99220