On Sat, 2023-09-23 at 20:28 -0700, Mark Sapiro wrote:
What if you do something like the following where django-admin is whatever command you use for the Django admin command.
$ django-admin shell Python 3.9.16 (main, Dec 11 2022, 12:49:23) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from hyperkitty.models.mailinglist import MailingList >>> mlist_name = 'listname@domain.com' >>> mlist = MailingList.objects.get(name=mlist_name) >>> mlist <MailingList listname@domain.com (listname.domain.com)> >>>
Hi Mark,
I'm still on this problem of one list's archive-search not returning any results. I created a new list today and it also has the same problem.
In short, the older lists all seem fine -- their search results are up- to-date so that tells me the cron is okay. It's just these 2 newer lists that have the problem.
It's taken me while to get my head around the Django admin command you have suggested, as I kept getting an error when starting:
#django-admin shell
from hyperkitty.models.mailinglist import MailingList ... django.core.exceptions.ImproperlyConfigured ...
That sent me down a rabbit hole which I haven't emerged from yet.
But instead, starting with # python3 manage.py shell ...
# python3 manage.py shell Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)
from hyperkitty.models.mailinglist import MailingList mlist_name = 'thepost@example.com' mlist = MailingList.objects.get(name=mlist_name) mlist <MailingList: <MailingList thepost@example.com>>
The format of my final line is different to yours ...
Mine: <MailingList: <MailingList thepost@example.com>>
Yours: <MailingList listname@domain.com (listname.domain.com)>
Does this (missing list_id) give any clue as to why the archive-search isn't working, or is just that starting with "# python3 manage.py shell" is the wrong thing to do?
By the way, the list_id shows correctly in the SQL query result.
select * from hyperkitty_mailinglist where name like 'thepost@example.com';
...
name | thepost@example.com
|
list_id | thepost.example.com
...
Any ideas appreciated. Mark