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

V8 Migrated media folders not showing up in Media Picker or on the left side of the Media tab #6158

Closed
nickh364 opened this issue Aug 20, 2019 · 12 comments · Fixed by #6192

Comments

@nickh364
Copy link

commented Aug 20, 2019

On all our sites after we migrate to 8 the media folders don't show up in the Media Picker or the left side of the media tab. Example below. On some of our smaller sites I have just recreated the folders and copied the media to the new folders but on some of our bigger sites that would take hours.
umbraco media

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

Are these sites that have first been upgraded to 7.15.x before you upgraded them to v8? Specifically did these sites start their life as a site older than 7.8.0?

It may be related to #5847

@nickh364

This comment has been minimized.

Copy link
Author

commented Aug 21, 2019

Yes I updated to 7.15.1 then to 8.1.1 or 8.1.3. All our sites started before 7.8.0.

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

commented Aug 21, 2019

Thanks @nickh364 - it seems to me that you're running into the exact same issue as #5847 then, or you might have ran into the issue that was fixed by running the SQL query from this comment, could you try this query on one of your upgraded sites and see if that fixes your issue?

#5848 (comment)

Of course, I should warn you to back up your database first!

@nickh364

This comment has been minimized.

Copy link
Author

commented Aug 21, 2019

There is no cmsMedia table in the DB after migrating to Umbraco 8. Are you saying to run this before migrating to 8? I can see all my folders on 7.15.1.

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

Aah, I am getting all my versions confused, sorry about that! I have absolutely no idea what is going on then, it seems to be very specific to your sites, as I've not seen any other issues like this for v8.

Any chance you can send us a database (my email: sj@umbraco.dk) so we can investigate better?

@IK1235

This comment has been minimized.

Copy link

commented Aug 22, 2019

I have the same problem. Upgraded from Umbraco 7.12.4 to 7.14.0 and then to 7.8.3.
Folders which I created on new version is ok, but not from old version.

I also use plugin Tinifier to optimize images.

@nickh364

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

Aah, I am getting all my versions confused, sorry about that! I have absolutely no idea what is going on then, it seems to be very specific to your sites, as I've not seen any other issues like this for v8.

Any chance you can send us a database (my email: sj@umbraco.dk) so we can investigate better?

I just sent you a dropbox link for one of the DBs.

@stevemegson

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

cmsMedia has become umbracoMediaVersion in v8. If your database had missing rows in cmsMedia that would cause #5848 in 7.15, then the migration to v8 will leave missing rows in umbracoMediaVersion which cause the same problem. As with the fix for 7.15, changing EntityRepository to use a left join should do the trick.

As a workaround, this fixed the missing folders for me in v8:

INSERT INTO umbracoMediaVersion
SELECT umbracoContentVersion.id, NULL
FROM umbracoNode
INNER JOIN umbracoContentVersion ON umbracoContentVersion.nodeId = umbracoNode.id
WHERE umbracoNode.nodeObjectType = 'B796F64C-1F99-4FFB-B886-4BF4BC011A9C'
AND umbracoContentVersion.id NOT IN (SELECT id FROM umbracoMediaVersion)
stevemegson pushed a commit to stevemegson/Umbraco-CMS that referenced this issue Aug 25, 2019
stevemegson added a commit to stevemegson/Umbraco-CMS that referenced this issue Aug 25, 2019
@nickh364

This comment has been minimized.

Copy link
Author

commented Aug 26, 2019

cmsMedia has become umbracoMediaVersion in v8. If your database had missing rows in cmsMedia that would cause #5848 in 7.15, then the migration to v8 will leave missing rows in umbracoMediaVersion which cause the same problem. As with the fix for 7.15, changing EntityRepository to use a left join should do the trick.

As a workaround, this fixed the missing folders for me in v8:

INSERT INTO umbracoMediaVersion
SELECT umbracoContentVersion.id, NULL
FROM umbracoNode
INNER JOIN umbracoContentVersion ON umbracoContentVersion.nodeId = umbracoNode.id
WHERE umbracoNode.nodeObjectType = 'B796F64C-1F99-4FFB-B886-4BF4BC011A9C'
AND umbracoContentVersion.id NOT IN (SELECT id FROM umbracoMediaVersion)

That worked for me.
Thanks

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

Oh yes, that's a great fix! Thanks @stevemegson - I know you love this stuff, if you want to whip up a PR to help out? 👍

@umbrabot

This comment has been minimized.

Copy link

commented Aug 27, 2019

Hi @nickh364,

We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly PR team bot :-)

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

Fixed in #6192

Cherry picked for 8.1.4 9413427

nul800sebastiaan added a commit that referenced this issue Aug 29, 2019
#6158 - missing media folders after migration
(cherry picked from commit 934e206)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.