(description)s variable not substituted in emails

Bug #1872840 reported by Tai Graham
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Invalid
Undecided
Unassigned

Bug Description

From the "Welcome email txt file" in the option "Edit the public HTML pages and text files",

This code parse incorrectly:

     Welcome to the %(description)s mailing list!
     %(welcome)s

It produces:

     Welcome to the %(description)s mailing list!
     Here is where the welcome variable got substituted but the description variable did not. Have fun.

The description variable is not being substituted in the email body.

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

You have edited this template and broken it. The default English language subscribeack.txt (welcome message) template does not contain

     Welcome to the %(description)s mailing list!
     %(welcome)s

and the code that uses this template does not have a substitution for 'description'.

The corresponding text in the default template is

    Welcome to the %(real_name)s@%(host_name)s mailing list!
    %(welcome)s

Changed in mailman:
status: New → Invalid
Revision history for this message
Jim Popovitch (jimpop) wrote :

What makes you believe that %(description)s is valid for the Welcome email text? I only ask because this is what I see as the default first two lines of Welcome email text:

Welcome to the %(real_name)s@%(host_name)s mailing list!
%(welcome)s

Revision history for this message
Jim Popovitch (jimpop) wrote :

(sigh) I'm use to gitlab where the msgs update in real time. My comment above can be ignored.

Revision history for this message
Tai Graham (taigraham) wrote :

The point of "Edit the public HTML pages and text files"
is to be able to edit what gets sent out to the user. It is not broken and editing it shouldn't break it.

I got the details from the manual: https://wiki.list.org/DOC/Mailman%202.1%20List%20Administrators%20Manual

  For example, a footer containing the following text:

  This is the %(list_name)s mailing list
  Description: %(description)s
  might get attached to postings like so:

  This is the Example mailing list
  Description: An example of Mailman mailing lists

I tried all of the other variables in the manual and they work but 'description' does not.

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

Each template has it's own set of valid substitutions. Just because 'description' is a valid substitution in some context doesn't mean it can be used in other contexts. In general, the only substitutions you can rely on are those present in the default template.

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

Note, if you really want to be able to include the list's description as a replacement in the welcome message template, you can apply this patch to Mailman/Deliverer.py

=== modified file 'Mailman/Deliverer.py'
--- Mailman/Deliverer.py 2018-06-17 23:47:34 +0000
+++ Mailman/Deliverer.py 2020-04-15 01:53:20 +0000
@@ -61,6 +61,7 @@
             'subscribeack.txt',
             {'real_name' : self.real_name,
              'host_name' : self.host_name,
+ 'description' : self.description,
              'welcome' : welcome,
              'umbrella' : umbrella,
              'emailaddr' : self.GetListEmail(),

Revision history for this message
Tai Graham (taigraham) wrote :

Oh my! My apologies. I see how they are not all just global. I'm sorry.

Thanks for the patch. I love this software, have for decades. So excited to use 3 when it becomes standard and easily migrated from 2 :-)

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.