-
- Downloads
[FIX] website: fix add menu item dialog traceback
Steps to reproduce the bug: - Website application - Go to Website - Go to menu "Pages" - Click on "Edit Menu" - Click on "Add Menu Item" - Bug: This leads to a traceback. This bug was introduced by the commit [1], where we do a "querySelectorAll" on the anchor selector element, which doesn't actually exist in the "Add Menu Item" dialog. The code related to adding an anchor shouldn't be executed in this modal. This was changed in versions higher than 14, where we separated the code used in the "Add Menu Item" dialog from the code used for editing links in edit mode. In this commit, we fix this issue minimally by adding a "return" statement if the anchor selector element doesn't exist. [1]: https://github.com/odoo/odoo/commit/c9dbfd35ffda80f0ad07288f13ce9d0dde9591f2 opw-3422898 closes odoo/odoo#129710 Signed-off-by:Romain Derie (rde) <rde@odoo.com>
Please register or sign in to comment