odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
37.48k stars 24.38k forks source link

[17.0] module: Blog - Cover image cannot be viewed/displayed #173974

Open JonnyWhatshisface opened 2 months ago

JonnyWhatshisface commented 2 months ago

Odoo Version

Steps to Reproduce

Blog post cover image is unable to be viewed once set/saved if image format is not already webp (conversion process seems to break it).

When editing, image is visible when added/uploaded in media library. But once clicking save, it is blank:

Screenshot 2024-07-20 at 19 06 14

Setting blog cover image also results of duplication of image in the media library (same image showing up twice).

Screenshot 2024-07-20 at 18 57 38

If selecting an image that already exists in the media library, that image is also duplicated. For example:

Screenshot 2024-07-20 at 19 01 49

Duplication looks to be visible from the filestore - files with size of 0bytes showing up. For example:


# ls -alR ./ | grep -i "Jul 20" | grep -i "11:"
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:46 04
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 9a
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 cc
drwxr-xr-x   2 odoo odoo  4096 Jul 20 11:46 .
-rw-r--r--   1 odoo odoo 17866 Jul 20 11:46 04673b7afaba2cc3fa1dcf9e9558826d10958521
drwxr-xr-x   2 odoo odoo   4096 Jul 20 11:19 .
-rw-r--r--   1 odoo odoo  20198 Jul 20 11:19 9a99f6f62f26fd01d629f034ff01564760a10607
drwxr-xr-x   2 odoo odoo    4096 Jul 20 11:19 .
-rw-r--r--   1 odoo odoo   27997 Jul 20 11:19 ccc456c30e0bd3ddea0c316d089057198acd9ac1
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:46 04
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 9a
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 cc
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:46 .
-rw-r--r--   1 odoo odoo    0 Jul 20 11:46 04673b7afaba2cc3fa1dcf9e9558826d10958521
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 .
-rw-r--r--   1 odoo odoo    0 Jul 20 11:19 9a99f6f62f26fd01d629f034ff01564760a10607
drwxr-xr-x   2 odoo odoo 4096 Jul 20 11:19 .
-rw-r--r--   1 odoo odoo    0 Jul 20 11:19 ccc456c30e0bd3ddea0c316d089057198acd9ac1

However, images inserted in to the blog using an image block in the blog content do not exhibit this behaviour - nor do any website page images. The issue seems to only effect the cover for blog entries.

Looks to be related to webp conversion introduction. The webp is accessible via directly opening it in the browser, but is not visible in the cover of blog entries.

Expected Behaviour: Images which are not already webp format that are uploaded and set on the cover will not duplicate themselves in the media, will not generate 0byte files in the filestore and will be visible on the cover upon saving.

Log Output

No response

Support Ticket

No response

JonnyWhatshisface commented 2 months ago

Confirmed that uploading files which are already webp does not exhibit this behavior.

fbhikmawan commented 1 month ago

Raised Up.

I am also experiencing this issue. There is a lot of weirdness going on here. The cover image on the blog post only appears when the contributor user of the blog post is logged in. However, the blog post cover image turns into a camera icon for public users.

User LoggedIn | Cover Blog Posts

User LoggedIn | Cover Blog Posts

Public User | Cover Blog Posts

Public User | Cover Blog Posts

fbhikmawan commented 1 month ago

I found another solution. It seems that the system fails to make the converted webp images into public document.

When we go to Settings >> Technical >> Database Structure | Attachments. Then select the converted webp image file, generally named: Blog Post ..., then check the Is public document section.

This will make the cover image to be shown.

Screenshot 2024-08-11 152059

PyaeZaw97 commented 1 week ago

Now I'm facing this issue. How can you solve it? Please suggest me your solution.

dima1002 commented 1 week ago

I found another solution. It seems that the system fails to make the converted webp images into public document.

When we go to Settings >> Technical >> Database Structure | Attachments. Then select the converted webp image file, generally named: Blog Post ..., then check the Is public document section.

This will make the cover image to be shown.

Screenshot 2024-08-11 152059

I have the same problem with Odoo 17 Enterprise Odoo Server 17.0+e-20240910. The checkbox for Public was not there. I have now checked the box, but unfortunately there has been no change. I have uninstalled and installed and updated the Blog app several times, but unfortunately no image appears in the blog. Unless you log in to Odoo, then all the images are there.

dima1002 commented 3 days ago

I found another solution. It seems that the system fails to make the converted webp images into public document.

When we go to Settings >> Technical >> Database Structure | Attachments. Then select the converted webp image file, generally named: Blog Post ..., then check the Is public document section.

This will make the cover image to be shown.

Screenshot 2024-08-11 152059

That was the solution, but just checking the box is not enough. You then have to restart Odoo and then the images will be displayed.