We should be able to disable PWA on update.php set of pages

Created on 12 December 2023, 10 months ago
Updated 9 March 2024, 7 months ago

Problem/Motivation

PWA service worker causes some erratic behavior on the update.php page when there are some actual updates to do.

The triggerBatch method of DbUpdateController class is called twice for example which keeps the site in maintenance mode after update.

Steps to reproduce

Active PWA on your site and use the update.php page with some actual updates to do (DbUpdateController triggerBatch method is not called is there is nothing to update and the site is not set to maintenance mode).

Your site will stay on maintenance mode after the update instead of switching back to normal state.

Proposed resolution

On our side we found that disabling cache for the update.php set of pages seemed to partially fix the problem.

We added the two following lines to the "URLs to exclude" field on the "Service Worker" tab of the PWA configuration screen :

update\.php
update\.php/.*

At the end of the update process it still shows that the site is in maintenance mode, but in reality it is not, the site is back online.

🐛 Bug report
Status

Active

Version

2.0

Component

pwa_service_worker

Created by

🇫🇷France mably

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024