Hi,
I can confirm this problem. I think the following is happening:
After updating mailman3-web, the static files in
/usr/share/python3-django-postorius/static/ (and
python3-django-hyperkitty, and maybe others) have an older date than the
collected files in /var/lib/mailman3/web/static from the previous version.
Because of that, "./manage collectstatic" skips the files with "not
modified", and is not updating the static files, even though the files
have been updated (but have an older modified date).
To fix this, you can touch the static files in
/usr/share/python3-django-postorius/static/ (to set a newer modification
date) and then run "./manage collectstatic". Then the files will be
updated, since collectstatic seems to compare the file modification
dates and not the actual file contents.
I'm not sure how the Debian package installer should avoid this problem.
Probably it should either make sure that the updated files have a newer
date before running collectstatic or delete the old files before doing that.
Below you find some additional notes that I wrote down while
investigating the situation. Maybe that is helpful.
Marco
--- Additional notes: ---
I noticed strange CSS problems after upgrading from buster to bullseye.
With the information from this bug report, I found the following issue:
- /var/lib/mailman3/web/static is used, but seems to contain old
versions (e.g. Bootstrap v3.3.5 at
postorius/libs/bootstrap/css/bootstrap.min.css)
- /usr/share/python3-django-postorius/static/ seems to contain the
correct version (e.g. Bootstrap v4.0.0) but is not used.
Further digging into the issue, I found that
/usr/lib/python3/dist-packages/postorius/static is a soft-link to the
correct location at /usr/share/python3-django-postorius/static/. So that
seems to be right.
Hence, I suspect that "./manage.py collectstatic" for some reason does
not update the static files. Running "./manage.py collectstatic -v 3"
skips all files with "not modified":
----------------------------------------------------------------------
www-data@mail:/usr/share/mailman3-web$ ./manage.py collectstatic -v 3
You have requested to collect static files at the destination
location as specified in your settings:
/var/lib/mailman3/web/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
[...]
Skipping 'postorius/libs/bootstrap/css/bootstrap.min.css' (not modified)
[...]
----------------------------------------------------------------------
Removing the static files at /var/lib/mailman3/web/static before running
collectstatic solves the problem:
----------------------------------------------------------------------
www-data@mail:/usr/share/mailman3-web$ ./manage.py collectstatic -v 3
You have requested to collect static files at the destination
location as specified in your settings:
/var/lib/mailman3/web/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
[...]
Copying
'/usr/lib/python3/dist-packages/postorius/static/postorius/libs/bootstrap/css/bootstrap.min.css'
[...]
----------------------------------------------------------------------
Now Bootstrap has the correct version (v4.0.0 in this case) and the CSS
issues are gone!
So the workaround is to delete the static files in
/var/lib/mailman3/web/static before collecting them with "./manage.py
collectstatic" or to touch the files in
/usr/share/python3-django-postorius/static/ so they have a newer
modification date.
--
OpenPGP Key ID: 0x62937F7F