problems linking to successive chunks of addresses in admin user search

Hello,
I have a list with nearly 45,000 subscribers. When a list owner searches for a subscriber through the admin interface, she gets a list of addresses, then a link to follow to get the next 'chunk'. The link leads to something like the following if I were searching for 'stephanie'.
http://mydomain.com/mailman/admin/mylist/u'http:// mydomain.com/mailman/admin/mylist/members?letter=s&chunk= 1&findmember=stephanie
So, the first chunk is '0' and then the link goes to chunk '1', but it links back to the top-level admin page.
If you click the chunks of addresses by the alphabetical letters, it will successfully take you to each section.
Is this a Feature or a Bug ?
-- Christopher Adams adamsca@gmail.com

On 09/27/2016 04:31 PM, Christopher Adams wrote:
So, the first chunk is '0' and then the link goes to chunk '1', but it links back to the top-level admin page.
...
Is this a Feature or a Bug ?
It is this bug <https://bugs.launchpad.net/mailman/+bug/1604544> which was fixed by the attached patch.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you for the reply and the attached patch.
Do I need to patch Mailman and then follow the process as I would for installing/upgrading Mailman ?
When I patch, should I be in the Mailman build/source directory and not in the current Mailman directory ?
Would 'patch < admin.patch' work ?
Many thanks.
On Tue, Sep 27, 2016 at 5:31 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/28/2016 11:04 AM, Christopher Adams wrote:
Do I need to patch Mailman and then follow the process as I would for installing/upgrading Mailman ?
You could, but it isn't necessary.
When I patch, should I be in the Mailman build/source directory and not in the current Mailman directory ?
The easiest thing is to just patch the active Mailman, not the build/source.
Would 'patch < admin.patch' work ?
It will if you are in the $prefix directory.
Since this patch only affects the admin CGI which is not a persistent process, it is only necessary to apply the patch to $prefix/Mailman/Cgi/admin.py. It is not necessary to restart Mailman. See <https://wiki.list.org/x/17891729>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you. I did patch the admin.py file and I can see the changes. However, if I go to the list subscribers, the link to the next group of addresses takes me back to the main admin page.
I did notice that the URL includes < u'http://.... > which I thought was the problem that this was supposed to remedy. I then restarted Mailman, but that made no difference.
On Wed, Sep 28, 2016 at 4:12 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/28/2016 04:28 PM, Christopher Adams wrote:
It is exactly that issue that the patch fixes. What admin.py file did you patch? You should be patching Mailman/Cgi/admin.py where the 'Mailman' directory is the actual installed Mailman, maybe something like /usr/local/mailman/Mailman, but this depends on how Mailman was installed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/28/2016 09:34 PM, Christopher Adams wrote:
The patch converts a unicode URL to the character set of the list's preferred language. The result should not be a u'http://... string.
I can only guess that your web server is not executing the script you think it is. Or possibly you are looking at an older, cached version of the page. Have you tried reloading the page in your browser?
What is the path in the web server's ScriptAlias (if it's apache or whatever it is in your web server). Is it /usr/local/mailman/cgi-bin/ or something else?
If it is /usr/local/mailman/cgi-bin/, what does
strings /usr/local/mailman/cgi-bin/admin | grep scripts
show? and if you look in the paths.py file in that directory, what is the value in the
prefix =
statement?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

I cleared browser cache and reloaded. Same problem. Here are answers to your questions.
ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
strings /usr/local/mailman/cgi-bin/admin | grep scripts /usr/local/mailman/scripts/
prefix = '/usr/local/mailman'
On Wed, Sep 28, 2016 at 9:57 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/29/2016 08:04 AM, Christopher Adams wrote:
OK.
Send me (off list) a copy of /usr/local/mailman/Mailman/Cgi/admin.py
Also, what does
ls -l /usr/local/mailman/Mailman/Cgi/admin.py*
show?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

ls -l /usr/local/mailman/Mailman/Cgi/admin.py*
-rw-r--r--. 1 mailman mailman 72139 Sep 28 16:19 /usr/local/mailman/Mailadmin.py -rw-r--r--. 1 apache mailman 46447 Sep 28 16:20 /usr/local/mailman/Mailadmin.pyc -rw-r--r--. 1 mailman mailman 71971 Sep 28 14:31 /usr/local/mailman/Mailadmin.py.old -rw-r--r--. 1 mailman mailman 71971 Sep 28 16:18 /usr/local/mailman/Mailadmin.py.orig
I will send a copy of admin.py off list. Thanks.
On Thu, Sep 29, 2016 at 8:35 AM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

Sorry, lines were truncated. This is more accurate.
-rw-r--r--. 1 mailman mailman 72139 Sep 28 16:19 /usr/local/mailman/Mailman/admin.py -rw-r--r--. 1 apache mailman 46447 Sep 28 16:20 /usr/local/mailman/Mailman/admin.pyc -rw-r--r--. 1 mailman mailman 71971 Sep 28 14:31 /usr/local/mailman/Mailman/admin.py.old -rw-r--r--. 1 mailman mailman 71971 Sep 28 16:18 /usr/local/mailman/Mailman/admin.py.orig
On Thu, Sep 29, 2016 at 8:35 AM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

Upon further investigation, I found that the prior fix was incomplete. It only fixed the 'letter' links at the top of the Membership List. It didn't fix the links to subsequent chunks at the bottom of the list.
Attached is a patch to the 2.1.23 base to fix that. For older versions both this and the patch posted earlier in this thread need to be applied.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/28/2016 04:58 PM, willi uebelherr wrote:
He asked if he should apply the patch to the source directory. My answer was intended to say he could, but if he did, he would then need to rerun 'configure' and 'make install'. While that is one way to do it and would ensure that if 'make install' were run in the future, it wouldn't reverse the patch, it isn't necessary to do that. It is sufficient to just apply the patch directly to the installed Mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/27/2016 04:31 PM, Christopher Adams wrote:
So, the first chunk is '0' and then the link goes to chunk '1', but it links back to the top-level admin page.
...
Is this a Feature or a Bug ?
It is this bug <https://bugs.launchpad.net/mailman/+bug/1604544> which was fixed by the attached patch.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you for the reply and the attached patch.
Do I need to patch Mailman and then follow the process as I would for installing/upgrading Mailman ?
When I patch, should I be in the Mailman build/source directory and not in the current Mailman directory ?
Would 'patch < admin.patch' work ?
Many thanks.
On Tue, Sep 27, 2016 at 5:31 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/28/2016 11:04 AM, Christopher Adams wrote:
Do I need to patch Mailman and then follow the process as I would for installing/upgrading Mailman ?
You could, but it isn't necessary.
When I patch, should I be in the Mailman build/source directory and not in the current Mailman directory ?
The easiest thing is to just patch the active Mailman, not the build/source.
Would 'patch < admin.patch' work ?
It will if you are in the $prefix directory.
Since this patch only affects the admin CGI which is not a persistent process, it is only necessary to apply the patch to $prefix/Mailman/Cgi/admin.py. It is not necessary to restart Mailman. See <https://wiki.list.org/x/17891729>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you. I did patch the admin.py file and I can see the changes. However, if I go to the list subscribers, the link to the next group of addresses takes me back to the main admin page.
I did notice that the URL includes < u'http://.... > which I thought was the problem that this was supposed to remedy. I then restarted Mailman, but that made no difference.
On Wed, Sep 28, 2016 at 4:12 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/28/2016 04:28 PM, Christopher Adams wrote:
It is exactly that issue that the patch fixes. What admin.py file did you patch? You should be patching Mailman/Cgi/admin.py where the 'Mailman' directory is the actual installed Mailman, maybe something like /usr/local/mailman/Mailman, but this depends on how Mailman was installed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/28/2016 09:34 PM, Christopher Adams wrote:
The patch converts a unicode URL to the character set of the list's preferred language. The result should not be a u'http://... string.
I can only guess that your web server is not executing the script you think it is. Or possibly you are looking at an older, cached version of the page. Have you tried reloading the page in your browser?
What is the path in the web server's ScriptAlias (if it's apache or whatever it is in your web server). Is it /usr/local/mailman/cgi-bin/ or something else?
If it is /usr/local/mailman/cgi-bin/, what does
strings /usr/local/mailman/cgi-bin/admin | grep scripts
show? and if you look in the paths.py file in that directory, what is the value in the
prefix =
statement?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

I cleared browser cache and reloaded. Same problem. Here are answers to your questions.
ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
strings /usr/local/mailman/cgi-bin/admin | grep scripts /usr/local/mailman/scripts/
prefix = '/usr/local/mailman'
On Wed, Sep 28, 2016 at 9:57 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

On 09/29/2016 08:04 AM, Christopher Adams wrote:
OK.
Send me (off list) a copy of /usr/local/mailman/Mailman/Cgi/admin.py
Also, what does
ls -l /usr/local/mailman/Mailman/Cgi/admin.py*
show?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

ls -l /usr/local/mailman/Mailman/Cgi/admin.py*
-rw-r--r--. 1 mailman mailman 72139 Sep 28 16:19 /usr/local/mailman/Mailadmin.py -rw-r--r--. 1 apache mailman 46447 Sep 28 16:20 /usr/local/mailman/Mailadmin.pyc -rw-r--r--. 1 mailman mailman 71971 Sep 28 14:31 /usr/local/mailman/Mailadmin.py.old -rw-r--r--. 1 mailman mailman 71971 Sep 28 16:18 /usr/local/mailman/Mailadmin.py.orig
I will send a copy of admin.py off list. Thanks.
On Thu, Sep 29, 2016 at 8:35 AM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

Sorry, lines were truncated. This is more accurate.
-rw-r--r--. 1 mailman mailman 72139 Sep 28 16:19 /usr/local/mailman/Mailman/admin.py -rw-r--r--. 1 apache mailman 46447 Sep 28 16:20 /usr/local/mailman/Mailman/admin.pyc -rw-r--r--. 1 mailman mailman 71971 Sep 28 14:31 /usr/local/mailman/Mailman/admin.py.old -rw-r--r--. 1 mailman mailman 71971 Sep 28 16:18 /usr/local/mailman/Mailman/admin.py.orig
On Thu, Sep 29, 2016 at 8:35 AM, Mark Sapiro <mark@msapiro.net> wrote:
-- Christopher Adams adamsca@gmail.com

Upon further investigation, I found that the prior fix was incomplete. It only fixed the 'letter' links at the top of the Membership List. It didn't fix the links to subsequent chunks at the bottom of the list.
Attached is a patch to the 2.1.23 base to fix that. For older versions both this and the patch posted earlier in this thread need to be applied.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 09/28/2016 04:58 PM, willi uebelherr wrote:
He asked if he should apply the patch to the source directory. My answer was intended to say he could, but if he did, he would then need to rerun 'configure' and 'make install'. While that is one way to do it and would ensure that if 'make install' were run in the future, it wouldn't reverse the patch, it isn't necessary to do that. It is sufficient to just apply the patch directly to the installed Mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Christopher Adams
-
Mark Sapiro
-
willi uebelherr