U4-1027 - Media Sort Usability

Created by Laurence Gillian 11 Oct 2012, 13:53:59 Updated by Sebastiaan Janssen 25 Jul 2013, 05:59:31

Relates to: U4-2538

Relates to: U4-1909

Great news that you can do this fancy thumbnail sorting. Lovely.

However, where is the 'Save' icon? Ahha it's hidden on the properties tab. Doh! >.<

Could we follow the same behavior on content, so this 'Save' icon is always visible regardless of active tab.

http://screencast.com/t/pQRmwX49xw2

Laux

Comments

Laurence Gillian 11 Oct 2012, 13:56:28

Oh scrub that... The sort order doesn't get saved even when you click save.

http://screencast.com/t/KNY806yIQdV


Funka! 11 Oct 2012, 19:33:49

I also noticed that you can drag media items around and re-sort them, but after realizing the new sort order isn't saved I just figured this was an incomplete feature scheduled for revisiting/completing at some later date. However I can't find any mention of this here in the issue tracker so yes, would be great to have this be "saveable". Also would be wonderful to be able to drag-drop media items into different folders!

I see there ''is'' an issue U4-229 but that is regarding the tree, not the folder thumbnail tiles, so maybe this functionality would be related, maybe would be separate?


Sebastiaan Janssen 14 Oct 2012, 08:59:30

Hmm, apparently you need to modify your web.config in order for the sorting to work. You must explicitly allow HttpPost from every origin to the webservices (of course Umbraco checks if it's a valid request (through session ID and UmbracoContextID) so users not logged in can't just start sorting. In the system.web section add:

Source: http://stackoverflow.com/questions/657313/request-format-is-unrecognized-for-url-unexpectedly-ending-in

I'm not sure I would want to recommend everybody to do this as this affects other (your own custom) webservices as well. So we probably need to rework this webservice call.


Funka! 22 Mar 2013, 00:29:56

I'm still making this web.config tweak in my new 4.11.5 sites. I guess if not using any custom webservices as Sebastiaan warns about, this is still OK to be doing? Such a lovely feature, shame to not have available out of the box without knowing about this tweak!


Funka! 22 Mar 2013, 00:47:13

Oh that's right, I forgot why I came here just a moment ago. I wanted to add a suggestion that should this feature ever see more attention, would be lovely to have the node tree on the left update/reload itself whenever things get dragged around and re-sorted. Thx!


Shannon Deminick 16 Jul 2013, 01:35:43

We should probably just change the ajax call to not use asp.net webservices and just use a rest service.


Funka! 16 Jul 2013, 01:41:17

The workaround that Sebastiaan posted last October 2012 worked for a little while back in the 4.x branches, but I found that it later conflicted with the new "Embed Media" feature that appeared in one of the later updates (e.g., for inserting a YouTube vid directly into the richtext editor) so I ended up putting it back. Although without this workaround, dragging and resorting in v6.1.2+ seems to work as expected, so maybe this is no longer an issue or was already fixed?

EDIT: This comment was based on some testing I did on localhost; see my later comment below where I indicate this does NOT work on proper IIS.


William Burnett 24 Jul 2013, 03:49:23

This HAS NOT been fixed in 6.1.2 as I have a fresh installation and an upgrade and I can not sort via dragging and dropping media thumbnails.

Can we please get some attention to this issue?


Shannon Deminick 24 Jul 2013, 04:33:53

I've responded on the Our thread as well: http://our.umbraco.org/forum/core/general/38040-Get-Sort-Order-of-Media-Items?p=1#comment156601 I cannot replicate and have tested a fresh install of 6.1.2 and 6.1.3, both work as expected. Are you getting JS errors when doing this, what browser are you running, etc... if it is not working for you and if we can replicate then we can fix it.


Funka! 24 Jul 2013, 19:28:46

Hi Shannon,

Your screencast shows this working nicely on localhost. This also works for me just fine on localhost. However, on proper IIS 7.5 hosting at my ISP, it does not work. I just confirmed this on a brand new installation from the official 6.1.2 binaries, haven't even created a document type yet. Firebug net panel shows a 500 error. Here's the error message and stack trace:

'''Request format is unrecognized for URL unexpectedly ending in '/UpdateSortOrder'.'''

[InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/UpdateSortOrder'.] System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +569561 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +212 System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47 System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

So, ... doesn't look like anything is even hitting Umbraco code, and getting hung up on regular IIS/ASP.NET stuff first?

P.S. the site is using integrated pipeline with full trust.


Sebastiaan Janssen 24 Jul 2013, 19:52:29

@Funka do you have your web.config configured like this on the live server?

      <webServices>
              <protocols>
                      <remove name="HttpPost"/>
                      <add name="HttpPost"/>
              </protocols>
      </webServices>         


Funka! 24 Jul 2013, 22:27:58

Hi Sebastiaan, I do not have a {{webServices}} node at all in my web.config. (I don't see this in the official web.config distributed with 6.1.2 either. I do remember this however from older 4.x installations, but this is a brand new 6.1.2 I'm working with currently.)

I now have the exact same site running both locally and on a live server, all files (including web.config) are identical, and the sorting only works on the local machine (through Cassini). Hope this helps!


Sebastiaan Janssen 24 Jul 2013, 22:34:22

Try adding the webServices node on the live server.


Funka! 24 Jul 2013, 23:12:49

Adding that to my web.config does fix the problem on the live server. But that brings us back to your comment from October 2012 indicating how you wouldn't recommend this change to everyone due to possibility for other conflicts?

I also mentioned on July 15 how I did run into certain problems at one point that I traced back to this web.config change, although I'm not sure I described or remembered correctly what the issue exactly was.

Regardless, the fact this otherwise well-intentioned functionality doesn't work out of the box is still an open issue with no official resolution. (Although if the workaround works for you, great!)

Thank you!


Shannon Deminick 25 Jul 2013, 01:12:45

Ok, so after all the back and forth of it does work, it doesn't work, etc... we finally know how to fix it once and for all. I think it's too late to get in for 6.1.3 (but will confirm with Seb). There shouldn't be any 'conflicts' with this work-around for now, it's just saying 'enable HttpPost to asmx web services' since MS disabled that by default in .Net 1.1. With this fix, I'll also check to see if we are calling other asmx services and not using the ms js ajax libs to call them (which is really the underlying cause to this problem) and convert them to REST/WebAPI


Shannon Deminick 25 Jul 2013, 02:33:10

I decided to sneak this fix in for 6.1.3 BUT this is still pending Seb's review since it might be too late to do full testing for 6.1.3 version.

rev: 118f9b02e25a5bd880daf7091238baaa52f7a9da

I've also discovered there there are other places that we are calling asmx web services (POSTing) using jquery and not ms ajax api which will cause this same issue to occur! So, I'll create an issue report for those too but they will need to be fixed in 6.1.4.


Shannon Deminick 25 Jul 2013, 02:38:35

Here's the other reported issue: http://issues.umbraco.org/issue/U4-2538


Shannon Deminick 25 Jul 2013, 02:42:37

and i did test this outside of localhost :)


Sebastiaan Janssen 25 Jul 2013, 05:55:07

Great I'll review and test before release but this doesn't solve the original issue, which spun out of control into a whole other discussion. Creating new issue for it. :)


Shannon Deminick 25 Jul 2013, 05:57:29

But there's no need to have a save button on that screen since it saves automatically when you drag/drop


Sebastiaan Janssen 25 Jul 2013, 05:59:31

Aah yes! :-) Never mind.. ;)


Priority: Normal

Type: Usability Problem

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 4.10.0, 4.11.0, 6.0.0, 6.1.0, 4.11.1, 4.11.2, 4.11.3, 4.11.4, 6.0.1, 4.11.5, 6.0.2, 4.11.6, 6.0.3, 6.0.4, 4.11.7, 6.1.1, 6.0.6, 4.11.9, 6.0.5, 4.11.8, 6.0.7, 6.1.2, 4.10.1, 4.11.10

Due in version: 6.1.3

Sprint:

Story Points:

Cycle: