-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Media Picker - upload button disabled bug #13383 #15115
Conversation
Issue is around how the folder path is "got" on the initialisation - if it doesn't come from localstorage (which is wiped on logout- hence how I could recreate). The function gotoFolder(folder) has entityResource.getAncestors that builds the folder path if it's not set (which it isn't on first init) but this isn't on a promise or awaited. Modified the code that follows so it can only run once this returns by moving it to a separate function performGotoFolder(folder). It then has the path and on first open the editor can add images. I've tested the following scenarios and it seems to work (without breaking everything). Media picker with start node set. Media picker without start node User with limited media folders (e.g. can't see the start node). Seems to have resolved the issue.
Hi there @cheeseytoastie, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Could we pretty please have this fix in v10. Would make a lot of my editors happy. |
Hi @cheeseytoastie , Thank you for the pull request! 🙌 Regarding v10, if the initial issue mentions v10 usually the fix is cherrypicked and included in the following v10 release! 🙂 |
@@ -264,18 +264,24 @@ angular.module("umbraco") | |||
function (f) { | |||
return f.path.indexOf($scope.startNodeId) !== -1; | |||
}); | |||
folder.path = $scope.path[0].path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor point, but is the tabbing slightly out on this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped this one. But hopefully the fix can still be merged in?
Thanks for this one @cheeseytoastie! Tests well and happy to relieve an annoyance 🙌 |
Prerequisites
If there's an existing issue for this PR then this fixes (#13383)
Description
Issue is around how the folder path is "got" on the initialisation - if it doesn't come from localstorage (which is wiped on logout- hence how I could recreate). The function gotoFolder(folder) has entityResource.getAncestors that builds the folder path if it's not set (which it isn't on first init) but this isn't on a promise or awaited.
Modified the code that follows so it can only run once this returns by moving it to a separate function performGotoFolder(folder). It then has the path and on first open the editor can add images.
I've tested the following scenarios and it seems to work (without breaking everything).
Media picker with start node set.
Media picker without start node
User with limited media folders (e.g. can't see the start node). Seems to have resolved the issue.
To recreate (without fix). Create a media picker with a start node. Log out, load the media picker and you'll see the grey media picker where the editor cannot upload an image. But if the close and reopen it works.
After the fix this issue has gone. 🤞