[4.2] Fix MailTemplate array regression from 4.2.7#39850
Merged
fancyFranci merged 2 commits intojoomla:4.2-devfrom Feb 22, 2023
Merged
[4.2] Fix MailTemplate array regression from 4.2.7#39850fancyFranci merged 2 commits intojoomla:4.2-devfrom
fancyFranci merged 2 commits intojoomla:4.2-devfrom
Conversation
Contributor
|
I have tested this item ✅ successfully on e349ab4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39850. |
Contributor
|
I have tested this item ✅ successfully on e349ab4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39850. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39850. |
Contributor
|
Thank you for bringing this back |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #39774.
Summary of Changes
PR #38305 changed the logic for array values in mail templates. That PR "fixed" the output of plain arrays, dismissing that core actually uses arrays in a different way, by using nested template tags.
One feature where nested tags are used are the user information emails, and thus they are broken since 4.2.7.
This PR restores the old behavior, but only if the new one is not used. As described by @ReLater in 39774, this fixes the mails not working (on my sites, with default templates) - and it also doesn't break the use-case of the changes in 4.2.7.
Additional remarks on #38305
Note: I find the changes in #38305 confusing as is breaks the current semantics of templates: beforehand, only text in curly braces was treated as "key", and now also text outside of them. imho,
{com_fields}{xyz}{/com_fields}would have been better than the syntax{com_fields}xyz{/com_fields}as implemented by #38305...I suppose the decision on how to put forward the mail templating "language" is not on me, but this PR at least unbreaks old functionality and does not introduce b/c problems to 4.2.7.
Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed