Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#982935: [Pkg-mailman-hackers] Postorius & Hyperkitty -- broken Javascript (Bootstrap)?

42 views
Skip to first unread message

Jonas Meurer

unread,
Feb 16, 2021, 2:00:04 PM2/16/21
to
Package: postorius
Version: 1.3.4-1

Hey Matt,

thanks for reporting the issue. I'll transform this into a proper Debian
bugreport so that it doesn't get lost.

Am 10.02.21 um 18:57 schrieb Matthew Blissett:
> I've installed mailman3-full from the current packages in bullseye.
>
> The dropdown controls on the UI for Postorius (e.g. "Subscription
> requests", "Mass operations" and the username button to log out etc) and
> the similar controls on Hyperkitty (e.g. "Threads by month") do not
> work.  You can see the latter at
> http://newlistszm.gbif.org/mailman3/hyperkitty/list/te...@newlistszm.gbif.org/
>
>
> I found https://lists.gem5.org/archives/list/gem5-a...@gem5.org/
> which is running the same version, but presumably not using Debian
> packages as the Javascript is slightly different.

Yeah, we replace some Javascript libraries from the Mailman3 Postorius
package that are already packaged in Debian to avoid code duplication.

> Could this be a problem with the Debian packaging, or perhaps my
> configuration -- which is very close to the defaults (i.e. Mailman and
> Apache configuration generated by dpkg-reconfigure).

Mh, might well be a problem with the JS library replacement I mentioned
above. Would you mind doing the following on your Mailman3 system to see
whether it fixes the bug:

* Fetch `jquery-1.11.3.min.js` from [1] and replace the symlink
`/usr/share/python3-django-postorius/static/postorius/libs/jquery/jquery-1.11.3.min.js`
with it.
* Fetch `bootstrap.min.js` from [2] and replace the symlink
`/usr/share/python3-django-postorius/static/postorius/libs/bootstrap/js/bootstrap.min.js`
with it.
* Fetch `html5shiv.js` and `html5shiv.min.js` from [3] and [4] and
replace the symlinks at
`/usr/share/python3-django-postorius/static/postorius/libs/html5shiv/`
with them.

[1]
https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/jquery/jquery-1.11.3.min.js
[2]
https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/bootstrap/js/bootstrap.min.js
[3]
https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/html5shiv/html5shiv.js
[4]
https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/html5shiv/html5shiv.min.js

Afterwards, you might (or might not) have to recreate the django cache
(not sure), which can easily be done by reconfiguring `mailman3-web`:

$ sudo dpkg-reconfigure mailman3-web

That would be super helpful in order to find out whether our Debian
versions of the JS libraries are the reason for your issue.

Thanks a lot for helping to debug the problem :)

Kind regards
jonas

OpenPGP_signature

Wolfgang Walkowiak

unread,
Feb 26, 2021, 7:30:03 AM2/26/21
to

Packages: python3-django-postorius, python3-django-hyperkitty
Version: 1.3.4-1

Dear Debian maintainers for the packages postorius and hyperkitty,
dear Jonas, dear Matt,

we experienced similar issues with non-functional drop down menus
in mailman3-web after installing mailman3-full (version 3.3.3.1)
which includes the two packages mentioned above.

The hints in Jonas' response have been very useful. Thank you!
However, this only fixed the issue for postorius, but not for hyperkitty.
As soon as we klicked on the archive link, the drop-down menus didn't
function any longer.

After we have replaced a couple more bootstrap related symlinks in
python3-django-hyperkitty with the js-files from the master branch
on gitlab and recollected and recompressed all static items, and
restarted mailman3-web it worked. See our full recipe for obtaining
a mailman3-web interface with working drop-down menus below.

We would appreciate if the replacement of the bootstrap-related
javascript files in the postorius and hyperkitty packages by symlinks
to generic instances on the system could be reconsidered for the
next revision of these two Debian packages.

Thank you very much for maintaining these Debian packages,

w.w.


----------
Details on our recipe (work-around) to fix the drop-down menus:
(For other users hitting the same issue.)

Replace the the symbolic links in python3-django-postorius from
upstream master following suggestion on bug report 982935 above:

# cd /usr/share/python3-django-postorius/static/postorius/libs/bootstrap/js
# mv bootstrap.min.js bootstrap.min.js.org
# wget https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/bootstrap/js/bootstrap.min.js
# cd /usr/share/python3-django-postorius/static/postorius/libs/jquery
# mv jquery-1.11.3.min.js jquery-1.11.3.min.js.org
# wget https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/jquery/jquery-1.11.3.min.js
# cd /usr/share/python3-django-postorius/static/postorius/libs/html5shiv
# mv html5shiv.js html5shiv.js.org
# mv html5shiv.min.js html5shiv.min.js.org
# wget https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/html5shiv/html5shiv.js
# wget https://gitlab.com/mailman/postorius/-/raw/master/src/postorius/static/postorius/libs/html5shiv/html5shiv.min.js

Replace the bootstrap.js and bootstrap.min.js links from the upstream master:

# cd /usr/share/python3-django-hyperkitty/static/hyperkitty/libs/bootstrap/javascripts
# mv bootstrap.js bootstrap.js.org
# mv bootstrap.min.js bootstrap.min.js.org
# wget https://gitlab.com/mailman/hyperkitty/-/raw/master/hyperkitty/static/hyperkitty/libs/bootstrap/javascripts/bootstrap.min.js
# wget https://gitlab.com/mailman/hyperkitty/-/raw/master/hyperkitty/static/hyperkitty/libs/bootstrap/javascripts/bootstrap.js

Afterwards, using the wrapper script defined below, run:

# mailman-web collectstatic --no-input -v 1 --clear
# mailman-web compress -v 1
# systemctl restart mailman3-web

Wrapper script /usr/local/sbin/mailman-web :
#!/bin/sh
su -s /bin/sh -c "/usr/share/mailman3-web/manage.py $*" www-data

(Would be useful if a script like this were included in the mailman3-web
packages as the mailman3 documentation often refers to it instead of to
the lenghty /usr/share/mailman3-web/manage.py etc.)

==========================================================2021-02-26==13:02==

Dr. Wolfgang Walkowiak Phone: +49-271-740-3889
Fakultaet IV / Physik Fax : +49-271-740-3886
Emmy Noether Campus
Universitaet Siegen --> Wolfgang....@hep.physik.uni-siegen.de
Walter-Flex-Str. 3
57068 Siegen
Germany

=============================================================================

Pierre-Elliott Bécue

unread,
Mar 3, 2021, 3:40:04 PM3/3/21
to
Hi,

There is a plan to keep using Debian's versions of the JS libs here.
Bundled libs are a hell to sort out.

Regarding the bug, it's due to the fact that now, hyperkitty and
postorius are depending on bootstrap4 while we relink to bootstrap 3.

I've made a patch that I'll upload soon for both packages.

Sorry for the inconvenience.

--
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528 F493 0D44 2664 1949 74E2
It's far easier to fight for one's principles than to live up to them.
signature.asc

jonas

unread,
Mar 3, 2021, 4:10:04 PM3/3/21
to
Hey PEB,

Plesse don't upload yet. I've a few other fixes pending and would like to do some further testing before hands but won't make it before start of next week. Or I'll do another upload shortly after.

Cheers
jonas

Pierre-Elliott Bécue

unread,
Mar 3, 2021, 5:40:03 PM3/3/21
to
Le mercredi 03 mars 2021 à 22:06:20+0100, jonas a écrit :
> Hey PEB,
>
> Plesse don't upload yet. I've a few other fixes pending and would like to do some further testing before hands but won't make it before start of next week. Or I'll do another upload shortly after.

If you are not sure to be able to upload in the next ten days, then
probably the three uploads I prepared are worth it.

Tell me what you prefer. :)

Cheers! :)

Robert Chéramy

unread,
Mar 30, 2021, 5:10:03 PM3/30/21
to
Hello,

I'm sorry to inform you that I still have this bug. The Drop-Down-Menus
are still not working in postorius.

I reloaded the server, cleared my browser cache, tried another browser,
nothing helped.

I'm using debian testing (up to date), here are the package versions on
the system. libjs-bootstrap (version 3) is needed by
python3-djangorestframework, I can't deinstall it.

# dpkg -l | grep mailman
ii  mailman3                       3.3.3-1 all          Mailing list
management system
ii  mailman3-web                   0+20200530-2 all          Django
project integrating Mailman3 Postorius and HyperKitty
ii  python3-django-mailman3        1.3.5-2 all          Django library
to help interaction with Mailman3 (Python 3 version)
ii  python3-mailmanclient          3.3.2-1 all          Python bindings
for Mailman3 REST API (Python 3 version)

# dpkg -l | grep postorius
ii  python3-django-postorius       1.3.4-2 all          Web user
interface to access GNU Mailman3

# dpkg -l | grep bootstrap
ii  libjs-bootstrap                3.4.1+dfsg-2 all          HTML, CSS
and JS framework
ii  libjs-bootstrap4               4.5.2+dfsg1-6 all          HTML, CSS
and JS framework

Cheers & thanks for maintaining mailman3,

Robert

Robert Chéramy

unread,
Mar 30, 2021, 5:50:04 PM3/30/21
to
Update:

My nginx-configuration had a link to /var/lib/mailman3/web/static.
Changing it to /usr/share/python3-django-postorius/static/ solved the
problem:

    location /mailman3/static {
#        alias /var/lib/mailman3/web/static;
        alias /usr/share/python3-django-postorius/static/;
    }

The /var/lib/mailman3/web/static has an old bootstrap.min.js stored
under /var/lib/mailman3/web/static/postorius/libs/bootstrap/js. This
file seems to belong to nobody:

# dpkg -S /var/lib/mailman3/web/static/postorius/
dpkg-query: no path found matching pattern
/var/lib/mailman3/web/static/postorius/

# dpkg -S /var/lib/mailman3/web/static
mailman3-web: /var/lib/mailman3/web/static

# dpkg -S /usr/share/python3-django-postorius
python3-django-postorius: /usr/share/python3-django-postorius


I suspect the file was installed at the time I ran Debian stable, as
first installed mailman3 under stable and migrated to testing after it.


I installed mailman3-web on a fresh Debian testing, but the alias in
nginx.conf ist still /var/lib/mailman3/web/static. In the fresh install,
the bootstrap.min.js under
/var/lib/mailman3/web/static/postorius/libs/bootstrap/js is now bootstrap 4.


I don't understand why there are two installations in parallel,
shouldn't everything be installed within the Package
python3-django-postorius?

Cheers,

Robert
0 new messages