advanced-cms / advanced-reviews

This is an Open Source add-on that improves the reviewing process and lets external users to view & review content items or whole projects without the need to access the Edit Mode. Created and maintained by Bartosz Sekuła and Grzegorz Wiecheć
Apache License 2.0
17 stars 15 forks source link

Image replacement not displayed in review Link #204

Open ravindra-dange opened 2 years ago

ravindra-dange commented 2 years ago

Replace image in CMS with same name without Publishing in Draft mode, and create View/Edit link, the updated images are not displayed in View link.

barteksekula commented 2 years ago

@ravindra-dange please send more details. how do you render the images, do you use htmlhelper? how does the display template for img look like?

ravindra-dange commented 2 years ago

Hello Bartosz,

We have added images in XHTMLString. And we render Content from XHTMLString on Page. I see images getting Rendered in externalContentView Page in below Format.

[cid:e0973c5a-7ea1-4b3d-8acc-c5222d8a05b2]

If the version of image is added in contentLink ID while rendering the image I can see Draft image replaced: [cid:386ec737-548e-4409-9707-0a5ac55ec288]

Can you please help me in getting rendered Draft verion of image associated with respective image.

Below is View file to render the HTML block: [cid:a1a157cf-9e03-4fff-b1c6-4dd7027b63f4]

Thanks, Ravindra


From: Bartosz Sekuła @.> Sent: Wednesday, November 17, 2021 1:35 AM To: advanced-cms/advanced-reviews @.> Cc: Dange Ravindra @.>; Mention @.> Subject: Re: [advanced-cms/advanced-reviews] Image replacement not displayed in review Link (Issue #204)

@ravindra-dangehttps://protection.greathorn.com/services/v2/lookupUrl/99b7b9d6-9420-41a4-bc43-ed7c0592a17d/176/987c2edba78aa6b1f478cce1351680c71027e0bd please send more details. how do you render the images, do you use htmlhelper? how does the display template for img look like?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://protection.greathorn.com/services/v2/lookupUrl/8278e976-b0b9-4f0b-8bad-580ff0f4793b/176/987c2edba78aa6b1f478cce1351680c71027e0bd, or unsubscribehttps://protection.greathorn.com/services/v2/lookupUrl/3d6aa226-3195-400c-91b4-cb8ab7e47f87/176/987c2edba78aa6b1f478cce1351680c71027e0bd. Triage notifications on the go with GitHub Mobile for iOShttps://protection.greathorn.com/services/v2/lookupUrl/35e7a4e7-12bc-4a65-905e-2968204ad80c/176/987c2edba78aa6b1f478cce1351680c71027e0bd or Androidhttps://protection.greathorn.com/services/v2/lookupUrl/50fc185d-eddd-4a99-98cb-ff7f35dd657f/176/987c2edba78aa6b1f478cce1351680c71027e0bd.

barteksekula commented 2 years ago

Did you upload the screenshots? I can see your comment like this: image

ravindra-dange commented 2 years ago

Hello Bartosz,

We have added images in XHTMLString. And we render Content from XHTMLString on Page. I see images getting Rendered in externalContentView Page in below Format.

image

If the version of image is added in contentLink ID while rendering the image I can see Draft image replaced: image (1)

Can you please help me in getting rendered Draft verion of image associated with respective image.

Below is View file to render the HTML block:

image (2)

Thanks, Ravindra

ravindra-dange commented 2 years ago

@barteksekula Hello Bartosz,

I verified same issue in Alloy site by replacing the image and was able to replicate the issue: Following image was replaced with Black Background: image

In externalContentView Link I see Old image instead of replaced image: image

Expected Output should be below(Edited ContentLID manually): image

Thanks, Ravindra

barteksekula commented 2 years ago

Thank you. I will investigate.

barteksekula commented 2 years ago

Sorry it took so long. I am still not able to reproduce this: image The image always has the full ID contentLink_workId I was not able to reproduce a scenario when there would just be the contentLink without the workID

ravindra-dange commented 2 years ago

@barteksekula Hello Bartosz,

Below are steps to reproduce issue:

  1. Create Project in Episerver and select the Project before Editing.

  2. Create image with Same name which needs to be replaced

  3. Go to Block where image needs to be replaced image

  4. Select new image to be replaced having same name:
    image

  5. Click Replace File:
    image

  6. In Edit mode, new image will be displayed:
    image

  7. In Project the image will appear in Draft mode:
    image

  8. Create Draft Review Link:
    image

  9. The review link will not show Draft image instead will display Old image:
    image

Thanks, Ravindra

barteksekula commented 2 years ago

Oh, you never mentioned you're in project mode before.

daniel-isaacs commented 1 year ago

Unless I'm mistaken, isn't step 5 is going to replace the image in the system (and, using default setup, automatically publish the new version of that image file)? So, the external review page might be showing a cached version of that file (do you have Cloudflare set up, for example?). But in reality, I think the new image might already be in-use on the published version of the site.

I think the more expected scenario is: upload the new image file with a different filename than the existing image. Then, in that block/page property, replace the old image with that newly uploaded image. This way, the external View link should show the new image, but the published page will still use the old image.

ravindra-dange commented 1 year ago

Hello Isaacs,

If we replace image by creating Project, the image is uploaded in Draft mode, this replace image is visible in Draft mode once we publish the image then it replaces the existing Live image.

We do not have Cloudflare, The screenshot is taken from Alloy project from my local Laptop. The below image shows Draft mode of image.

Draft Image https://user-images.githubusercontent.com/93924713/142442985-7218c543-8c38-4fd0-8e40-096eaccebc66.png [https://user-images.githubusercontent.com/93924713/142442985-7218c543-8c38-4fd0-8e40-096eaccebc66.png]

Live image https://user-images.githubusercontent.com/93924713/142442656-a6984fa5-d8c6-4fbd-b7c5-9c23ce88279d.png [https://user-images.githubusercontent.com/93924713/142442656-a6984fa5-d8c6-4fbd-b7c5-9c23ce88279d.png]

Thanks, Ravindra


From: Daniel Isaacs @.> Sent: Tuesday, October 11, 2022 2:46 AM To: advanced-cms/advanced-reviews @.> Cc: Dange Ravindra @.>; Mention @.> Subject: Re: [advanced-cms/advanced-reviews] Image replacement not displayed in review Link (Issue #204)

Unless I'm mistaken, isn't step 5 is going to replace the image in the system (and, using default setup, automatically publish the new version of that image file)? So, the external review page might be showing a cached version of that file (do you have Cloudflare set up, for example?). But in reality, I think the new image might already be in-use on the published version of the site.

I think the more expected scenario is: upload the new image file with a different filename than the existing image. Then, in that block/page property, replace the old image with that newly uploaded image. This way, the external View link should show the new image, but the published page will still use the old image.

— Reply to this email directly, view it on GitHubhttps://protection.greathorn.com/services/v2/lookupUrl/24da05a1-a621-441d-97c1-f96f44774b86/176/c5276f62371cad09d51f6e9e2e5f961749b13bd4, or unsubscribehttps://protection.greathorn.com/services/v2/lookupUrl/7eee4653-9762-40d2-9a62-9ec162c5dd5c/176/c5276f62371cad09d51f6e9e2e5f961749b13bd4. You are receiving this because you were mentioned.Message ID: @.***>