Completed
Last Updated: 18 May 2021 09:59 by ADMIN
ADMIN
Vessy
Created on: 17 Jul 2017 12:02
Category: Diagram
Type: Bug Report
0
Images with the same path are not rendered in the shapes HTML content
When more than one shapes have HTML content containing image with the same path, only the image inside the first shape is rendered:
https://www.screencast.com/t/mYJVfSOlP


Code to reproduce:
        <telerik:RadDiagram runat="server" ID="RadDiagram1">
            <LayoutSettings Enabled="true" Type="Tree" Subtype="Right" />
            <ShapesCollection>
                <telerik:DiagramShape Id="s1" >
                    <ContentSettings Html="<div>Shape 1</div><img src='sampleImage.png' />" />
                </telerik:DiagramShape>
                 <telerik:DiagramShape Id="s2" >
                    <ContentSettings Html="<div>Shape 2</div><img src='sampleImage.png' />" />
                </telerik:DiagramShape>
            </ShapesCollection>
        </telerik:RadDiagram>
2 comments
ADMIN
Rumen
Posted on: 18 May 2021 09:59

Hi all,

After detailed research of the caching issue, it appeared that it originates from the Kendo drawing engine. To overcome the behavior simply put a querystring after the duplicate image file name, e.g.

 

<telerik:RadDiagram runat="server" ID="RadDiagram1">
    <LayoutSettings Enabled="true" Type="Tree" Subtype="Right" />
    <ShapesCollection>
        <telerik:DiagramShape Id="s1">
            <ContentSettings Html="<div>Shape 1</div><img src='images/barcelona.jpg?somerandomparameter=Shape+1' />" />
        </telerik:DiagramShape>
        <telerik:DiagramShape Id="s2">
            <ContentSettings Html="<div>Shape 2</div><img src='images/barcelona.jpg' />" />
        </telerik:DiagramShape>
    </ShapesCollection>
</telerik:RadDiagram>

 

Regards,
Rumen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Peter Milchev
Posted on: 17 Jul 2017 14:57
A possible workaround is adding query parameters to the src URL of the image: 

<telerik:DiagramShape Id="s1" >
    <ContentSettings Html="<div>Shape 1</div><img src='sampleImage.png?somerandomparameter=Shape+1' />" />
</telerik:DiagramShape>
<telerik:DiagramShape Id="s2" >
    <ContentSettings Html="<div>Shape 2</div><img src='sampleImage.png?somerandomparameter=Shape+2' />" />
</telerik:DiagramShape>