images disappear when upload an image

Bob Bob asked on March 13, 2022 11:51

I have some page types for example like a product and there is an image for this product, but when i update the image of any product and save, if the site is open when i refresh all images not display need to refresh many times to display the images

Recent Answers


Juraj Ondrus answered on March 14, 2022 05:52

What version and hotfix are you using? Where exactly you are editing the field? In Pages app (Page or Form/Content tab?) or in Ecommerce? Are you using any caching? What web part or code is displaying the data on the live site? Does it take into account caching?

0 votesVote for this answer Mark as a Correct answer

Bob Bob answered on March 16, 2022 05:49 (last edited on March 16, 2022 06:05)

@Juraj Ondrus The version used is v12.0.29 the site setting configured to store the media and in the file system and Database, when uploading the image from the Form Tab, for example create product and open the form tab enter the data and upload an image, when i save and then go refresh the opened page, I see the images disappeared need to close and open many times, I thing the attachment folder not loading in the browser, no cashing used, repeater web part is used to display the products out of the box no custom code, the site is in offline mode i open the preview mode

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on March 16, 2022 06:40

Thanks, so it seems you are using Portal engine. The field for the images - is it a page type field? If yes, what is its definition in the page type? Then, what web part or what code is displaying the value from the file upload field? I would ask your devs to check this. Maybe there is a wrong caching configured not picking up your changes. You may need to set the cache dependency keys to correctly flush the cache when the page is modified.

0 votesVote for this answer Mark as a Correct answer

Bob Bob answered on March 16, 2022 08:13 (last edited on March 16, 2022 08:26)

Juraj Ondrus Thanks for the answer, yes its only portal engine work, it is using repeater web part with a transformation and the transformation reads the page type field value of the img field which should be the img url the problem doesn't happen if the site is on the live mode, I think in the offline mode when saving and refresh the other page which is opened in another tab it tries to load the default page for the offline mode

0 votesVote for this answer Mark as a Correct answer

Bob Bob answered on March 16, 2022 09:20 (last edited on March 16, 2022 09:20)

I just added the setting below to the repeater web part is that means the cache will be cleared if there is any modification to the attachment happened ?

Partial cache dependencies: checked use default and then added cms.attachment|all in the text box

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on March 16, 2022 10:53

I would rather use page related cache keys. Like
node|< site name >|< alias path >|childnodes or whatever will fit your tree structure.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.