volto icon indicating copy to clipboard operation
volto copied to clipboard

changing site logo through Site control panel is buggy

Open tkimnguyen opened this issue 11 months ago • 8 comments

Describe the bug As discussed in https://community.plone.org/t/bug-in-changing-site-logo-volto/20430 the new site logo change shows up only after the site logo is changed AGAIN.

To Reproduce

  1. Use the Site control panel to change the logo (to, say, image Y) and save the change.
  2. Reload the home page (or reload the Site control panel): the default logo is still there.
  3. Change the logo AGAIN (to image Z) and save.
  4. Reload the home page or the Site control panel: you see that the logo has changed... but it changed to image Y.

A curious behavior: when you specified a new logo haven't saved the change yet, the preview of the logo lags: it shows the previously specified logo.

Expected behavior If you change the logo to image Y and save and reload the Site control panel (or some other page of the site) you should immediately see the logo change to image Y.

Software (please complete the following information): This happens on demo.plone.org:

Volto 18.4.0 Plone 6.1.0b2 plone.restapi 9.9.0 CMF 3.6 Zope 5.11.1 Python 3.11.11 (main, Dec 4 2024, 20:36:13) [GCC 10.2.1 20210110] PIL 11.0.0 (Pillow) Add-ons @plone/volto-slate 18.0.4 volto-subblocks 2.1.0 volto-form-block 3.8.3 @eeacms/volto-accordion-block 10.4.6 @kitconcept/volto-button-block 3.0.3 @kitconcept/volto-heading-block 2.4.0 @kitconcept/volto-highlight-block 4.0.0 @kitconcept/volto-introduction-block 1.0.0 @kitconcept/volto-separator-block 4.1.2 @kitconcept/volto-slider-block 6.3.1 @kitconcept/volto-light-theme 5.0.2 volto-demo 1.0.0-alpha.0

tkimnguyen avatar Jan 11 '25 00:01 tkimnguyen

To add to this, for me, on my first attempt to change the logo in the Site control panel, it uploaded but displayed the "broken image" icon. I could not repeat this a second time. From here, I clicked Replace Image, uploaded the same image, and then it appeared in the Site control panel only, but not in the page header, even after a force reload.

I also found a bizarre behavior that I don't know how to repeat reliably. Test with two images, large-logo.jpg (this was actually a photo) and small-logo.png, and use the Replace Image button. In one case, the content of large-logo.jpg somehow got crossed with the filename of small-logo.png.

Screenshot 2025-01-10 at 8 02 18 PM

The only way I found to remove it was to:

  1. Delete the logo.
  2. Save changes.
  3. Force reload with cache disabled in the browser. Default Plone logo is restored.
  4. Add a logo.
  5. Save changes.
  6. Force reload with cache disabled in the browser. New logo appears.

For convenience, I've attached a few logos to test with.

city-of-eugene-400x400_1 bring-recycling-logo-400_1 threadbare-400x400

stevepiercy avatar Jan 11 '25 04:01 stevepiercy

Frontend State and Preview Caching: The preview does not immediately reflect the new logo due to outdated local state or caching.

Backend API Response: The backend may not immediately update or serve the new logo, possibly due to caching mechanisms.

Cache Invalidation: The system does not properly invalidate or refresh the cache after a logo update.

rahul-vyas-dev avatar Jan 11 '25 11:01 rahul-vyas-dev

Why is this issue still open if it has been fixed?

MohammadBinAftab avatar Jan 25 '25 10:01 MohammadBinAftab

@MohammadBinAftab see the referenced pull request comment https://github.com/plone/volto/pull/6591#pullrequestreview-2551326154.

stevepiercy avatar Jan 25 '25 11:01 stevepiercy

hi @stevepiercy I am not able to reproduce this issue please see this video https://www.loom.com/share/d56dadfb29c1400d8a0744a58c8fc863?sid=9d13e0a1-0484-4222-b93e-97d2a0baacfb

Shyam-Raghuwanshi avatar Jan 27 '25 17:01 Shyam-Raghuwanshi

@Shyam-Raghuwanshi The bug report was about doing this on demo.plone.org but you showed doing it locally. The issue quite likely has to do with cache headers that would only have an effect when Plone is deployed behind a caching proxy.

davisagli avatar Jan 27 '25 17:01 davisagli

Hi There! 👋

We haven't seen any activity on this issue in a while :sleeping:, and we want to make sure that it's still relevant.

If updating to the latest version of Volto doesn't help, please let us know by:

  • adding a comment about what needs to be done next 💬
  • updating its status and other labels 🏷️

Otherwise close this issue. 🧹

github-actions[bot] avatar Sep 09 '25 00:09 github-actions[bot]

Is this issue already resolved, or is someone currently working on it?

pratyush07-hub avatar Dec 11 '25 20:12 pratyush07-hub