-
- Downloads
[FIX] website_event: 404 when no track on register page
Reproduction:
1. Install eCommerce, Events, in the settings of Events, toggle
“Tickets” and “Online Ticketing”
2. Go to Website -> Go to Website -> Event, at the top bar, Customize ->
Track Visitor, turn it off
3. Click on the event “Open wood collection”, also turn off “Track
Visitor”
4. Click on the register button for this event, also turn off “Track
Visitor”
5. Copy the URL of the registration page, open it in an incognito tab.
Don’t go through from the beginning of the main website
6. Register a standard free ticket, enter the information, and click
confirm
7. The website throws a 404 not found error
Reason: when we turn off “Track Visitor” on the event registration page.
If we directly access the registration page, the created visitor’s
access token is not written in the cookies. Thus, when we call
_get_visitor_from_request after redirecting to
event_registration_success, the visitor isn’t retrieved and it causes a
404 not found error. A detailed case study is attached below.
Fix: before the redirection of successful registration, we check if the
logged visitor_uuid is the same as created visitor’s access token. If
not, e.g. the visitor_uuid is not logged, we log it in cookies.
opw-2828682
closes odoo/odoo#101635
Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Please register or sign in to comment