You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2022. It is now read-only.
uComponents URL picker not working after Umbraco 6.2.4 to 6.2.5 upgrade #30
A 500 server error is thrown when a local Umbraco media file is attempted to be loaded/added.
The following error info below is displayed:
Server Error in '/' Application. Request format is unrecognized for URL unexpectedly ending in '/MediaNodeUrl'.
Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/MediaNodeUrl'.
Source Error: An unhandled exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/MediaNodeUrl'.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
+668425 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
+306 System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
+89 System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+516 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+288 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34209
This error has only happened since we have upgraded to Umbraco v6.2.5. If we rollback to Umbraco v6.2.4, then the error goes away (and uComponents works fine).
From: Lee Kelleher [mailto:[email protected]]
Sent: Friday, March 13, 2015 10:09 AM
To: uComponents/uComponents
Cc: John Hodgkinson
Subject: Re: [uComponents] uComponents URL picker not working after Umbraco 6.2.4 to 6.2.5 upgrade (#30)
@jHodgkinsonhttps://github.com/jHodgkinson Yes, that's the latest stable branch of the source code.
I've also encountered this issue. I applied the fix, but still had issues with the javascript.
I'm not sure if the other posters also encountered this issue, but the problem was that the web service call was returning JSON and jQuery immediately picked it up and turned it into an object. This caused an issue with responseText.replace (as an object it doesn't have the replace function).
I fixed this by altering UrlPickerScripts.js. Recompile this together with the changes to UrlPickerService and it should then work.
success: function (responseText) {
// Strip any <pre> tags and parse the JSON
var response = jQuery.parseJSON(responseText.replace(/<(\/)?pre[^>]*>/gi, ""));
Activity
leekelleher commentedon Mar 11, 2015
It appears that the returning data from
umbraco.library.GetMediahas changed in v6.2.5.See this forum post for a code fix:
https://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/61972-URL-picker-just-spinning,-generating-500-server-error?p=0#comment211285
The line in UrlPicker is here:
https://github.com/uComponents/uComponents/blob/master/src/uComponents.DataTypes/UrlPicker/Services/UrlPickerService.cs#L44
jHodgkinson commentedon Mar 12, 2015
thx Lee! is this the correct link for the latest source for uComponents:
https://github.com/uComponents/uComponents/tree/master/src
leekelleher commentedon Mar 13, 2015
@jHodgkinson Yes, that's the latest stable branch of the source code.
There are some other fixes in the
dev-6.0.1branch, but I can't guarantee that it is as stable asmasterat this point.jHodgkinson commentedon Mar 13, 2015
Awesome! Thank you for all your help Lee!
John Hodgkinson
Applications Architect / DBA / Integrations & Development Lead
North Carolina Bar Association
8000 Weston Parkway
Cary, North Carolina 27513
919.657.1579
[email protected]:[email protected]
www.ncbar.orghttp://www.ncbar.org/
From: Lee Kelleher [mailto:[email protected]]
Sent: Friday, March 13, 2015 10:09 AM
To: uComponents/uComponents
Cc: John Hodgkinson
Subject: Re: [uComponents] uComponents URL picker not working after Umbraco 6.2.4 to 6.2.5 upgrade (#30)
@jHodgkinsonhttps://github.com/jHodgkinson Yes, that's the latest stable branch of the source code.
There are some other fixes in the dev-6.0.1https://github.com/uComponents/uComponents/tree/dev-6.0.1 branch, but I can't guarantee that it is as stable as master at this point.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-78986918.
leekelleher commentedon Mar 13, 2015
I'll get around to doing a new v6.x release soon - once my current workload eases off a little 😼
darylteo commentedon Apr 1, 2015
Hi,
I've also encountered this issue. I applied the fix, but still had issues with the javascript.
I'm not sure if the other posters also encountered this issue, but the problem was that the web service call was returning JSON and jQuery immediately picked it up and turned it into an object. This caused an issue with responseText.replace (as an object it doesn't have the replace function).
I fixed this by altering UrlPickerScripts.js. Recompile this together with the changes to UrlPickerService and it should then work.
Change to
Note: my environment has installed the MVC security upgrades (4.0.0.1) as per http://umbraco.com/follow-us/blog-archive/2014/10/16/getting-a-systemwebhttpapicontroller-error which may explain why noone else has encountered this issue.
To accomodate this, perhaps the code should be modified to test for presence of string before trying to replace.
Regards,
Daryl Teo
leekelleher commentedon Apr 1, 2015
@darylteo Thanks for the fixes. Is there any way we could encourage you to collaborate on a pull-request? (You have the skills 😎)
darylteo commentedon Apr 21, 2015
Any update?
kirkov commentedon Jun 15, 2015
Changing
InnerXmltoOuterXmlfixes the issue for me:var media = XElement.Parse(library.GetMedia((int)id, false).Current.OuterXml);
(
uComponents/src/uComponents.DataTypes/UrlPicker/Services/UrlPickerService.cs
Line 44 in 85385bf
leekelleher commentedon Sep 11, 2015
This bug has been fixed in PRs #31 #33 and released in uComponents v6.1.0.