Copied to clipboard

Flag this post as spam?

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


  • Huw Reddick 335 posts 1007 karma points
    Jul 25, 2020 @ 07:29
    Huw Reddick
    0

    Rich Text Editor Media picker problem Images not showing in Pages

    I would like to start by saying what a fantastic product you have, only been playing for a couple of weeks, but very impressed so far.

    I am using the latest Umbraco version 8.6.3 and have an issue when adding images in the Rich Text Editor.

    When I select an image, it adds the following imgtag to the content

    <img src="/media/5sajwtdu/insurance.png?width=150&amp;height=150" alt="" width="150" height="150" data-udi="umb://media/4c8b81fa3c744e4ca8ccf500b16f0588" />
    

    All good you think, however when this actually renders in the page, the img tag becomes.

    <img src="?width=150&amp;height=150" alt="" width="150" height="150" data-udi="umb://media/4c8b81fa3c744e4ca8ccf500b16f0588"/>
    

    It looses the src url?? Can anyone point me to where/why this might be happening?

  • Huw Reddick 335 posts 1007 karma points
    Jul 29, 2020 @ 09:44
    Huw Reddick
    100

    I managed to track down the problem, my /Views/Partials/Grid/Editors/Rte.cshtml was as below

    @model dynamic
    @using Umbraco.Web.Composing
    @using Umbraco.Web.Templates
    
    @Html.Raw(TemplateUtilities.ParseInternalLinks(Model.value.ToString(), Current.UmbracoContext.UrlProvider))
    

    I looked in the src repository on git hub and changed it to

    @model dynamic
    @using Umbraco.Web.Composing
    @using Umbraco.Web.Templates
    @{
        var value = TemplateUtilities.ParseInternalLinks(Model.value.ToString(), Current.UmbracoContext.UrlProvider);
        value = TemplateUtilities.ResolveUrlsFromTextString(value);
        value = TemplateUtilities.ResolveMediaFromTextString(value);
    }
    @Html.Raw(value)
    

    This fixed the issue, but VS complains that TemplateUtilities is obsolete, so what should the view be for 8.6.3?

  • Huw Reddick 335 posts 1007 karma points
    Jul 29, 2020 @ 09:57
    Huw Reddick
    0

    Issue seems to have been caused by installing a third party package which must have overwritten the rte.cshtml file, however even with a fresh project and install of UmbracoCms via nuget still states that TemplateUtilities is obsolete

  • Huw Reddick 335 posts 1007 karma points
    Jul 29, 2020 @ 10:12
    Huw Reddick
    0

    The problem was caused by installing the codeshare starter kit.

  • Robert J. Bullock 386 posts 404 karma points
    Aug 18, 2020 @ 20:53
    Robert J. Bullock
    0

    I'm experiencing the same issue. Any luck fixing it?

  • Huw Reddick 335 posts 1007 karma points
    Aug 19, 2020 @ 16:44
    Huw Reddick
    0

    yes, see my earlier post in the thread

  • Matt 308 posts 730 karma points
    Aug 19, 2020 @ 16:49
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies