mailman3-web is broken after deleting site "example.com"
Because I'm having trouble with setting up mailman2, I'm currently testing mailman3. After configuring the real domain names and deleting the site "example.com", nothing is working in the web frontend any more. Whatever I try to access I just get the same server error:
"An error occurred while processing your request."
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3/dist-packages/hyperkitty/views/index.py", line 99, in index return render(request, "hyperkitty/index.html", context) File "/usr/lib/python3/dist-packages/django/shortcuts.py", line 36, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/lib/python3/dist-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/usr/lib/python3/dist-packages/django/template/base.py", line 169, in render with context.bind_template(self): File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/lib/python3/dist-packages/django/template/context.py", line 246, in bind_template updates.update(processor(self.request)) File "/usr/lib/python3/dist-packages/django_mailman3/context_processors.py", line 32, in common context["site_name"] = get_current_site(request).name File "/usr/lib/python3/dist-packages/django/contrib/sites/shortcuts.py", line 13, in get_current_site return Site.objects.get_current(request) File "/usr/lib/python3/dist-packages/django/contrib/sites/models.py", line 58, in get_current return self._get_site_by_id(site_id) File "/usr/lib/python3/dist-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id site = self.get(pk=site_id) File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 406, in get raise self.model.DoesNotExist( django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
I haven't done much configuration yet. It wouldn't be a problem to start new and lose all configuration data. What is the easiest way to reset configuration data? I am considering using mysql db for mailman-web configuration. Would changing to a new database reset everything?
Kind regards, Nils
In the documentation there's no mention of deleting the example.com 😂 Maybe it's possible but I personally don't care. What I do is to go to Django admin webUI and create a new site, and a new mail domain. In postorius I can then add a domain that has a Mail Host and a Web Host. The later gives me a SITE_ID which I then pin into settings.py, restart services and then I can proceed to create lists. I learnt this the hard way. I don't know if it's documented at all. But that's just how MM3 works for me! BTW, MM2 still works as long as you can have Python2.7. But MM3 is better. Start over again and don't delete example.com!
On Wed, Nov 8, 2023, 21:23 Nils <mailman@bugblatterbeast.de> wrote:
Because I'm having trouble with setting up mailman2, I'm currently testing mailman3. After configuring the real domain names and deleting the site "example.com", nothing is working in the web frontend any more. Whatever I try to access I just get the same server error:
"An error occurred while processing your request."
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3/dist-packages/hyperkitty/views/index.py", line 99, in index return render(request, "hyperkitty/index.html", context) File "/usr/lib/python3/dist-packages/django/shortcuts.py", line 36, in render content = loader.render_to_string(template_name, context, request, using=using) File "/usr/lib/python3/dist-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/usr/lib/python3/dist-packages/django/template/base.py", line 169, in render with context.bind_template(self): File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/lib/python3/dist-packages/django/template/context.py", line 246, in bind_template updates.update(processor(self.request)) File "/usr/lib/python3/dist-packages/django_mailman3/context_processors.py", line 32, in common context["site_name"] = get_current_site(request).name File "/usr/lib/python3/dist-packages/django/contrib/sites/shortcuts.py", line 13, in get_current_site return Site.objects.get_current(request) File "/usr/lib/python3/dist-packages/django/contrib/sites/models.py", line 58, in get_current return self._get_site_by_id(site_id) File "/usr/lib/python3/dist-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id site = self.get(pk=site_id) File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 406, in get raise self.model.DoesNotExist( django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
I haven't done much configuration yet. It wouldn't be a problem to start new and lose all configuration data. What is the easiest way to reset configuration data? I am considering using mysql db for mailman-web configuration. Would changing to a new database reset everything?
Kind regards, Nils
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-leave@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ Member address: odhiambo@gmail.com
Please consider adding a comment to the mailman3-web documentation. While mailman3 seems to automatically initializes an empty database at startup, mailman3-web wouldn't. I needed to run the following command after clearing database or even after switching from sqlite to mariadb:
# sudo -u www-data python3 /usr/bin/django-admin migrate --no-input --pythonpath /usr/share/mailman3-web --settings settings
Or is this a debian/ubuntu issue?
On 11/8/23 21:35, Odhiambo Washington wrote:
Start over again and don't delete example.com!
On Thu, Nov 9, 2023 at 4:02 PM Nils <mailman@bugblatterbeast.de> wrote:
Please consider adding a comment to the mailman3-web documentation. While mailman3 seems to automatically initializes an empty database at startup, mailman3-web wouldn't. I needed to run the following command after clearing database or even after switching from sqlite to mariadb:
# sudo -u www-data python3 /usr/bin/django-admin migrate --no-input --pythonpath /usr/share/mailman3-web --settings settings
The official documentation gives the commands that need to be run during installation. (venv)mailman-web migrate
Or is this a debian/ubuntu issue?
Unfortunately, here we find it hard to support installations that are not using the virtualenv method. So we leave the support to the Package managers.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 11/9/23 14:29, Odhiambo Washington wrote:
The official documentation gives the commands that need to be run during installation. (venv)mailman-web migrate Oh, I've read that but assumed it was outdated because I don't seem to have that command. My bad.
# mailman-web --help mailman-web: command not found
Unfortunately, here we find it hard to support installations that are not using the virtualenv method. So we leave the support to the Package managers. I understand.
On Thu, Nov 9, 2023 at 5:03 PM Nils <mailman@bugblatterbeast.de> wrote:
On 11/9/23 14:29, Odhiambo Washington wrote:
The official documentation gives the commands that need to be run during installation. (venv)mailman-web migrate Oh, I've read that but assumed it was outdated because I don't seem to have that command. My bad.
# mailman-web --help mailman-web: command not found
Unfortunately, here we find it hard to support installations that are not using the virtualenv method. So we leave the support to the Package managers. I understand.
Installation documentation for Mailman 3: https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-insta... <- Please use only this method. Mailing list for Mailman 3: mailman-users@mailman3.org
See you there :)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 11/8/23 10:21, Nils wrote:
...> Â File "/usr/lib/python3/dist-packages/django/db/models/query.py", line
406, in get raise self.model.DoesNotExist( django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
See https://docs.mailman3.org/en/latest/faq.html#the-domain-name-displayed-in-hy...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Mark Sapiro
-
Nils
-
Odhiambo Washington