From myroughbox@yahoo.com Tue Sep 1 17:28:30 2020 From: Jane Anara To: mailman-users@mailman3.org Subject: [MM3-users] Please help: Mailaman3 - Date: Tue, 01 Sep 2020 16:55:07 +0000 Message-ID: <159897930771.18624.2252054531841494359@mailman.iad1.psf.io> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3611707524771810296==" --===============3611707524771810296== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello everyone, I hope my questions don't sound ridiculous. In my team, I have been tasked wi= th moving our mailman installations from version 1:2.1 to the current version= , mailman3. I followed the documentations online and installed all the compon= ents, created a Django project and configured settings.py and url.py. However= , when I run the development server, I receive the following on the body of P= ostorius main page: Page not found This page either doesn't exist, or it moved somewhere else. Clicking on the "Lists" menu link, I receive the following: HTTP Error 404: exa= mple.com =

Page not found

This page either doesn't exist, or it moved somewhere else.
=20 > src=3D"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.m= in.js" integrity=3D"sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenIS= fwAzpKaMNFNmj4" crossorigin=3D"anonymous"> src=3D"/static/postorius/js/script.js"> >=20 >=20 > So far, the Postorious component is where there seem to be issues, all=20 > other link or component produce no errors thus far. Please advice on=20 > how I can troubleshoot this. I herein include the relevant sessions of=20 > my settings.py file and url.py which I have tweaked with various=20 > configurations to no avail. >=20 > settings.py: >=20 > # Application definition >=20 > INSTALLED_APPS =3D [ > # Apps added for mailman components=20 > 'hyperkitty', > 'postorius', > 'django_mailman3', > 'mailmanclient', > # Other useful apps > 'rest_framework', > 'django_gravatar', > 'compressor', > 'haystack', > 'django_extensions', > 'django_q', > 'allauth', > 'allauth.account', > 'allauth.socialaccount', > # end other useful apps > 'django.contrib.sites', > 'django.contrib.admin', > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.messages', > 'django.contrib.staticfiles', > ] >=20 > url.py: >=20 > urlpatterns =3D [ > #Django admin > path('admin/', admin.site.urls), > path('mailman3/', include('postorius.urls')), > path('archives/', include('hyperkitty.urls')), > path('', include('django_mailman3.urls')), > path('accounts/', include('allauth.urls')), > #path('postorius', include('postorius.urls')), > #path('lists/', list_index), > path('search/', include('haystack.urls')), > #url(r'^$', list_index), > ] >=20 > Note that when I uncomment the lines relating to list_index or use=20 > configurations similar to that on mailman-suit, I get: >=20 > NameError: name 'list_index' is not defined. You need to use the view function with `reverse_lazy` to actually get the=20 named `reverse_lazy` view. Did you try using the exact urls.py from mailman-suite project[1]? It has been tested to work locally and other place. [1]: https://gitlab.com/mailman/mailman-suite/-/blob/master/mailman-suite_pro= ject/urls.py >=20 > Looking forward to any help anyone can render. >=20 > Thank you! >=20 > Regards, > Jane. > _______________________________________________ > Mailman-users mailing list -- mailman-users(a)mailman3.org > To unsubscribe send an email to mailman-users-leave(a)mailman3.org > https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ > --=20 thanks, Abhilash Raj (maxking) --===============9173993979988646257==-- From myroughbox@yahoo.com Thu Sep 3 16:51:43 2020 From: Jane Anara To: mailman-users@mailman3.org Subject: [MM3-users] Re: Please help: Mailaman3 - Date: Wed, 02 Sep 2020 17:28:37 +0000 Message-ID: <159906771705.18626.6008341078244851460@mailman.iad1.psf.io> In-Reply-To: <5ce2965f-d034-4eca-9f12-e2e652746105@beta.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7750828863456579589==" --===============7750828863456579589== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Abhilash, Thank you for your reply. I did use the mailman-suit url.py before and got similar errors. At your sugg= estion, I again included the following in the import session: from django.urls import reverse_lazy from django.views.generic import RedirectView and the following line in the urlpatterns: url(r'^$', RedirectView.as_view(url=3Dreverse_lazy ('list_index'), per= manent=3DTrue)), The 'list_index' undefined error does not come up, however the HTTP Error 404= I posted in my last message still shows up. I abstracted the following from = the error log as a potential cause: Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.6/site-packages/django/core/handlers/ba= se.py", line 113, in _get_response response =3D wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib/python3.6/site-packages/postorius/views/list.py= ", line 779, in list_index paginator_class=3DMailmanPaginator) File "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/pag= inator.py", line 71, in paginate objects =3D paginator.page(page_num) File "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/pag= inator.py", line 46, in page number =3D self.validate_number(number) File "/opt/mailman/venv/lib/python3.6/site-packages/django/core/paginator.p= y", line 48, in validate_number if number > self.num_pages: File "/opt/mailman/venv/lib/python3.6/site-packages/django/utils/functional= .py", line 48, in __get__ res =3D instance.__dict__[self.name] =3D self.func(instance) File "/opt/mailman/venv/lib/python3.6/site-packages/django/core/paginator.p= y", line 97, in num_pages if self.count =3D=3D 0 and not self.allow_empty_first_page: File "/opt/mailman/venv/lib/python3.6/site-packages/django/utils/functional= .py", line 48, in __get__ res =3D instance.__dict__[self.name] =3D self.func(instance) File "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/pag= inator.py", line 56, in count return self.function(count=3D0, page=3D1).total_size File "/opt/mailman/venv/lib/python3.6/site-packages/postorius/views/list.py= ", line 775, in _get_list_page advertised=3Dadvertised, mail_host=3Dmail_host, count=3Dcount, page=3Dpag= e) File "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/client.py= ", line 181, in get_list_page return Page(self._connection, url, MailingList, count, page) File "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/= page.py", line 37, in __init__ self._create_page() File "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/= page.py", line 62, in _create_page response, content =3D self._connection.call(self._build_url()) File "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/= connection.py", line 112, in call error_msg, response, None) urllib.error.HTTPError: HTTP Error 404:=20 I would appreciate any insight. Thank you. Regards, Jane --===============7750828863456579589==-- From maxking@asynchronous.in Thu Sep 3 16:55:00 2020 From: Abhilash Raj To: mailman-users@mailman3.org Subject: [MM3-users] Re: Please help: Mailaman3 - Date: Thu, 03 Sep 2020 09:54:33 -0700 Message-ID: In-Reply-To: <159906771705.18626.6008341078244851460@mailman.iad1.psf.io> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8469784069961365390==" --===============8469784069961365390== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 2, 2020, at 10:28 AM, Jane Anara via Mailman-users wrote: > Hello Abhilash, >=20 > Thank you for your reply. >=20 > I did use the mailman-suit url.py before and got similar errors. At=20 > your suggestion, I again included the following in the import session: >=20 > from django.urls import reverse_lazy > from django.views.generic import RedirectView >=20 > and the following line in the urlpatterns: >=20 > url(r'^$', RedirectView.as_view(url=3Dreverse_lazy ('list_index'),=20 > permanent=3DTrue)), >=20 >=20 > The 'list_index' undefined error does not come up, however the HTTP=20 > Error 404 I posted in my last message still shows up. I abstracted the=20 > following from the error log as a potential cause: >=20 > Traceback (most recent call last): > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django/core/handlers/base.py= ", line 113, in _get_response > response =3D wrapped_callback(request, *callback_args,=20 > **callback_kwargs) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/postorius/views/list.py", li= ne 779, in list_index > paginator_class=3DMailmanPaginator) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/paginato= r.py", line 71, in paginate > objects =3D paginator.page(page_num) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/paginato= r.py", line 46, in page > number =3D self.validate_number(number) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django/core/paginator.py", l= ine 48, in validate_number > if number > self.num_pages: > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django/utils/functional.py",= line 48, in __get__ > res =3D instance.__dict__[self.name] =3D self.func(instance) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django/core/paginator.py", l= ine 97, in num_pages > if self.count =3D=3D 0 and not self.allow_empty_first_page: > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django/utils/functional.py",= line 48, in __get__ > res =3D instance.__dict__[self.name] =3D self.func(instance) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/django_mailman3/lib/paginato= r.py", line 56, in count > return self.function(count=3D0, page=3D1).total_size > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/postorius/views/list.py", li= ne 775, in _get_list_page > advertised=3Dadvertised, mail_host=3Dmail_host, count=3Dcount, page=3Dp= age) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/client.py", li= ne 181, in get_list_page > return Page(self._connection, url, MailingList, count, page) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/page.= py", line 37, in __init__ > self._create_page() > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/page.= py", line 62, in _create_page > response, content =3D self._connection.call(self._build_url()) > File=20 > "/opt/mailman/venv/lib/python3.6/site-packages/mailmanclient/restbase/conne= ction.py", line 112, in call > error_msg, response, None) > urllib.error.HTTPError: HTTP Error 404:=20 >=20 >=20 > I would appreciate any insight. This is trying to reach Mailman core and getting a 404 response from Mailman = Core. Do you have Core running? Which version of Core are you running? >=20 > Thank you. >=20 > Regards, > Jane > _______________________________________________ > Mailman-users mailing list -- mailman-users(a)mailman3.org > To unsubscribe send an email to mailman-users-leave(a)mailman3.org > https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ > --=20 thanks, Abhilash Raj (maxking) --===============8469784069961365390==-- From myroughbox@yahoo.com Fri Sep 4 15:35:01 2020 From: Jane Anara To: mailman-users@mailman3.org Subject: [MM3-users] Re: Please help: Mailaman3 - Date: Fri, 04 Sep 2020 15:34:58 +0000 Message-ID: <159923369852.18626.10404591105871455547@mailman.iad1.psf.io> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5739498667361060726==" --===============5739498667361060726== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you Abhilash for your reply. I installed Mailman Core version 3.3.1. After your message, I ran `mailman start` and then ran the development server= . It complained of the port already in used and exited. That is what I got i= n the past as well. This time, I changed the CORE REST API port on django set= tings.py from port 8000 to 8001 and ran the development server (which I often= ran on 8001) on port 8006. The error has gone away. Thank you for your help. Regards, Jane --===============5739498667361060726==-- From maxking@asynchronous.in Sun Sep 6 22:58:40 2020 From: Abhilash Raj To: mailman-users@mailman3.org Subject: [MM3-users] Re: Please help: Mailaman3 - Date: Sun, 06 Sep 2020 15:58:14 -0700 Message-ID: <991b91ee-d6e1-4869-8b4b-fc324c82c822@www.fastmail.com> In-Reply-To: <159923369852.18626.10404591105871455547@mailman.iad1.psf.io> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2123243217017011264==" --===============2123243217017011264== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, Sep 4, 2020, at 8:34 AM, Jane Anara via Mailman-users wrote: > Thank you Abhilash for your reply. I installed Mailman Core version 3.3.1. > > After your message, I ran `mailman start` and then ran the development > server. It complained of the port already in used and exited. That is > what I got in the past as well. This time, I changed the CORE REST API > port on django settings.py from port 8000 to 8001 and ran the > development server (which I often ran on 8001) on port 8006. The error > has gone away. By default, Core's REST API runs on Port 8001 and Django uses 8000. If you were using 8000 for the Core's Port in settings.py, that would mean Postorius was trying to talk to itself and hence the 404 errors with the URLs. > > Thank you for your help. > > Regards, > Jane > _______________________________________________ > Mailman-users mailing list -- mailman-users(a)mailman3.org > To unsubscribe send an email to mailman-users-leave(a)mailman3.org > https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ > -- thanks, Abhilash Raj (maxking) --===============2123243217017011264==--