Skip to content

Fix missing org name (short and long) in email templates#4638

Merged
wes-otf merged 2 commits into
HyphaApp:mainfrom
bmispelon:fix-org-name-in-emails
Dec 5, 2025
Merged

Fix missing org name (short and long) in email templates#4638
wes-otf merged 2 commits into
HyphaApp:mainfrom
bmispelon:fix-org-name-in-emails

Conversation

@bmispelon

Copy link
Copy Markdown
Contributor

I noticed that the signature of the application notification emails was off:

Kind Regards,
The  Team

--

http://example.com

While investigating I found out that the base.html email template was using org_long_name instead of ORG_LONG_NAME (which is what the global_vars context processor is providing).
This issue appears to be widespread, and it's not helped by the fact that some emails correctly receive the org_long_name variable (it's passed manually in the context).

For this PR, I went with the exhaustive approach of replacing every single instance of org_long_name, org_short_name, and org_email with their uppercase counterparts:

git grep -lw org_long_name | xargs sed -i 's/\borg_long_name\b/ORG_LONG_NAME/'
git grep -lw org_short_name | xargs sed -i 's/\borg_short_name\b/ORG_SHORT_NAME/'
git grep -lw org_email | xargs sed -i 's/\borg_email\b/ORG_EMAIL/'

@bmispelon bmispelon marked this pull request as draft November 26, 2025 13:32
@bmispelon

bmispelon commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

I just realized this breaks compilemessages because it introduces duplicate message definitions. Converting this PR to draft while I figure out how to fix that.

Edit: I ended up fixing the duplicate messages manually by opening the po files with poedit and letting it clean them up.

@bmispelon bmispelon marked this pull request as ready for review November 26, 2025 13:55
@wes-otf

wes-otf commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Hey this looks good, thanks for putting it up! I think I'm going to open another PR after merging this that'll automatically add the global_vars context to Markdown emails too so we can toss a lot of that context code, gets redundant.

@wes-otf wes-otf added Status: Tested - approved for live ✅ Type: Patch Mini change, used in release drafter labels Dec 5, 2025
@wes-otf wes-otf merged commit 21cc1db into HyphaApp:main Dec 5, 2025
7 checks passed
wes-otf added a commit that referenced this pull request Jan 9, 2026
…ntexts (#4647)

…`MarkdownMail` renderer

<!--
Thanks for contributing to Hypha!

Please ensure your contributions pass all necessary linting/testing and
that the appropriate documentation has been updated.
-->

<!--
Describe briefly what your pull request changes. If this is resolving an
issue, please specify below via "Fixes #<Github Issue ID>"
-->
Relates to #4638 - removes the redundant markdown email contexts in
favor of just utilizing the `global_vars` context processor


## Test Steps
<!-- 
If step does not require manual testing, skip/remove this section.

Give a brief overview of the steps required for a user/dev to test this
contribution. Important things to include:
 - Required user roles for where necessary (ie. "As a Staff Admin...")
- Clear & validatable expected results (ie. "Confirm the submit button
is now not clickable")
- Language that can be understood by non-technical testers if being
tested by users
-->

 - [ ] Ensure all markdown emails still look as they did before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Tested - approved for live ✅ Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants