[Bug 1872840] [NEW] (description)s variable not substituted in emails
From the "Welcome email txt file" in the option "Edit the public HTML
Public bug reported: 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. ** Affects: mailman Importance: Undecided Status: New ** Tags: description variable -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
(sigh) I'm use to gitlab where the msgs update in real time. My comment above can be ignored. -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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. -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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. -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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(), -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
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 :-) -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1872840 Title: (description)s variable not substituted in emails To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1872840/+subscriptions
participants (3)
-
Jim Popovitch
-
Mark Sapiro
-
Tai Graham