[MM3-users]Moderation Emails & Page
Hey All-
Having a bit of a problem, hoping maybe someone can provide some insight. I’m running the current MM3 from the bundler on RHEL7, and most things seem to be working properly. However, when i go to the moderation queue from the web interface, i’m presented with a 500 error instead of a page listing the messages being held. The error in the log (and on the page if i enabled debug) is:
ERROR 2016-04-20 14:58:05,959 base 3256 140375419246336 Internal Server Error: /mailman3/lists/listname/held_messages Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/site-packages/postorius/auth/decorators.py", line 77, in wrapper return fn(*args, **kwargs) File "/usr/lib/python2.7/site-packages/postorius/views/list.py", line 413, in list_moderation paginator_class=utils.MailmanPaginator) File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 89, in paginate results = paginator.page(1) File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 62, in page number = self.validate_number(number) File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 39, in validate_number if number > self.num_pages: File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 86, in _get_num_pages if self.count == 0 and not self.allow_empty_first_page: File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 75, in _get_count result = self.function(count=1, page=1) File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 681, in get_held_page return Page(self._connection, url, HeldMessage, count, page) File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 333, in __init__ self._create_page() File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 363, in _create_page self._connection, entry['self_link'], entry) KeyError: u’self_link'
Anyone have any insight on what be causing the error? Thus far it only seems to be this page that is causing the issue, and only when messages are actually being held in the moderation queue. Semi-related, is there anyway to include the link to the moderation page from the moderation emails, similar to MM2?
Thanks.
I’m running the current MM3 from the bundler on RHEL7, and most things seem to be working properly. ERROR 2016-04-20 14:58:05,959 base 3256 140375419246336 Internal Server Error: /mailman3/lists/listname/held_messages Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/site-packages/postorius/auth/decorators.py", line 77, in wrapper return fn(*args, **kwargs) File "/usr/lib/python2.7/site-packages/postorius/views/list.py", line 413, in list_moderation paginator_class=utils.MailmanPaginator) File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 89, in paginate results = paginator.page(1) File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 62, in page number = self.validate_number(number) File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 39, in validate_number if number > self.num_pages: File "/usr/lib/python2.7/site-packages/django/core/paginator.py", line 86, in _get_num_pages if self.count == 0 and not self.allow_empty_first_page: File "/usr/lib/python2.7/site-packages/postorius/utils.py", line 75, in _get_count result = self.function(count=1, page=1) File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 681, in get_held_page return Page(self._connection, url, HeldMessage, count, page) File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 333, in __init__ self._create_page() File "/usr/lib/python2.7/site-packages/mailmanclient/_client.py", line 363, in _create_page self._connection, entry['self_link'], entry) KeyError: u’self_link' This one seems to be a new one. To my knowledge held messages should not work because of this issue: https://gitlab.com/mailman/mailmanclient/issues/10
Your issue seems to be with postorius' paginator. Could you open an issue in postorius? https://gitlab.com/mailman/postorius/issues
Please include this trace, and some additional info.
- What version of django are you using?
- What version of postorius are you using?
- What version of mailmanclient are you using?
To actually confirm the issue is with postorius and not mailmanclient, you could try to access the held messages through mailmanclient directly
The easiest way to do this, is start a django shell. You need to activate the python2 virtualenv for this Replace manage.py with whatever command you use to start the webserver
python manage.py shell from postorius.utils import get_client lists = get_client().lists lists[0].held # pick a list that has held messages lists[0].get_held_page() # and you could try getting one specific message lists[0].get_held_message(<held id>)
if you can do all this, then the issue is probably in postorius
participants (2)
-
Douglas R Taber
-
Simon Hanna