Skip to content
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

changing site logo through Site control panel is buggy #6579

Open
tkimnguyen opened this issue Jan 11, 2025 · 4 comments
Open

changing site logo through Site control panel is buggy #6579

tkimnguyen opened this issue Jan 11, 2025 · 4 comments

Comments

@tkimnguyen
Copy link
Member

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

@stevepiercy
Copy link
Collaborator

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

@rahul-vyas-dev
Copy link

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.

@MohammadBinAftab
Copy link

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

@stevepiercy
Copy link
Collaborator

@MohammadBinAftab see the referenced pull request comment #6591 (review).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants