Files
odoo_source/addons/website_event_track
Pierre Paridans 7a5cabe889 [FIX] website_event_track: crash in SW's fetch listener on Safari 17.0+
Before this commit, when browsing the "Events" part of website on Safari
(both macOS and iOS/ipadOS), the page could be loaded only once and
returns a "FetchEvent.respondWith received an error: NotSupportedError:
The operation is not supported." error message on afterward, completely
blocking access to everything under the `/event` path.

This error is actually thrown from the ServiceWorker's `fetch` event's
listener, and more specifically, from the storage availablity check.

Since Safari 17.0, the Storage API - and in this case its `estimate()`
function -  has been enabled in WebKit's builds for Apple platforms (see
WebKit PR [1]). But even if this feature should be available in Web
Workers (cf. MDN [2] and the spec [3]), it returns a NotSupportedError
error when called from the ServiceWorker on Safari 17.0+ (but works fine
in the global scope).

This commit works around that issue by wrapping this call in a
try/catch, acting as if not supported when an error happens.

Steps to reproduce (on Safari iOS):
- Install website_event_track module
- Navigate to the `/event` page
- Reload the page
=> Browser level error page "FetchEvent.respondWith received an
error..."

Note: due to the browser's engine restriction on iOS/ipadOS, this issue
also affects all browsers on these platforms.

[1]: https://github.com/WebKit/WebKit/pull/10973
[2]: https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/estimate
[3]: https://storage.spec.whatwg.org/#ref-for-dom-storagemanager-estimate

opw-3553880
opw-3570730
opw-3610167
opw-3629039
opw-3547759

closes odoo/odoo#146190

X-original-commit: 45020635a81ce53ee0769ca54ac733528e4110b1
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-12-14 06:56:23 +00:00
..
…
…

Organize Events, Trainings & Webinars

Schedule, Promote, Sell, Organize

Get extra features per event; multiple pages, sponsors, multiple talks, talk proposal form, agenda, event-related news, documents (slides of presentations), event-specific menus.

Organize Your Tracks

From the talk proposal to the publication

Add a talk proposal form on your events to allow visitors to submit talks and speakers. Organize the validation process of every talk, and schedule easily.

Odoo's unique frontend and backend integration makes organization and publication so easy. Easily design beautiful speaker biographies and talks description.

Agenda and List of Talks

A strong user interface

Get a beautiful agenda for each event published automatically on your website. Allow your visitors to easily search and browse talks, filter by tags, locations or speakers.

Manage Sponsors

Sell sponsorship, promote your sponsors

Add sponsors to your events and publish sponsors per level (e.g. bronze, silver, gold) on the bottom of every page of the event.

Sell sponsorship packages online through the Odoo eCommerce for a full sales cycle integration.

Communicate Efficiently

Activate a blog for some events

You can activate a blog for each event allowing you to communicate on specific events. Visitors can subscribe to news to get informed.