Thursday, March 13, 2025
6 changes · saas-18.1
Resolved issues and error corrections
This fixes a timing issue that could cause the website editor to crash when users rapidly opened and closed the emoji picker. The change makes the emoji picker handle short-lived loading and closing states more safely, improving editing stability without changing user workflows.
Original PR description
Before this commit, when opening and closing emoji picker quickly, it could crash with the following error: ``` TypeError: Cannot read properties of null (reading 'querySelector') ``` Steps to…
Before this commit, when opening and closing emoji picker quickly, it could crash with the following error: ``` TypeError: Cannot read properties of null (reading 'querySelector') ``` Steps to reproduce: - Open website editor - Add a new content block - In content block, add banner with `/banner` - spam click quickly on the banner icon This happens because when clicking very quickly on emoji picker button, the `EmojiPicker` component is in a mounted state and the `gridRef.el` is undefined, thus resulting in the crash when attempting `gridRef.el.querySelector` The grid has no reason to not be in the template. However, the `useRef()` has a special check to determine whether the ref is attached to DOM, and when not then it returns `null`. The website editor uses web editor, which itself mount the emoji picker in a popover. The click handler closes the popover if it was open and re-opens the emoji picker. Close of popover, when too fast, results to destroying popover before the emoji picker, which detaches the emoji picker from DOM, therefore all refs are `null`. The `EmojiPicker` is about to be destroyed, but for a fraction of time it can re-render itself and access to null refs. Emoji picker relies heavily on template to model its matrice of emojis for keyboard navigation and managing overflow of the category navbar. That's why mounting the emoji picker results to 2 renderings. Because of quick mount/unmount, overlay and double rendering of emoji picker, all this puts sometimes the emoji picker in a case of being status "mounted", in a fragment, and calling useEffect to set the active emoji in the grid. This requires `gridRef.el`, which is unfortunately `null` because of being in fragment, thus leading to the crash. This commit fixes the issue by making the code more defensive against `gridRef.el` not be set, to tackle the case the component is in a fragment while it's being unmounted. `navbarRef.el` could also be `null` for a similar reason but instead of useEffect this is triggered from ResizeObserver.
This fix prevents the form status bar from appearing on top of the fullscreen mass mailing editor. Users editing email content in fullscreen mode should see the workspace correctly without interface elements blocking it.
Original PR description
[Commit] introduced a `z-index` change for the `form_statusbar` element, which resulted in that element overlapping with the fullscreen view for the `mass_mailing` html_field. The `z-index` of `o_mass_mailing_iframe_ancestor_fullscreen` is adjusted to be just 1 lower than `oe_snippets` (the snippets sidebar), hopefully preventing overlaps in the future. [Commit]: https://github.com/odoo/odoo/commit/a7864fcbc00d245df76b62bbed421b5171dbd4d4 task-4643999
Reactions on website messages now display under the original message they refer to, rather than under a related publisher comment. This makes conversations clearer for visitors and reduces confusion when reading feedback or discussions.
Original PR description
Before this commit, message reactions appeared at the bottom of the publisher's comment instead of the original linked message. This commit ensures they are correctly positioned under the original message. Before  After  task-4619148
This fix ensures that when a user clears and deletes an edited message, the message editor closes properly afterward. It prevents the deleted message area from stretching to the full composer width, keeping the chat interface visually consistent.
Original PR description
**Current behavior before PR:** When a user edited a posted message and cleared its body, a confirmation dialog appeared for deletion. After confirming, the message was deleted, but `exitEditMode` was not called. This caused the message to take the full width of the composer. **Desired behavior after PR is merged:** `exitEditMode` is now called when an empty message is deleted, ensuring the composer resets properly and the message bubble maintains the correct width. Task-4642532 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Performance test expectations were adjusted after a related change made publishing checks rely on access rights. This keeps automated tests aligned with the expected behavior when the website app is installed, without changing appointment-only performance counts.
Original PR description
Related to odoo/odoo#201029 Now that Can publish is based on access rights, some extra queries are needed when website is installed. Note that the appointment-only counts are unchanged. task-3175890
The planning scheduler now handles deleted recurring shift patterns without crashing. This keeps automatic generation of future shifts running reliably after managers delete some recurring shifts.
Original PR description
To reproduce: - create two repeating planning.slot records, Shift A and Shift B - delete Shift A and all of its repeats - delete only the last repeat of Shift B - run the "Planning: generate next recurring shifts" scheduled action - Cron fails with "record is missing or deleted" error Problem: The function to create the repeat shifts (planning.recurrency _repeat_slot) iterates over recurrences and deletes them if there are 0 existing shifts linked to them (i.e. Shift A's reccurency). On a subsequent loop iteration, an attempt is made to access the company_id field of the recordset (self) which will now contain a deleted planning.recurrency record, causing the missing record error. Solution: Access the company_id field on the current iterated planning.recurrency record instead of the 'self' recordset. opw-4457844 X-original-commit: b3742b576e67f0391db0e5fcf138950c6275e770