tbar0970 / jethro-pmm

Jethro Pastoral Ministry Manager
GNU General Public License v3.0
36 stars 26 forks source link

Contact List DOCX export has %SYSTEM_NAME% and %MONTH% untranslated tokens #1054

Closed jefft closed 1 week ago

jefft commented 5 months ago

The .docx contact list header is broken in Jethro 2.34.1:

image

To replicate:

jefft commented 5 months ago

It seems I broke this in https://github.com/tbar0970/jethro-pmm/commit/08b16ff0b34b9d74a0ca4be466ef975e512ea1c5 - the temp file must have a .docx extension. I can't remember why those particular changes prevented double tempfiles being created..

tbar0970 commented 1 month ago

Is it just those two keywords that are unreplaced, or is the whole content missing? Not sure how the temp filename change would cause the former.

jefft commented 1 week ago

Is it just those two keywords that are unreplaced, or is the whole content missing?

Just the keywords.

Not sure how the temp filename change would cause the former.

We pass the temp filename into ODF_Tools::replaceKeywords which checks the filename extension to infer type:

https://github.com/tbar0970/jethro-pmm/blob/469a8011064217d20311c9c4ff23e9d3bea60e41/include/odf_tools.class.php#L67

See proposed fix in https://github.com/tbar0970/jethro-pmm/pull/1096