dev/core#1622 Fix unsubscribe when loading the unsubscribe form on a … #16634
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.
…different locale to the one the mailing was sent from
Overview
This aims to fix a bug where by if you create and send mailing on locale 1 e.g. en_US but then load the unsubscribe form on locale 2 e.g. fr_FR the unsubscribe form does not show the correct list of groups.
Before
Incorrect list of groups shown if loading unsubscribe form on locale other than the locale used to send the mailing
After
Correct list of groups shown on unsubscribe form no matter the locale
Technical Details
The long and short of is we store the full translated table name in the entity_table and getTableName() will use the current locale to set the table name so if your on a different locale to the one the mailing was sent from then it breaks.
ping @eileenmcnaughton @artfulrobot @mlutfy