Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Media Properties #211

Open
craigs100 opened this issue Sep 6, 2023 · 7 comments
Open

Missing Media Properties #211

craigs100 opened this issue Sep 6, 2023 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@craigs100
Copy link
Contributor

craigs100 commented Sep 6, 2023

Having just done a migration from Umb V7.15.10 in to V10.6.1 none of the Media items have arrived with height, width, size or type. Have checked on both Windows and Linux (just in case ;) ) They have to be regenerated by saving each media item individually :( Is there any way this can be fixed or is there some procedure that needs to be carried out by the dev doing the migration?

Thanks

@craigs100
Copy link
Contributor Author

craigs100 commented Sep 6, 2023

I got around it by temporarily adding this to the master view:-

@inject IMediaService _mediaService

@{
        foreach (var item in _mediaService.GetByLevel(3)) {
        _mediaService.Save(item);
    }    
}

I only had 3 levels hence didn't bother going from GetRootMedia() and another foreach ;)

@KevinJump
Copy link
Member

I think its probibly option b) we need something that goes through the media and saves the items, (we could have this as a post migration step) and then all the width / heights would be added.

I think it comes from importing the media config, before the media is physically in the right place, but i should be a one button "fix" media thing we can add (as well as maybe making it a migration step)

@KevinJump KevinJump added the help wanted Extra attention is needed label Sep 29, 2023
@bielu
Copy link
Contributor

bielu commented Oct 13, 2023

Hey @KevinJump I had thought about it,
I am thinking to introduce new interface which will allow to run actions post migration and would add 3 button Run Post Import Action. There might be other issues which might be automated by introducing simple action for it :).

@KevinJump
Copy link
Member

Hi,

I think (not at desk today) there are notifications that fire at the start and end of the migration, so you might not need to do anything to implement a post action.

@craigs100
Copy link
Contributor Author

craigs100 commented Oct 23, 2023

Have just attempted a 7.15.11 to 12.2.0 migration, the site has arrived with no media or templates in the back office even though the config files are all there in the exported files (couldn't use a package zip unfortunately due to issue #210 still being unresolved).

Also the site won't build because it's missing templates: error MSB3030: Could not copy the file /home/craig/DotNetCoreSites/CADS/Web/uSync/migrate/migration_data_2023_10_23_221319/data/Template/master/contact/Contact.config" because it was not found.
This file exists in /CADS/Web/uSync/migrate/migration_data_2023_10_23_221319/ although I can see the filename is data\Template\master\contact\Contact.config. I guess dotnet/Linux is looking for a file called Contact.config at the expected path.

Noted I've ended up with both usync/migrate and usync/Migrate folders. Probably not a problem on Windows but a disaster on Linux. Wondering if this is why knickers appear twisted?

@craigs100
Copy link
Contributor Author

craigs100 commented Oct 23, 2023

On line 14 of uSync.Migrations/Handlers/Seven/MediaMigrationHandler.cs the TargetFolderName should be "media" and not "Media". "Media" is correct for the source in V7 (and poss V8) but since V9 it has been "media". I'll PR in the morning if I get the chance.

@ProNotion
Copy link
Contributor

ProNotion commented Nov 13, 2023

the Media items have arrived with height, width, size or type

@craigs100 Have you seen this issue?

I'm looking to try and submit a pull request for this. Having a post-migration action to save all media is not practical for me as my client site has such a huge media library I am not going to have that in place where the migration is executed so need to ensure the original values are migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants