Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 2 posts 74 karma points
    Jun 15, 2017 @ 19:51
    Jon
    1

    Help with error - Getting 500 error trying to get property

    Hello

    We're pretty new to Umbraco and we're using it for our first website. So far it's all been good and we're very happy with it, but today we've hit a problem which threatens our project and we just can't seem to find a solution!

    One of our developers created a page and had a "textbox" to be able to enter the URL of a picture. The property is called "Icon 1".

    However, he later changed this to a media picker and this has completely broken the media picker and the page itself. And we have no idea why.

    When we load the page, we see this yellow screen:

    Server Error in '/' Application.

    String "icon 1" is not a valid udi.

    Exception Details: System.FormatException: String "icon 1" is not a valid udi.

    Source Error:

    Line 137:

    @Umbraco.Field("testimonial3")

    Line 138: Line 139:

    @Umbraco.Field("testimonial3Author")

    Line 140: Line 141:

    When we try to edit this page, we get this red error message at the bottom of the page:

    Request error: The URL returned a 404 (not found): ysod

    Looking in Fiddler, I can see that the following URL/data is called:

    URL: /umbraco/backoffice/UmbracoApi/Entity/GetByIds?type=Media Data: {"ids":["icon 6"]}

    However, the message back is:

    {"Message":"An error has occurred.","ExceptionMessage":"Multiple actions were found that match the request: \r\nGetByIds on type Umbraco.Web.Editors.EntityController\r\nGetByIds on type Umbraco.Web.Editors.EntityController\r\nGetByIds on type Umbraco.Web.Editors.EntityController","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)\r\n at Umbraco.Web.Editors.ParameterSwapControllerActionSelector.SelectAction(HttpControllerContext controllerContext)\r\n at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.

    Has anyone come across this before and how do we fix it? We're absolutely stuck on this and it's driving us mad!!

    Many thanks for your hep Jon

  • Jon 2 posts 74 karma points
    Jun 16, 2017 @ 08:27
    Jon
    1

    In case anyone comes up against this error in future, we finally managed to get around this problem. Although to be honest, we still have no idea what the problem was.

    What we did was delete the property, re-add the property with a different name and then re-publish the site.

    If anyone knows what the cause of this was, it would be really appreciated if you could let us know!

  • Oriol 5 posts 77 karma points
    Mar 15, 2018 @ 11:41
    Oriol
    0

    Hi!

    I was getting the same error while I found the reason behind it. Basically the field wasn't cleared out before changing the property editor.

    Steps would go as:

    1. Create a document type with a "textbox" editor.
    2. Add content filling it up with some text like as you on your sample "Icon 1".
    3. Change document type to "media picker".
    4. Open Content to edit the field.
    5. An error is raised, I cannot understand "Icon 1" text with my media picker property editor

    When the editor changes to media picker if its not empty or a content in the editor that would be understood by the media picker it will raise an error. To test it out change the other way around, from media/content picker to a textbox. You will see that textbox displays umbraco url format e.g. umb://document/06940c19cb8d4370b46db5d6624b358b. Which has no problems being displayed on a media picker.

    Long story short, fix would be to remove all data before changing type (empty is empty for all editors) or set it to a valid umbraco reference.

    BR, Oriol

  • Craig Mayers 164 posts 508 karma points
    Mar 15, 2018 @ 12:52
    Craig Mayers
    1

    Its simple really!

    You had the textbox property, which would have had values at the time when you changed its DataType.

    So when it loads again the with the New DataType (i.e. MediaPicker) it is trying to load the value that was previously saved in the textbox, which wouldn't of been a valid UDI value what the Media Picker expects hence the Error.

    Regards

    Craig

  • Mark Bowser 273 posts 860 karma points c-trib
    Sep 03, 2020 @ 19:15
    Mark Bowser
    0

    We ran into this error using Stacked Content the other day. We had a stacked content nested within another stacked content. One of the media picker properties on the inner stacked content had an alias of icon. This caused stacked content to populate the icon property with icon-stop color-amber instead of a valid media node udi. The icon-stop color-amber text came from the icon being used for the inner stacked content document type.

    I haven't had a chance to see if this is a known bug. We were using Stacked Content 2.0.4 with Umbraco 7.15.5. I love Stacked Content by the way. Amazing package. This just took me a while to figure out so I wanted to share it. I fixed it by changing the property alias from icon to decorativeIcon.

      An error occured
      Multiple actions were found that match the request: GetByIds on type Umbraco.Web.Editors.EntityController GetByIds on type Umbraco.Web.Editors.EntityController GetByIds on type Umbraco.Web.Editors.EntityController
    
      Exception Details
      System.InvalidOperationException: Multiple actions were found that match the request: GetByIds on type Umbraco.Web.Editors.EntityController GetByIds on type Umbraco.Web.Editors.EntityController GetByIds on type Umbraco.Web.Editors.EntityController
    
    
      Stacktrace
      at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)
         at Umbraco.Web.Editors.ParameterSwapControllerActionSelector.SelectAction(HttpControllerContext controllerContext)
         at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)
         at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    
Please Sign in or register to post replies

Write your reply to:

Draft