An administrator has imported a site; however, they are facing an issue with the module permissions not being imported for custom roles. The custom role permissions exist on the target site for pages; however, no permissions are added for modules and it only inherits the default ones from a page.
If the import is run a second time in the source site, the following error will be thrown:
Dnn.ExportImport.Components.Engines.ExportImportEngine - System.NullReferenceException: Object reference not set to an instance of an object. at Dnn.ExportImport.Components.Services.PagesExportService.<>c__DisplayClass38_1.<ImportModulePermissions>b__0(ModulePermissionInfo x) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at Dnn.ExportImport.Components.Services.PagesExportService.ImportModulePermissions(ModuleInfo localModule, ExportModule otherModule, Boolean isNew) at Dnn.ExportImport.Components.Services.PagesExportService.ImportTabModulesAndRelatedItems(TabInfo localTab, ExportTab otherTab, Boolean isNew)
- DNN Version 9.2.1 or below
- Access to a Superuser account
This issue was being caused by a known defect due to DNN being unable to save the module permissions on the database and caused a conflict with different Role IDs on source and target instances.
The issue was considered a defect and it has been fixed on DNN version 9.2.2 and above.
Unfortunately, there is no workaround for this behavior, you will need to Upgrade to 9.2.2 or above.
You can test that this is resolved by:
- Import the export package once again
- Browse to any module settings with custom roles set for them
You should see that the custom role permissions have been imported over.