diff --git a/website_sponsorship/controllers/main.py b/website_sponsorship/controllers/main.py index 2830d4d..a638a06 100644 --- a/website_sponsorship/controllers/main.py +++ b/website_sponsorship/controllers/main.py @@ -93,7 +93,16 @@ def load_child(self, **kwargs): @http.route( [ - "/child//", + # [T1835] : Note: the route MUST be specified *without* a trailing + # "/" otherwise when a child with a given id does not exist, the 404 + # Not Found page is not displayed and instead we get an infinite + # redirect loop. The root cause is that specifying a path with a + # trailing "/" adds the "/" to the path, and then ir_http.py + # (https://github.com/odoo/odoo/blob/ + # f2765d2cab5671a010404c36842bf1b4c4d6350b/addons/website/models + # /ir_http.py#L265) redirects to a version without the "/", creating + # the infinite loop. + "/child/", ], type="http", auth="public",