-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8.2 - Image in RTE looses it's Url #6721
Comments
I am also having this issue with a new install of 8.2 |
This is the URL i get :)
|
I'm not really sure what you guys are doing to make this happen in the RTE. I've just tested in I tried adding a RTE directly on a doctype, adding an image (clicked the insert media button and then dragged an image into the media library and selecting it). None of the above caused me any issues at all, neither when saving, resaving or saving+publishing, reloading or refreshing the browser in any way. Could you please provide clear instructions as to how to make this happen - then we'd be happy to look into it. We recently did changes on what is stored when storing images, so instead of storing an actual file path in I do think there is a bug with this converter when an image is used in a RTE inside a grid and the value is then rendered in frontend - since it doesn't seem to actually map the file path back in the Could you please elaborate on everything else, but the one confirmed bug I mentioned above? |
Hi @clausjensen :) I had my project on Umbraco 8.1.3 and just upgraded it to 8.2 :) |
@AndersBrohus-MySupport Yep - that sounds like what I'm referring to above :) There's def. a bug when outputting the value of a RTE containing a image - when used inside a grid. I however don't see any of this causing any issues at all for me in the backoffice (which is what I think the initial bug report is about?). So I would like some clarification on that... |
@AndersBrohus-MySupport Could you perhaps create an issue describing your bug - I'd like to keep these two things separated ... if it turns out what is happening here is "just" the same as what you describe, we'll just close this issue as duplicate then. |
Of course @clausjensen :) Right here, #6763 |
To render links (and now images) in the RTE in the Grid you need to pass the RTE value to the Umbraco-CMS/src/Umbraco.Web/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs Lines 84 to 86 in 1d39a25
Ideally this would be handled in the Grid Value Converter, but I'm not sure if there's a nice way to do this. |
With what we know now, this looks more like a consequence of another bug, than a problem in itself. Quickly summarizing:
I'm leaning towards the use of AzureStorage for media as the possible culprit. A bug or bad configuration, ... @jmaxwell1562, @AndersBrohus-MySupport - do you also use AzureStorage? I will further investigate #2. If I can solve it, I'll update here as well. If not, I'll have to create a separate issue, and this one can probably be closed, right? |
We don't use AzureStorage, just the default :) |
Hi @jvtroyen I've not been able to reproduce your initial issue, I've tried the following code in a clean Umbraco 8.1, 8.1.5 and 8.2 public class TestController : UmbracoApiController
{
[HttpGet]
public IHttpActionResult Test()
{
var mediaAtRoot = UmbracoContext.Media.GetAtRoot();
return Ok(from media in mediaAtRoot
select new
{
name = media.Name,
url = media.Url
});
}
} and they all return the Url for You've mentioned you are using the |
Hi @rasmusjp , I've started from a clean 8.1.5 and 8.2 and they are working fine. I can continue hunting no sooner than thursday. If I find anything new, I'll update. |
I also am not using Azure Storage. I was experimenting with the rich text editor in the grid. |
@jmaxwell1562 did you experience the problem in a custom controller or when rendering the grid in razor? if the latter, could you try updating |
I'm just rendering the grid in razor. Updating the Rte.cshtml worked. Thanks. |
is this fix coming any time soon or should we update the rte.cshtml for now |
@ZiringTawfique the fix will be included in 8.4.0 but you can update the Rte.cshtml as a solution until then 😃 (see: https://github.com/umbraco/Umbraco-CMS/pull/6810/files) |
Closing this one - the |
I was working in 8.1.5, when I noticed that Items retrieved on an APIController, have an empty Url for Image properties.
I.e. the Image property is there, it has an Id and UmbracoFile.Src and all, but Url is empty.
I upgraded to 8.2, just to see if it was a bug that was fixed, and now there's a secondary issue, and the purpose of this ticket.
If I add an image to a RTE inside a grid, it is initially displayed fine, but when I save and publish, it vanishes.
The code when I insert the image is
<img src="/media/1016/warning.jpg" alt="" data-udi="umb://media/e375b74ab95140df9f5b3eb7d121ab95" />
After saving, the src-tag is gone :
<img alt="" data-udi="umb://media/e375b74ab95140df9f5b3eb7d121ab95" />
I have reverted my code to 8.1.5 and this behaviour is now working again.
I can't help but feel it may be related to the Url being empty.
Reproduction
Add an image to an RTE field inside a Grid.
Expected result
Image keeps it's src-tag
Actual result
src-tag becomes empty after save.
This item has been added to our backlog AB#3246
The text was updated successfully, but these errors were encountered: