Thursday, February 22, 2024
2 changes · 17.0
Resolved issues and error corrections
This fix restores the ability for non-member users (like visitors) to receive live chat messages. Previously, when a visitor opened a live chat, they weren't being subscribed to channel events, preventing them from receiving messages. This fix ensures visitors and other non-members now properly receive all messages in the chat channels they participate in.
Original PR description
Since [1], accessing a live chat as a non member does not subscribe the user to the channel events. This results in the user not receiving any messages linked to this channel. This PR restores the previous behavior as removing it was not intentional. [1]: https://github.com/odoo/odoo/pull/154292 Steps to reproduce the issue: - Open a live chat with demo as a visitor - Connect as admin and go to live chat history - Open the chat with demo and the visitor - The thread is displayed in discuss - Send another message as the visitor - Admin does not receive the message
This fix restores missing images in the website module that disappeared after upgrading from version 16.0 to 17.0. When users upgraded their systems, certain images used in website snippets (like blockquotes) were no longer displaying because the image definitions weren't being properly updated during the upgrade process. This fix ensures those images are restored so websites continue to display correctly after upgrading.
Original PR description
Commit [1] introduced default images changes for the website library. The problem is that the ir.attachment definitions are in a non-updatable environment by mistake (apparently since forever)... so…
Commit [1] introduced default images changes for the website library. The problem is that the ir.attachment definitions are in a non-updatable environment by mistake (apparently since forever)... so they are not updated after update/upgrade. This commit moves the definitions to its own updatable file, in 17.0 and above only (ignoring potential other changes that were made in 15.0/16.0 at the time but apparently led to no issue). But this is not enough: upgraded users will still have those ir.attachment records marked as non updatable and will thus not be updated. Meaning that the ir.attachment record will still reference path to images that do not exist anymore (since [1]) and thus not display anything in related snippets, or worse: crash on some non-robust-to-404-images options (This will be made more robust in another update). Note that, at the moment, we cannot solve this issue by making the /web/image route not return a 404 but a placeholder image in that case, for technical reasons (even though it would be consistent as this is what is done if you try to reach `/web/image/something_with_a_typo`). It would also be annoying to solve this problem by adding a migration script inside the Odoo repo itself: - It would only work if upgraded users do a -u again (unlikely). - That would mean an upgrade script rotting in the main repo forever. Instead, this commit chose to restore the removed images so that upgraded users will be able to use the outdated paths. In master, an upgrade script will be made (in the upgrade repo) to properly update all those attachment records and be able to finally remove those outdated images. Note that this may also be fixed without upgrade script if non-updatable records whose XML declaration is moved out a non-updatable area become updatable (under discussion with the framework team... we will see when this lands in master). Steps to reproduce: - Install a 16.0 with the website module - Upgrade to 17.0 - Drag a "Blockquote" snippet on a page => Crash and the image is missing (in the DOM but invisible and impossible to edit). Note that the crash itself will also be fixed by the later update that will be done to make editor options more robust to 404 images. [1]: https://github.com/odoo/odoo/commit/a4377bfa85b19be29a430573e0f42fff4da52757 opw-3693055 opw-3723895 opw-3744257 opw-3747348 opw-3749764 ...