Hi guys!
Looks like the common module ImportExportUserSettings still doesn't work.
Following procedures have errors: ImportUserSettings() and ImportSettingsFromTable().
I fixed this issue by myself and now it works.
The right script is below (my changes are in red 6 times):
Procedure ImportUserSettings(Val Context, Val PathToFile, Val URLMap)
ReaderStream = New XMLReader();
ReaderStream.OpenFile(PathToFile);
ReaderStream.MoveToContent();
While ReaderStream.NodeType = XMLNodeType.StartElement Do
SavedSettings = DataExportImportInternal.ReadObjectFromStream(ReaderStream);
StorageManager = Eval(SavedSettings.Storage);
SettingsTable = SavedSettings.Table;
ImportSettingsFromTable(StorageManager, SettingsTable, URLMap);
EndDo;
EndProcedure
Procedure ImportSettingsFromTable(Val StorageManager, Val SettingsTable, Val URLMap)
For Each Settings In SettingsTable Do
If TypeOf(Settings.Settings) = Type("ValueStorage") Then
SettingsValue = Settings.Settings.Get();
Else
SettingsValue = Settings.Settings;
EndIf;
SettingsDescription = New SettingsDescription;
SettingsDescription.Presentation = Settings.Presentation;
If TypeOf(SettingsValue) = Type("UserWorkFavorites") Then
SubstituteURLs(Settings.User, SettingsValue, URLMap);
EndIf;
StorageManager.Save(Settings.ObjectKey, Settings.SettingsKey, SettingsValue, SettingsDescription, Settings.User);
EndDo;
EndProcedure
Sincerely,
Anonymous