Sunday, June 9, 2024
1 change · saas-17.3
Resolved issues and error corrections
This fix prevents the website homepage from crashing when a website menu is saved without a URL, which can happen in debug mode or custom setups. It improves reliability for website administrators and visitors by safely handling empty menu links.
Original PR description
This PR aims to fix a traceback error occurring on the Homepage when the URL field is empty in any website menu. Steps to Reproduce: - Activate Debug mode. - Navigate to Website -> Configuration -> Menus. - Create a new menu and leave the URL field empty. - Go to the Homepage. Issue: A traceback error occurs due to a slice operation being performed on the URL field. When the URL field is empty, it is interpreted as a boolean, leading to the error. Solution: Added a check to ensure the URL field is set before performing the slice operation. Along with that, this PR also fixes a issue which was originally fixed in PR [1] but because of task [2], we had decided not to merge it in saas-17.3 (then master). task-3921988 [1]: (https://github.com/odoo/odoo/pull/160457) [2]: (https://www.odoo.com/odoo/project/974/tasks/3851453)