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.0 and below.
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 (DNN-18210) and it has been fixed on DNN version 9.2.1 and above.
Unfortunately, there is no workaround for this behavior except upgrading to the above-mentioned or higher versions.
Content Contributor: Ruben Gonzalez G.