when I click on the link in debug mode, i get the following message:
System.InvalidOperationException: Missing parameter: id.
at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection)
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
any ideas? this is shutting our ability down to edit our site... also, we recently upgraded to Umbraco 6.2.5 - any known issues there? many thanks!
seeing this on another server as well when I try to access the URLPickerService.asmx
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
ok, I rolled back to Umbraco 6.2.4 on one of our dev servers and everything is working again, any idea on what could be breaking this between umbraco 6.2.4 and 6.2.5? many thanks!
I haven't used uComponents UrlPicker with v6.2.5, so I haven't seen this error myself, (sorry). Something does seem a little suspect between the upgrades.
Lee - will do. I've submitted a ticket on the umbraco side already. I've tried to update multiple times and run into the same issue each time I've tried.
I'm getting the same error after upgrading from Umbraco 4.11.10 to Umbraco 6.2.5 (reinstalled latest uComponents 6.0.0). Viewing a backend node with an existing Multi Url Picker where media items have been selected, doesn't show these anymore - instead the loading symbol just remains. Looking at the errors, the above exception is thrown for each media item selected across all Url Pickers for that node. So far, the suggestions at http://issues.umbraco.org/issue/U4-6378 do not make any difference. Unfortunately, in my case, downgrading to 6.2.4 is not an option.
So, looking at the source for uComponents, it seems it is down to the following method: uComponents.DataTypes.UrlPicker.Services.MediaNodeUrl. It extracts the media item XML by ID and then uses XElement.Parse on it, however it seems that in Umbraco 6.2.5, the XML fragment being parsed here has multiple root elements, which causes this method to fail. Here is a sample of my XML:
I'm not sure if this fragment used to have a valid root node in 6.2.4, but in my instance, this isn't the case anymore. I'm also not sure if it's still suppose to have a valid root element in 6.2.5 that got lost for some reason during the upgrade.
I ended up recompiling uComponents.DataTypes.dll with a fix and all seems good now!
public string MediaNodeUrl(int id)
{
Authorize();
var media = XElement.Parse(string.Format("<root>{0}</root>", library.GetMedia((int)id, false).Current.InnerXml));
var umbracoFile = media.Descendants(Constants.Umbraco.Media.File);
if (umbracoFile.Any())
{
return umbracoFile.First().Value;
}
else
{
// Cycle through other properties
foreach (var element in media.Descendants())
{
// Check if the property looks like a URL to the media folder
if (element != null &&
!string.IsNullOrEmpty(element.Value) &&
element.Value.Contains("/media/"))
{
return element.Value;
}
}
}
return null;
}
I'll try to schedule some time to patch it up and get a patch release out, (I can't promise anything immediate - I'm juggling lots of Umbraco packages at the moment).
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, ""));
URL picker just spinning, generating 500 server error
just started getting 500 server errors...
http://mysite.com/umbraco/plugins/uComponents/UrlPicker/UrlPickerService.asmx/MediaNodeUrl
when I click on the link in debug mode, i get the following message:
System.InvalidOperationException: Missing parameter: id. at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection) at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
any ideas? this is shutting our ability down to edit our site... also, we recently upgraded to Umbraco 6.2.5 - any known issues there? many thanks!
seeing this on another server as well when I try to access the URLPickerService.asmx
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
ok, I rolled back to Umbraco 6.2.4 on one of our dev servers and everything is working again, any idea on what could be breaking this between umbraco 6.2.4 and 6.2.5? many thanks!
Hi John,
I haven't used uComponents UrlPicker with v6.2.5, so I haven't seen this error myself, (sorry). Something does seem a little suspect between the upgrades.
If you do try the upgrade again and hit the same issue, could you raise it as a bug on our GitHub please?
https://github.com/uComponents/uComponents/issues
We can then try to pinpoint whether it is Umbraco core or uComponents or something else.
Thanks,
- Lee
Lee - will do. I've submitted a ticket on the umbraco side already. I've tried to update multiple times and run into the same issue each time I've tried.
http://issues.umbraco.org/issue/U4-6378
Lee - just submitted it on GitHub. Appreciate your help! Many thanks!
https://github.com/uComponents/uComponents/issues/30
Hi guys.
I'm getting the same error after upgrading from Umbraco 4.11.10 to Umbraco 6.2.5 (reinstalled latest uComponents 6.0.0). Viewing a backend node with an existing Multi Url Picker where media items have been selected, doesn't show these anymore - instead the loading symbol just remains. Looking at the errors, the above exception is thrown for each media item selected across all Url Pickers for that node. So far, the suggestions at http://issues.umbraco.org/issue/U4-6378 do not make any difference. Unfortunately, in my case, downgrading to 6.2.4 is not an option.
Any further assistance will be appreciated.
Thanks,
Rigardt
So, looking at the source for uComponents, it seems it is down to the following method: uComponents.DataTypes.UrlPicker.Services.MediaNodeUrl. It extracts the media item XML by ID and then uses XElement.Parse on it, however it seems that in Umbraco 6.2.5, the XML fragment being parsed here has multiple root elements, which causes this method to fail. Here is a sample of my XML:
I'm not sure if this fragment used to have a valid root node in 6.2.4, but in my instance, this isn't the case anymore. I'm also not sure if it's still suppose to have a valid root element in 6.2.5 that got lost for some reason during the upgrade.
I ended up recompiling uComponents.DataTypes.dll with a fix and all seems good now!
Rigardt
That's awesome. Do you mind posting what changes you made? Many thanks!
Sure, here's my amended method:
Sweet! Many thanks!
Thanks for the updates Rigardt.
I've made a note of it on the uComponents issue tracker: https://github.com/uComponents/uComponents/issues/30#issuecomment-78388201
I'll try to schedule some time to patch it up and get a patch release out, (I can't promise anything immediate - I'm juggling lots of Umbraco packages at the moment).
Cheers,
- Lee
Thx Rigardt and Lee! Much appreciated!
Lee - is this the correct link for the latest source for uComponents:
https://github.com/uComponents/uComponents/tree/master/src
Hi,
having same problem here with 6.2.5
Looking at the uComponents source code and the MediaNodeUrl(int id), i cannot get the fix provided by Governor Technology to compile.
doesn't like :
umbracoFile.Any()
not sure if i have missed anything?
Thanks
Scott - did you copy over the umbraco 6.2.5 assemblies into the uComponents solution?
Hi Scott
The .Any() won't work unless you have "using System.Linq;" at the top. Can you please confirm this?
Rigardt
yip.
sorry - scanned over the using and saw using System.Xml.Linq; as using System.Linq;
Thanks
Scott
Thanks Rigardt and John - got this workaround working.
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
Regards,
Daryl Teo
is working on a reply...