Broken web UI after upgrade
After upgrading MM3 and running all the post-update tasks and even re-indexing all the posts, I have ended up with a somehow "broken" hyperkitty. The archives display on a browser six, to say the least. The site is public, so I can share the link: https://list.rc.org/archives/
What should I do in order to fix this?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
Odhiambo Washington writes:
The site is public, so I can share the link: https://list.rc.org/archives/
The CSS is not working. Two possibilities to try first:
- (more likely) You didn't run the command that compiles the CSS. (probably) mailman-web compress
- (much less likely) The CSS got replaced in the upgrade and the ownership changed because you were working as root, and the server process can't access the files.
- other possibilities: the SASS compiler (usually sassc, possibly sass)
On Wed, Dec 14, 2022 at 8:02 PM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Odhiambo Washington writes:
The site is public, so I can share the link: https://list.rc.org/archives/
The CSS is not working. Two possibilities to try first:
- (more likely) You didn't run the command that compiles the CSS. (probably) mailman-web compress
- (much less likely) The CSS got replaced in the upgrade and the ownership changed because you were working as root, and the server process can't access the files.
- other possibilities: the SASS compiler (usually sassc, possibly sass)
- The post-update script runs everything required. For the avoidance of doubt, here it is: <CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress "$DJANGO_CONTROL_SCRIPT" compilemessages fi
syncdb_cmd="$DJANGO_CONTROL_SCRIPT migrate" if [[ ! -t 1 ]]; then # stdout is not a terminal syncdb_cmd="$syncdb_cmd --noinput" fi $syncdb_cmd echo 'Do you want to rebuild the search index? This takes a long time.' echo 'Type "Yes" to continue; anything else to quit.' read -p "> " response if [ "x$response" != "xYes" ] ; then exit; fi "$DJANGO_CONTROL_SCRIPT" update_index </CUT>
The script is run within the venv.
- That isn't possible. Why? Because when I do 'su -mailman' it automatically activates the venv via a .bashrc. I have run this: find /opt/mailman -type f -name "*.css" -exec ls -al {} \;
And all files are owned by mailman.mailman.
- I have the following in settings_local.py: COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass -t compressed {infile} {outfile}'), ('text/x-sass', 'sass -t compressed {infile} {outfile}'), ) COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
And:
root@list:/home/wash# su - mailman
(venv) mailman@list:~$ which sass
/usr/bin/sass
(venv) mailman@list:~$ which sass
--version
Ruby Sass 3.7.4
(venv) mailman@list:~$
Anything else that might be the issue?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
El 14/12/22 a las 18:16, Odhiambo Washington escribió:
On Wed, Dec 14, 2022 at 8:02 PM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Odhiambo Washington writes:
The site is public, so I can share the link: https://list.rc.org/archives/
The CSS is not working. Two possibilities to try first:
- (more likely) You didn't run the command that compiles the CSS. (probably) mailman-web compress
- (much less likely) The CSS got replaced in the upgrade and the ownership changed because you were working as root, and the server process can't access the files.
- other possibilities: the SASS compiler (usually sassc, possibly sass)
- The post-update script runs everything required. For the avoidance of doubt, here it is: <CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress
Odhiambo, I had problems in the compress process in the last updates. I would make sure the process is running ok. I had to disable the off line compression for this matter.
"$DJANGO_CONTROL_SCRIPT" compilemessages
fi
syncdb_cmd="$DJANGO_CONTROL_SCRIPT migrate" if [[ ! -t 1 ]]; then # stdout is not a terminal syncdb_cmd="$syncdb_cmd --noinput" fi $syncdb_cmd echo 'Do you want to rebuild the search index? This takes a long time.' echo 'Type "Yes" to continue; anything else to quit.' read -p "> " response if [ "x$response" != "xYes" ] ; then exit; fi "$DJANGO_CONTROL_SCRIPT" update_index </CUT>
The script is run within the venv.
- That isn't possible. Why? Because when I do 'su -mailman' it automatically activates the venv via a .bashrc. I have run this: find /opt/mailman -type f -name "*.css" -exec ls -al {} \;
And all files are owned by mailman.mailman.
- I have the following in settings_local.py: COMPRESS_PRECOMPILERS = ( ('text/x-scss', 'sass -t compressed {infile} {outfile}'), ('text/x-sass', 'sass -t compressed {infile} {outfile}'), ) COMPRESS_OFFLINE = True COMPRESS_ENABLED = True
And: root@list:/home/wash# su - mailman (venv) mailman@list:~$ which sass /usr/bin/sass (venv) mailman@list:~$
which sass
--version Ruby Sass 3.7.4 (venv) mailman@list:~$Anything else that might be the issue?
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.
On Wed, Dec 14, 2022 at 8:33 PM Guillermo Hernandez (Oldno7) via Mailman-users <mailman-users@mailman3.org> wrote:
El 14/12/22 a las 18:16, Odhiambo Washington escribió:
On Wed, Dec 14, 2022 at 8:02 PM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Odhiambo Washington writes:
The site is public, so I can share the link: https://list.rc.org/archives/
The CSS is not working. Two possibilities to try first:
- (more likely) You didn't run the command that compiles the CSS. (probably) mailman-web compress
- (much less likely) The CSS got replaced in the upgrade and the ownership changed because you were working as root, and the server process can't access the files.
- other possibilities: the SASS compiler (usually sassc, possibly sass)
- The post-update script runs everything required. For the avoidance of doubt, here it is: <CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress
Odhiambo, I had problems in the compress process in the last updates. I would make sure the process is running ok. I had to disable the off line compression for this matter.
@Guillermo Hernandez (Oldno7) <guillermo@querysoft.es> that sounds a bit non-standard, but care to explain what additional arguments you passed to django-admin compress?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
(sorry: I sent this yesterday afternoon, but from a unsuscribed mail account)
El 14/12/22 a las 19:04, Odhiambo Washington escribió:
On Wed, Dec 14, 2022 at 8:33 PM Guillermo Hernandez (Oldno7) via Mailman-users <mailman-users@mailman3.org> wrote:
- The post-update script runs everything required. For the avoidance of
doubt, here it is: <CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress Odhiambo, I had problems in the compress process in the last updates. I would make sure the process is running ok. I had to disable the off line compression for this matter.
@Guillermo Hernandez (Oldno7) <guillermo@querysoft.es> that sounds a bit non-standard, but care to explain what additional arguments you passed to django-admin compress?
I had to set compression off in the update to 3.3.7 because I was reproducing the same error as when I updated to 3.3.6. My guess is the problem you have now is about the same problem and you cannot see because you ran it in a script.
I reported that in https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.
On Thu, Dec 15, 2022 at 5:00 PM Guillermo Hernandez (Oldno7) via Mailman-users <mailman-users@mailman3.org> wrote:
(sorry: I sent this yesterday afternoon, but from a unsuscribed mail account)
El 14/12/22 a las 19:04, Odhiambo Washington escribió:
On Wed, Dec 14, 2022 at 8:33 PM Guillermo Hernandez (Oldno7) via Mailman-users <mailman-users@mailman3.org> wrote:
- The post-update script runs everything required. For the avoidance of
doubt, here it is: <CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress Odhiambo, I had problems in the compress process in the last updates. I would make sure the process is running ok. I had to disable the off line compression for this matter.
@Guillermo Hernandez (Oldno7) <guillermo@querysoft.es> that sounds a bit non-standard, but care to explain what additional arguments you passed to django-admin compress?
I had to set compression off in the update to 3.3.7 because I was reproducing the same error as when I updated to 3.3.6. My guess is the problem you have now is about the same problem and you cannot see because you ran it in a script.
I reported that in
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
In my case I do not get any errors so I think this is unrelated. I just seem to have a problem with the CSS files when accessing the archives.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 12/14/22 08:15, Odhiambo Washington wrote:
After upgrading MM3 and running all the post-update tasks and even re-indexing all the posts, I have ended up with a somehow "broken" hyperkitty. The archives display on a browser six, to say the least. The site is public, so I can share the link: https://list.rc.org/archives/
What should I do in order to fix this?
Are you asking about the lack of style or the "No archived list yet."?
The former indicates an issue in your web browser with accessing the
static
directory or an issue with the django admin collectstatic or
compress commands.
I don't know about the latter - could it be because all the archives are private and I'm, not logged in?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Dec 14, 2022 at 8:10 PM Mark Sapiro <mark@msapiro.net> wrote:
On 12/14/22 08:15, Odhiambo Washington wrote:
After upgrading MM3 and running all the post-update tasks and even re-indexing all the posts, I have ended up with a somehow "broken" hyperkitty. The archives display on a browser six, to say the least. The site is public, so I can share the link: https://list.rc.org/archives/
What should I do in order to fix this?
Are you asking about the lack of style or the "No archived list yet."?
The lack of style is the main issue.
The former indicates an issue in your web browser with accessing the
static
directory or an issue with the django admin collectstatic or compress commands.
So I have tested this with Brave, Google Chrome, Firefox - all on MS Windows and I do clear the browser cache.
I don't know about the latter - could it be because all the archives are private and I'm, not logged in?
Even when logged in, the situation is the same, unfortunately.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
Hi Odhiambo,
I see that URLs like " https://list.rc.org/static/CACHE/css/output.93545e20bc30.css" are failing, hence you might need to reset the Django cache with something like "mailman-web clear_cache".
With my best regards, Danil Smirnov Mailman3.com
On Wed, Dec 14, 2022 at 6:16 PM Odhiambo Washington <odhiambo@gmail.com> wrote:
After upgrading MM3 and running all the post-update tasks and even re-indexing all the posts, I have ended up with a somehow "broken" hyperkitty. The archives display on a browser six, to say the least. The site is public, so I can share the link: https://list.rc.org/archives/
What should I do in order to fix this?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to danil@smirnov.la
I had this issue (using the dockerized version) when
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
has been set to the wrong path. Maybe it's just the same: that your web server doesn't find the location for the static files.
Am 14.12.22 um 17:15 schrieb Odhiambo Washington:
After upgrading MM3 and running all the post-update tasks and even re-indexing all the posts, I have ended up with a somehow "broken" hyperkitty. The archives display on a browser six, to say the least. The site is public, so I can share the link: https://list.rc.org/archives/
What should I do in order to fix this?
On Thu, Dec 15, 2022 at 11:31 AM Jörg Schulz <info@joergschulz.de> wrote:
I had this issue (using the dockerized version) when
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
has been set to the wrong path. Maybe it's just the same: that your web server doesn't find the location for the static files.
That seems quite unlikely because:
- The archives displayed properly before the upgrade.
- The static path is correctly set for nginx:
server { ...
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
location /static/ {
alias /opt/mailman/mm/static/;
}
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On Fri, Dec 16, 2022 at 10:07 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Thu, Dec 15, 2022 at 11:31 AM Jörg Schulz <info@joergschulz.de> wrote:
I had this issue (using the dockerized version) when
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
has been set to the wrong path. Maybe it's just the same: that your web server doesn't find the location for the static files.
That seems quite unlikely because:
- The archives displayed properly before the upgrade.
- The static path is correctly set for nginx:
server { ...
location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; }
location /static/ { alias /opt/mailman/mm/static/; }
I am probably getting closer to where the problem is. By looking at nginx error_log while access the site, I see that there are just two CSS files that are missing, as shown in the error lo here: https://pastebin.ubuntu.com/p/7wbwMgqMyS/
Question is - why is it specifically looking for these two files
- /opt/mailman/mm/static/CACHE/css/output.93545e20bc30.css -/opt/mailman/mm/static/CACHE/css/output.e1f0c6022e8f.css
Where are these files supposed to come from and why are they missing? I have looked at my current CACHE directory and compared with the backup of the same site before upgrade and these files aren't the same either:
root@list:/opt/mailman-bak-20221204/mm/static/CACHE/css# cd /opt/ root@list:/opt# ls -al /opt/mailman/mm/static/CACHE/css/ total 176 drwxr-xr-x 2 mailman mailman 4096 Dec 16 03:18 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 03:18 .. -rw-r--r-- 1 mailman mailman 162923 Dec 16 03:18 output.1044280414ca.css -rw-r--r-- 1 mailman mailman 1209 Dec 16 03:18 output.29fe9f743a79.css -rw-r--r-- 1 mailman mailman 569 Dec 16 03:18 output.e68c4908b3de.css root@list:/opt# ls -al /opt/mailman-bak-20221204/mm/static/CACHE/css/ total 176 drwxr-xr-x 2 mailman mailman 4096 Feb 11 2021 . drwxr-xr-x 4 mailman mailman 4096 Feb 11 2021 .. -rw-r--r-- 1 mailman mailman 163370 Feb 11 2021 output.7687ae03f0d2.css -rw-r--r-- 1 mailman mailman 773 Feb 11 2021 output.d3034b4f9b48.css -rw-r--r-- 1 mailman mailman 1677 Feb 11 2021 output.dfd065ec006f.css
I think the two files hold the clue to solving the issue.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 12/16/22 03:36, Odhiambo Washington wrote:
I am probably getting closer to where the problem is. By looking at nginx error_log while access the site, I see that there are just two CSS files that are missing, as shown in the error lo here: https://pastebin.ubuntu.com/p/7wbwMgqMyS/
Question is - why is it specifically looking for these two files
- /opt/mailman/mm/static/CACHE/css/output.93545e20bc30.css -/opt/mailman/mm/static/CACHE/css/output.e1f0c6022e8f.css
Where are these files supposed to come from and why are they missing? I have looked at my current CACHE directory and compared with the backup of the same site before upgrade and these files aren't the same either:
They come from django admin compress
which used files created by
django admin collectstatic.
I suggest you run
django-admin collectstatic --clear --noinput --verbosity 2
django-admin compress --verbosity 2
where django-admin
is your django admin command. If this doesn't fix
the issue, perhaps the more verbose output will help find the issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Fri, Dec 16, 2022 at 11:17 PM Mark Sapiro <mark@msapiro.net> wrote:
On 12/16/22 03:36, Odhiambo Washington wrote:
I am probably getting closer to where the problem is. By looking at nginx error_log while access the site, I see that there are just two CSS files that are missing, as shown in the error lo here: https://pastebin.ubuntu.com/p/7wbwMgqMyS/
Question is - why is it specifically looking for these two files
- /opt/mailman/mm/static/CACHE/css/output.93545e20bc30.css -/opt/mailman/mm/static/CACHE/css/output.e1f0c6022e8f.css
Where are these files supposed to come from and why are they missing? I have looked at my current CACHE directory and compared with the backup
of
the same site before upgrade and these files aren't the same either:
They come from django admin
compress
which used files created by django admin collectstatic.
When I run that, I did not even get any errors.
I suggest you run
django-admin collectstatic --clear --noinput --verbosity 2
The output is here: https://pastebin.ubuntu.com/p/qkR2bDYv3G/
django-admin compress --verbosity 2
The output of the above is here: https://pastebin.ubuntu.com/p/T7jQPrs3JX/
> where `django-admin` is your django admin command. If this doesn't fix
> the issue, perhaps the more verbose output will help find the issue.
>
If the above doesn't reveal anything substantial, then let me know and I
can bump up the verbosity.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On 12/16/22 21:47, Odhiambo Washington wrote:
On Fri, Dec 16, 2022 at 11:17 PM Mark Sapiro <mark@msapiro.net> wrote:
I suggest you run
django-admin collectstatic --clear --noinput --verbosity 2
The output is here: https://pastebin.ubuntu.com/p/qkR2bDYv3G/
django-admin compress --verbosity 2
The output of the above is here: https://pastebin.ubuntu.com/p/T7jQPrs3JX/
Those look OK.
I suggest you look at ownership and permissions.
find /opt/mailman/mm/static/ -not -user mailman
find /opt/mailman/mm/static/ -not -perm -u+rw
find /opt/mailman/mm/static/ -type d -not -perm -u+x
and the same on /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/
If the above doesn't reveal anything substantial, then let me know and I can bump up the verbosity.
I don't know if --verbosity 3 will reveal anything or not. You could try.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 12/16/22 22:21, Mark Sapiro wrote:
I suggest you look at ownership and permissions.
find /opt/mailman/mm/static/ -not -user mailman find /opt/mailman/mm/static/ -not -perm -u+rw find /opt/mailman/mm/static/ -type d -not -perm -u+x
and the same on /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/
If the above doesn't reveal anything substantial, then let me know and I can bump up the verbosity.
I don't know if --verbosity 3 will reveal anything or not. You could try.
Did you see the post at <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/WSNNEGGHC7UFN2X4MZF4WORRVHQQKR7A/>? Have you tried
django-admin clear_cache
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Sat, Dec 17, 2022 at 9:33 AM Mark Sapiro <mark@msapiro.net> wrote:
On 12/16/22 22:21, Mark Sapiro wrote:
I suggest you look at ownership and permissions.
find /opt/mailman/mm/static/ -not -user mailman find /opt/mailman/mm/static/ -not -perm -u+rw find /opt/mailman/mm/static/ -type d -not -perm -u+x
and the same on /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/
If the above doesn't reveal anything substantial, then let me know and I can bump up the verbosity.
I don't know if --verbosity 3 will reveal anything or not. You could try.
Did you see the post at < https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/WSNNEGGHC7UFN2X4MZF4WORRVHQQKR7A/>?
Have you tried
django-admin clear_cache
(venv) mailman@list:~$ /opt/mailman/mm/bin/django-admin clear_cache Cache "default" has been cleared! (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/ total 16 drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 9 mailman mailman 4096 Dec 4 06:38 .. drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 css drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 js (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/css/ total 8 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 .. (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/js/ total 8 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 .. (venv) mailman@list:~$
So all the css files that were in /opt/mailman/mm/static/CACHE/css/ are
gone after running django-admin clear_cache
.
After that, I did run my mailman-post-update script again which created dirfferent files under CACHE/css/ as the date shows (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/ total 20 drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:46 . drwxr-xr-x 9 mailman mailman 4096 Dec 4 06:38 .. drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 css drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 js -rw-r--r-- 1 mailman mailman 621 Dec 16 22:46 manifest.json (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/css/ total 176 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:46 .. -rw-r--r-- 1 mailman mailman 162923 Dec 16 22:46 output.1d3a3c0dd51d.css -rw-r--r-- 1 mailman mailman 1209 Dec 16 22:46 output.9a7b11621c5a.css -rw-r--r-- 1 mailman mailman 569 Dec 16 22:46 output.e68c4908b3de.css (venv) mailman@list:~$
I then rebooted the system just to be sure everything is restarted.
And the PROBLEM IS SOLVED :-)
Thank you very much for your time spent in following this up with me to the conclusion.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On Sat, Dec 17, 2022 at 9:59 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
On Sat, Dec 17, 2022 at 9:33 AM Mark Sapiro <mark@msapiro.net> wrote:
On 12/16/22 22:21, Mark Sapiro wrote:
I suggest you look at ownership and permissions.
find /opt/mailman/mm/static/ -not -user mailman find /opt/mailman/mm/static/ -not -perm -u+rw find /opt/mailman/mm/static/ -type d -not -perm -u+x
and the same on /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/
If the above doesn't reveal anything substantial, then let me know and
can bump up the verbosity.
I don't know if --verbosity 3 will reveal anything or not. You could
I try.
Did you see the post at < https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/WSNNEGGHC7UFN2X4MZF4WORRVHQQKR7A/>?
Have you tried
django-admin clear_cache
(venv) mailman@list:~$ /opt/mailman/mm/bin/django-admin clear_cache Cache "default" has been cleared! (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/ total 16 drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 9 mailman mailman 4096 Dec 4 06:38 .. drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 css drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 js (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/css/ total 8 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 .. (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/js/ total 8 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:01 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:01 .. (venv) mailman@list:~$
So all the css files that were in /opt/mailman/mm/static/CACHE/css/ are gone after running
django-admin clear_cache
.After that, I did run my mailman-post-update script again which created dirfferent files under CACHE/css/ as the date shows (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/ total 20 drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:46 . drwxr-xr-x 9 mailman mailman 4096 Dec 4 06:38 .. drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 css drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 js -rw-r--r-- 1 mailman mailman 621 Dec 16 22:46 manifest.json (venv) mailman@list:~$ ls -al /opt/mailman/mm/static/CACHE/css/ total 176 drwxr-xr-x 2 mailman mailman 4096 Dec 16 22:46 . drwxr-xr-x 4 mailman mailman 4096 Dec 16 22:46 .. -rw-r--r-- 1 mailman mailman 162923 Dec 16 22:46 output.1d3a3c0dd51d.css -rw-r--r-- 1 mailman mailman 1209 Dec 16 22:46 output.9a7b11621c5a.css -rw-r--r-- 1 mailman mailman 569 Dec 16 22:46 output.e68c4908b3de.css (venv) mailman@list:~$
I then rebooted the system just to be sure everything is restarted.
And the PROBLEM IS SOLVED :-)
Thank you very much for your time spent in following this up with me to the conclusion.
So just for the record, I have added the clear_cache option to the script. Maybe this will benefit someone else one day.
<CUT> #!/bin/bash
set -e
BINDIR="/opt/mailman/mm/bin" CONFDIR="/opt/mailman/mm" SETTINGS="settings" DJANGO_CONTROL_SCRIPT="$BINDIR/django-admin" STATIC_DIR="$CONFDIR/static" DEBUG="False"
set -x
if [ "$DEBUG" == "False" ]; then mkdir -p "$STATIC_DIR" || : "$DJANGO_CONTROL_SCRIPT" clear_cache "$DJANGO_CONTROL_SCRIPT" collectstatic --clear --noinput --verbosity 0 "$DJANGO_CONTROL_SCRIPT" compress "$DJANGO_CONTROL_SCRIPT" compilemessages fi
syncdb_cmd="$DJANGO_CONTROL_SCRIPT migrate" if [[ ! -t 1 ]]; then # stdout is not a terminal syncdb_cmd="$syncdb_cmd --noinput" fi $syncdb_cmd echo 'Do you want to rebuild the search index? This takes a long time.' echo 'Type "Yes" to continue; anything else to quit.' read -p "> " response if [ "x$response" != "xYes" ] ; then exit; fi "$DJANGO_CONTROL_SCRIPT" update_index </CUT>
The important thing here is that after an update, it helps to run the following 4 options with your "django-admin" script (whatever it is named)
- clear_cache, collectstatic, compress, compilemessages.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
On Sat, Dec 17, 2022 at 9:22 AM Mark Sapiro <mark@msapiro.net> wrote:
On 12/16/22 21:47, Odhiambo Washington wrote:
On Fri, Dec 16, 2022 at 11:17 PM Mark Sapiro <mark@msapiro.net> wrote:
I suggest you run
django-admin collectstatic --clear --noinput --verbosity 2
The output is here: https://pastebin.ubuntu.com/p/qkR2bDYv3G/
django-admin compress --verbosity 2
The output of the above is here: https://pastebin.ubuntu.com/p/T7jQPrs3JX/
Those look OK.
I suggest you look at ownership and permissions.
I doubt it's about ownership and permissions given the fact that I have even done "chown -R mailman.mailman /opt/mailman" just for the kicks.
find /opt/mailman/mm/static/ -not -user mailman find /opt/mailman/mm/static/ -not -perm -u+rw find /opt/mailman/mm/static/ -type d -not -perm -u+x
and the same on /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/
root@list:/home/wash# find /opt/mailman/mm/static/ -not -user mailman root@list:/home/wash# find /opt/mailman/mm/static/ -not -perm -u+rw root@list:/home/wash# find /opt/mailman/mm/static/ -type d -not -perm -u+x root@list:/home/wash# find /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/ -not -user mailman root@list:/home/wash# find /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/ -not -perm -u+rw root@list:/home/wash# find /opt/mailman/mm/venv/lib/python3.9/site-packages/hyperkitty/ -type d -not -perm -u+x root@list:/home/wash#
Yielded nothing - perms and ownership are all okay.
If the above doesn't reveal anything substantial, then let me know and I
can bump up the verbosity.
I don't know if --verbosity 3 will reveal anything or not. You could try.
I did check, but the output looks the same as when it's set to 2.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
participants (6)
-
Danil Smirnov
-
Guillermo Hernandez (Oldno7)
-
Jörg Schulz
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull