Reported by @Urbanecm in WikimediaCZ-l.
The variable syntax is different in MM3 and doesn't seem to be migrated by the script.
Reported by @Urbanecm in WikimediaCZ-l.
The variable syntax is different in MM3 and doesn't seem to be migrated by the script.
From https://gitlab.com/mailman/mailman/-/issues/870#note_553840180
As far as import21 is concerned, the syntax of replacements and the actual replacement names are different between Mailman 2.1 and 3. import21 "fixes" a few of these on import, but ones it doesn't recognize are imported as is.
Of course, the worst part is that these "imported" templates aren't actually visible in postorius because:
Basically, Postorius has it's own notion of templates and when you create a template in Postorius, it replaces the list's URI for that template with a URI to get the template from Postorius. Postorius needs to be updated to show the content for the existing URI when Postorius doesn't have a template.
So listadmins can't see the templates that exist and then can't fix them. We should import the templates off disk and drop them into postorius somehow and then tell listadmins to check/fix templates as needed.
Templates are very not-properly implemented upstream so my plan is hackish:
Notes:
MariaDB [mailman3]> select * from template where context="test.lists.wikimedia.org"; +----+----------------------------+--------------------------+-------------------------------------------------------------------------------------------------------+----------+----------+ | id | name | context | uri | username | password | +----+----------------------------+--------------------------+-------------------------------------------------------------------------------------------------------+----------+----------+ | 1 | list:member:regular:footer | test.lists.wikimedia.org | mailman:///$listname/$language/list:member:regular:footer.txt | NULL | | | 7 | list:member:digest:footer | test.lists.wikimedia.org | http://localhost:8000/postorius/api/templates/list/test.lists.wikimedia.org/list:member:digest:footer | NULL | | +----+----------------------------+--------------------------+-------------------------------------------------------------------------------------------------------+----------+----------+ 2 rows in set (0.000 sec)
Upstream issues:
Change 683477 had a related patch set uploaded (by Legoktm; author: Legoktm):
[operations/puppet@production] mailman3: Properly import templates for admins
Change 683520 had a related patch set uploaded (by Legoktm; author: Legoktm):
[operations/puppet@production] mailman3: Fix URL postorius provides to fetch templates
Change 683555 had a related patch set uploaded (by Legoktm; author: Legoktm):
[operations/puppet@production] mailman3: Fork and improve upstream templates
Change 683520 merged by Legoktm:
[operations/puppet@production] mailman3: Fix URL postorius provides to fetch templates
Change 683477 merged by Legoktm:
[operations/puppet@production] mailman3: Properly import templates for admins
Change 683555 merged by Legoktm:
[operations/puppet@production] mailman3: Fork and improve upstream templates
Documented at https://meta.wikimedia.org/wiki/Mailing_lists/Mailman3_migration#Review_custom_footer_and_other_templates (thanks to @Quiddity for reviewing)
And then I fixed the already imported lists, only wikimediacz-l seemed to have syntax that didn't get properly migrated so I pinged @Urbanecm and he fixed it.
legoktm@lists1001:~$ sudo python3 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from migrate_to_mailman3 import fix_templates >>> fix_templates('lgbt') Importing list:member:regular:footer.txt Inserted 1 templates into `postorius_emailtemplate`. Updated mailman3.template table to point to postorius Deleted /var/lib/mailman3/templates/lists/lgbt.lists.wikimedia.org/en Deleted /var/lib/mailman3/templates/lists/lgbt.lists.wikimedia.org >>> fix_templates('wikifa-admin-l') Importing list:member:digest:footer.txt Importing list:member:regular:footer.txt Inserted 2 templates into `postorius_emailtemplate`. Updated mailman3.template table to point to postorius Deleted /var/lib/mailman3/templates/lists/wikifa-admin-l.lists.wikimedia.org/en Deleted /var/lib/mailman3/templates/lists/wikifa-admin-l.lists.wikimedia.org >>> fix_templates('wikimediacz-l') Importing list:member:regular:footer.txt Inserted 1 templates into `postorius_emailtemplate`. Updated mailman3.template table to point to postorius Deleted /var/lib/mailman3/templates/lists/wikimediacz-l.lists.wikimedia.org/en Deleted /var/lib/mailman3/templates/lists/wikimediacz-l.lists.wikimedia.org >>> fix_templates('wikimediabr-l') Importing list:user:notice:goodbye.txt Inserted 1 templates into `postorius_emailtemplate`. Updated mailman3.template table to point to postorius Deleted /var/lib/mailman3/templates/lists/wikimediabr-l.lists.wikimedia.org/pt_BR Deleted /var/lib/mailman3/templates/lists/wikimediabr-l.lists.wikimedia.org