Media Picker 'upload' button dead after upgrade from 7.6.4->7.10.2
I have an image field using data type "Media Picker" that uses property editor "(obsolete) Media Picker" and property editor alias is "Umbraco.MediaPicker" (not "Umbraco.MultipleMediaPicker").
I have upgraded from 7.6.4 to 7.10.2 locally and then published to an Azure web app. On the Azure site the 'upload' button is not opening a 'file upload' dialog, it is just a dead click. I see no errors in Chrome Dev Tools. I have incremented ClientDependency id in case old scripts were cached.
On the locally upgraded(via NuGet) site the 'Upload' media button works correctly even if I set debug=false so that the CD bundles scripts the same way as the Azure site.
I thought maybe I'm missing a controller script but I can't tell.
I see Umbraco.MediaPicker is not even listed on Umb Prop Editors ,it only lists Umbraco.MultipleMediaPicker.
Update: The 'Upload' button is still dead when I create a new doctype property that uses a new data type that uses editor '(Obsolete) Media Picker - Umbraco.MultipleMediaPicker' or 'Media Picker - Umbraco.MediaPicker2
Connor, good to hear I'm not alone, but no I have not fixed this yet. I'm not sure what more info I can provide, I put everything I could think of in the original post.
7.10.2 upload button works locally and then when I publish a non-debug/Release version to Azure it does not work. This is the only bug I've found, which is always strange when just one small feature is broken. Since upload button doesn't work on the new editors either it appears it is not caused by the old editor being marked 'obsolete'.
I'll see if I can make a new empty 7.10.2 site today, publish it to Azure and test again that way.
We have identified a "workaround" for dealing with this issue until a fix is identified - within the Media Library itself, if you create a new folder, the link to "choose files" successfully opens a file picker as expected and video/images can be uploaded.
I'm confused by your reply because there was never a problem using 'click here to choose files' in the Media section, so creating a new folder in Media doesn't provide any new functionality there. Let me know if I misunderstand.
Ironically, after creating a new folder in Media, when I go back to Content and test again, the Upload button DOES open a 'file upload' dialog as long as the 'Select Media' area starts in a folder, not just in the root /Media. This is my experience even if I delete the new folder I created in Media and so maybe this was true even if I did not try what you suggested and you've nudged me to discover this!
Can others test and report back? Does Select Media 'file upload' work as long as you are not starting in the Media root? If I start in a Media sub folder and then browse back to Media root 'file upload' DOES work.
I have my prior 7.6.4 site version still running as a deployment slot in Azure. I retested this bug there and now I see NO different between 7.6.4 and 7.10.2! Neither of them open the 'File Upload' window from a Content node's Media Picker field if the 'Select Media' side area starts in the Media root. If I browse into a Media subfolder then 'File Upload' DOES open. And if I browse back to Media root it DOES also open.
Perhaps my site admin who reported this bug is crazy. Can you guys provide any info? Do you think this is a fake bug?
UPDATE:
I retested my local 7.10.2 version before I published it to Azure and I can confirm that 'File Upload' did work even when on the root Media node. But then after publish it did NOT work and created this post.
Yup - you're quite right, if I navigate to a folder the "File Upload" button begins working, and still works if I navigate back up to the root folder!
There's definitely something odd going on...
In my initial "workaround" for this, I mentioned adding a folder as I can't see how you choose files within Media and upload the to the root folder - unless I'm missing something!
Lets be clear where we are. The bug I posted is while admining a node in the Content area. The workaround you described was in the Media area, correct? The drag or 'click here to upload files' section in Media works for the Media root upon page load or click of the top most Media node above the folders or within a Media folder. This is confusing because Media is also the first breadcrumb in 'Select Media' when admining content.
To clarify - the issue we are seeing is when trying to add media whilst administering a content node, for example - adding a video via a Macro ,when the "Select media" tab is opened the "Upload" button below doesn't trigger a file upload window:
However, as you noticed, if you navigate to a folder, (and even back up to root), this button begins to function.
The "Choose files" functionality within the main Media tab below appears to be working without issue.
How'd you get on with installing a fresh version of Umbraco? Did the upload button work then?
It'd be weird if this issue occurs on a fresh installation as it's a pretty obvious bug which is proving very difficult to diagnose what the issue is especially that it starts working with the workaround mentioned above.
Sorry, I will try to do this test today. This got away from me because I realize I am actually happy about this 'bug' because now my editors have to put images in folder and not clog up the Media root with disorganized images!
I created a new solution in VS and installed latest version 7.10.4 via NuGet with the Starter Kit running SqlCE.
I enabled deprecated data types in UmbracoSettings.config via:
"showDeprecatedPropertyEditors = true"
I created a new Person-Photo-Media Picker data type using Property Editor Alias: Umbraco.MediaPicker with no starting folder set.
I added a property to the Person doctype.
I published to an Azure Web App and while I get occasional SqlCe umbraco.sdf file lock errors I'm still able to test.
And...
The Upload button works in all cases including the Media root!
Conclusion: Upload should have continued to work after my(our) upgrades, but I can't say I know this technically an Umbraco bug. I'm confused by the statement in the Issue "At some point in recent Umbraco history, it became standard procedure for media uploads to be disallowed at the root level of media." because I find no documentation of that.
Ok - had a bit of time to dig around into this today and have found out what is causing the button to not work when initially opening the media picker in the root folder.
Unfortunately I've not quite worked out why - but here's what I've found.
Basically, when the media picker is first opened in the root folder the following is used from /Umbraco/views/common/overlays/mediaPicker/mediapicker.html
The reason this appears to not be working when initially in the root folder is that the value for acceptedMediatypes.length is initially 0. When you go down a folder this is changing to 1, (for us at least), and then the uploadForm is added and the upload button begins to work as expected - even when navigating back to the root folder.
I'm currently trying to work out where the Accepted Media Types value comes from - but at least this feels like some progress!
Basically our two media types of File and Image were not set to "Allow as root" in the premissions:
As such, the upload button doesn't work when in the root folder. This must have been something which was fixed between 7.6.4 and 7.10.2 as images were successfully loaded into root prior to the upgrade.
The existing bug now seems to be two-fold - one is the fact the button doesn't look disabled when it should do, (which is the issue linked previously), the second is that all you need to do is to navigate into a folder and then back to root in order to upload files into the root folder....
Yes - I think http://issues.umbraco.org/issue/U4-11039 pretty much matches this issue although it is specifically about the "disabled" upload button not being obvious.
I have commented on the issue regarding the behaviour when navigating into a folder and back up to the root enabling upload when it shouldn't.
Basically hides the button should there be now accepted media types to upload to the selected folder. Also ensured the accepted media types is always populated.
Media Picker 'upload' button dead after upgrade from 7.6.4->7.10.2
I have an image field using data type "Media Picker" that uses property editor "(obsolete) Media Picker" and property editor alias is "Umbraco.MediaPicker" (not "Umbraco.MultipleMediaPicker"). I have upgraded from 7.6.4 to 7.10.2 locally and then published to an Azure web app. On the Azure site the 'upload' button is not opening a 'file upload' dialog, it is just a dead click. I see no errors in Chrome Dev Tools. I have incremented ClientDependency id in case old scripts were cached. On the locally upgraded(via NuGet) site the 'Upload' media button works correctly even if I set debug=false so that the CD bundles scripts the same way as the Azure site. I thought maybe I'm missing a controller script but I can't tell.
I see Umbraco.MediaPicker is not even listed on Umb Prop Editors ,it only lists Umbraco.MultipleMediaPicker.
Update: The 'Upload' button is still dead when I create a new doctype property that uses a new data type that uses editor '(Obsolete) Media Picker - Umbraco.MultipleMediaPicker' or 'Media Picker - Umbraco.MediaPicker2
I am experiencing the same problem, neither the old or new media picker work. When I click the upload button nothing happens.
No error's are appearing in the console and nothing obvious missing so it's difficult to debug.
Have you managed to fix the issue? or Do you know the specific cause (which version or change that has broken the functionality)?
Connor, good to hear I'm not alone, but no I have not fixed this yet. I'm not sure what more info I can provide, I put everything I could think of in the original post. 7.10.2 upload button works locally and then when I publish a non-debug/Release version to Azure it does not work. This is the only bug I've found, which is always strange when just one small feature is broken. Since upload button doesn't work on the new editors either it appears it is not caused by the old editor being marked 'obsolete'. I'll see if I can make a new empty 7.10.2 site today, publish it to Azure and test again that way.
You are on Azure, too?
Yeah am on Azure as well, however my upload button doesn't even work locally.
Let me know how you get on with creating a new empty site.
We have identified a "workaround" for dealing with this issue until a fix is identified - within the Media Library itself, if you create a new folder, the link to "choose files" successfully opens a file picker as expected and video/images can be uploaded.
I'm confused by your reply because there was never a problem using 'click here to choose files' in the Media section, so creating a new folder in Media doesn't provide any new functionality there. Let me know if I misunderstand.
Ironically, after creating a new folder in Media, when I go back to Content and test again, the Upload button DOES open a 'file upload' dialog as long as the 'Select Media' area starts in a folder, not just in the root /Media. This is my experience even if I delete the new folder I created in Media and so maybe this was true even if I did not try what you suggested and you've nudged me to discover this! Can others test and report back? Does Select Media 'file upload' work as long as you are not starting in the Media root? If I start in a Media sub folder and then browse back to Media root 'file upload' DOES work.
I have my prior 7.6.4 site version still running as a deployment slot in Azure. I retested this bug there and now I see NO different between 7.6.4 and 7.10.2! Neither of them open the 'File Upload' window from a Content node's Media Picker field if the 'Select Media' side area starts in the Media root. If I browse into a Media subfolder then 'File Upload' DOES open. And if I browse back to Media root it DOES also open. Perhaps my site admin who reported this bug is crazy. Can you guys provide any info? Do you think this is a fake bug?
UPDATE: I retested my local 7.10.2 version before I published it to Azure and I can confirm that 'File Upload' did work even when on the root Media node. But then after publish it did NOT work and created this post.
Yup - you're quite right, if I navigate to a folder the "File Upload" button begins working, and still works if I navigate back up to the root folder!
There's definitely something odd going on...
In my initial "workaround" for this, I mentioned adding a folder as I can't see how you choose files within Media and upload the to the root folder - unless I'm missing something!
Lets be clear where we are. The bug I posted is while admining a node in the Content area. The workaround you described was in the Media area, correct? The drag or 'click here to upload files' section in Media works for the Media root upon page load or click of the top most Media node above the folders or within a Media folder. This is confusing because Media is also the first breadcrumb in 'Select Media' when admining content.
To clarify - the issue we are seeing is when trying to add media whilst administering a content node, for example - adding a video via a Macro ,when the "Select media" tab is opened the "Upload" button below doesn't trigger a file upload window:
However, as you noticed, if you navigate to a folder, (and even back up to root), this button begins to function.
The "Choose files" functionality within the main Media tab below appears to be working without issue.
How'd you get on with installing a fresh version of Umbraco? Did the upload button work then?
It'd be weird if this issue occurs on a fresh installation as it's a pretty obvious bug which is proving very difficult to diagnose what the issue is especially that it starts working with the workaround mentioned above.
Sorry, I will try to do this test today. This got away from me because I realize I am actually happy about this 'bug' because now my editors have to put images in folder and not clog up the Media root with disorganized images!
Did you find time to check a new installation? Although by the looks of it, it may not be a bug and may have been designed like that.
There's an issue over at issues.umbraco.org - http://issues.umbraco.org/issue/U4-11039
I created a new solution in VS and installed latest version 7.10.4 via NuGet with the Starter Kit running SqlCE.
I enabled deprecated data types in UmbracoSettings.config via: "showDeprecatedPropertyEditors = true"
I created a new Person-Photo-Media Picker data type using Property Editor Alias: Umbraco.MediaPicker with no starting folder set.
I added a property to the Person doctype.
I published to an Azure Web App and while I get occasional SqlCe umbraco.sdf file lock errors I'm still able to test.
And... The Upload button works in all cases including the Media root!
Conclusion: Upload should have continued to work after my(our) upgrades, but I can't say I know this technically an Umbraco bug. I'm confused by the statement in the Issue "At some point in recent Umbraco history, it became standard procedure for media uploads to be disallowed at the root level of media." because I find no documentation of that.
What do you think?
Ok - had a bit of time to dig around into this today and have found out what is causing the button to not work when initially opening the media picker in the root folder.
Unfortunately I've not quite worked out why - but here's what I've found.
Basically, when the media picker is first opened in the root folder the following is used from /Umbraco/views/common/overlays/mediaPicker/mediapicker.html
There is then a directive within /Umbraco/Js/umbraco.directives.js which adds an uploadForm:
The reason this appears to not be working when initially in the root folder is that the value for acceptedMediatypes.length is initially 0. When you go down a folder this is changing to 1, (for us at least), and then the uploadForm is added and the upload button begins to work as expected - even when navigating back to the root folder.
I'm currently trying to work out where the Accepted Media Types value comes from - but at least this feels like some progress!
Ok... so finally worked this out!
Basically our two media types of File and Image were not set to "Allow as root" in the premissions:
As such, the upload button doesn't work when in the root folder. This must have been something which was fixed between 7.6.4 and 7.10.2 as images were successfully loaded into root prior to the upgrade.
The existing bug now seems to be two-fold - one is the fact the button doesn't look disabled when it should do, (which is the issue linked previously), the second is that all you need to do is to navigate into a folder and then back to root in order to upload files into the root folder....
I can confirm this. Is this reported as an issue in issues.umbraco.org?
Yes - I think http://issues.umbraco.org/issue/U4-11039 pretty much matches this issue although it is specifically about the "disabled" upload button not being obvious.
I have commented on the issue regarding the behaviour when navigating into a folder and back up to the root enabling upload when it shouldn't.
I've submitted a pull request to resolve this.
Basically hides the button should there be now accepted media types to upload to the selected folder. Also ensured the accepted media types is always populated.
Thanks Andy
This issue is resolved in 7.11.0.
is working on a reply...