Variables in the template postauth.txt are not substituted

Bug #266382 reported by Jhirvi
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Invalid
Medium
Unassigned

Bug Description

The template file postauth.txt contains:

> As list administrator, your authorization is requested for thefollowing
> mailing list posting:
> List: %(listname)s@%(hostname)s From: %(sender)s Subject:
> %(subject)s Reason: %(reason)s
>
> At your convenience, visit:
> %(admindb_url)s
> to approve or deny the request.

When an email is sent to the administrator, the variables are of course
supposed to be substituted with their respective values. THis didn't
happen, however. I cannot think of another explanation than a bug. My
Mailman version is 2.1.8. In this case, I'm using Finnish versions of the
templates (modified by me), but that shouldn't affect this, I think.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1635915&group_id=103&atid=100103]

Revision history for this message
Mark Sapiro (msapiro) wrote :

Originator: NO

Perhaps the 'bug' is in your modified template. It seems to me that your
modification of the template is the most likely cause of this.

Have you changed the substitution strings %(listname)s, %(hostname)s, etc.
in any way? If you change anything in these strings, they will cease to
work.

Please check for

lists/<listname>/fi/postauth.txt
templates/<list.host_name>/fi/postauth.txt
templates/site/fi/postauth.txt
templates/fi/postauth.txt

The first of these that exists is the Finnish template that will be used.
Review that template, and if you can't find a problem there, I don't know
where it can be unless somehow the call to
 Utils.maketext('postauth.txt', d, raw=1, mlist=mlist),
in Mailman/Handlers/Hold.py has been changed.

Revision history for this message
Jhirvi (jhirvi) wrote :

Originator: YES

I think I found the error in my /templates/fi/postauth.txt, just as you
suspected! One s (for string, I guess) was missing. I have not tested,
but I'm reasonably sure this was what caused the error.

I feel kind of stupid... but I'm glad this was solved!

Revision history for this message
Mark Sapiro (msapiro) wrote :

Originator: NO

I am closing this per the submitter's comment.

Note that you should not edit /templates/fi/postauth.txt as your changes
will be lost in an upgrade. If you want a modified version of this template
to apply sitewide, it should be put in templates/site/fi/postauth.txt. See
<http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.048.htp> for
more information.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.