Skip to content

Migration of the media libraries still failing when clicking "Migrate media libraries" button in media library admin #562

@purquhart

Description

@purquhart

Brief bug description
When a media library folder exists with spaces in it, the media migration to content hub throws an exception and fails.

Repro steps
Migrate a media library with spaces in the sub folder names:

  • Go to the media library in the new Xperience by Kentico admin instance.
  • Click the "Migrate media libraries" button in the media library.
  • See the error in the event log.

Expected behavior
That the media libraries are successfully migrated when clicking the button.

Version
Xperience by Kentico version 31.0.0

Additional context
This bug is the same one as bug 515 that has been closed,

This is the error that is logged to the event log:

Source
MigrateMediaLibrariesToContentHubTask

Description
[null]
Message: 'name' is not a valid code name. (Parameter 'name')

Exception type: System.ArgumentException
Stack trace:
at CMS.ContentEngine.CreateContentFolderParameters..ctor(String displayName, String name)
at CMS.MediaLibrary.MediaFolderMigrationService.CreateFolder(String name, String displayName, Int32 parentFolderId, IContentFolderManager contentFolderManager, Nullable1 guid, CancellationToken cancellationToken) at CMS.MediaLibrary.MediaFolderMigrationService.RecursivelyEnsureSubfoldersStructure(MediaLibraryInfo mediaLibraryInfo, ContentFolderInfo parentFolder, String parentAssetFolderPath, IContentFolderManager contentFolderManager, IDictionary2 folderPaths, CancellationToken cancellationToken)
at CMS.MediaLibrary.MediaFolderMigrationService.RecursivelyEnsureSubfoldersStructure(MediaLibraryInfo mediaLibraryInfo, ContentFolderInfo parentFolder, String parentAssetFolderPath, IContentFolderManager contentFolderManager, IDictionary2 folderPaths, CancellationToken cancellationToken) at CMS.MediaLibrary.MediaFolderMigrationService.RecursivelyEnsureSubfoldersStructure(MediaLibraryInfo mediaLibraryInfo, ContentFolderInfo parentFolder, String parentAssetFolderPath, IContentFolderManager contentFolderManager, IDictionary2 folderPaths, CancellationToken cancellationToken)
at CMS.MediaLibrary.MediaFolderMigrationService.RecursivelyEnsureSubfoldersStructure(MediaLibraryInfo mediaLibraryInfo, ContentFolderInfo parentFolder, String parentAssetFolderPath, IContentFolderManager contentFolderManager, IDictionary2 folderPaths, CancellationToken cancellationToken) at CMS.MediaLibrary.MediaFolderMigrationService.EnsureSubfoldersStructure(Dictionary2 defaultFolders, IContentFolderManager contentFolderManager, CancellationToken cancellationToken)
at CMS.MediaLibrary.MediaFolderMigrationService.EnsureFolderStructure(Int32 userId, WorkspaceInfo workspace, CancellationToken cancellationToken)
at CMS.MediaLibrary.Internal.MigrateMediaLibrariesToContentHubTask.MigrateToContentHub(Int32 userId, CancellationToken cancellationToken)
at CMS.MediaLibrary.Internal.MigrateMediaLibrariesToContentHubTask.Execute(ScheduledTaskConfigurationInfo task, CancellationToken cancellationToken)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions