Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] mass_mailing: can unsubscribe in multidomain #42852

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Jan 7, 2020

The unsubscribe feature of mass mailings repose on having a link with
HREF attribute /unsubscribe_from_list inside the mail message.

When the mass mailing is sent:

  • relative URL are replaced by absolute URL (/unsubscribe_from_list is
    replaced by {system parameter web.base.url}/unsubscribe_from_list)

  • {system parameter web.base.url}/unsubscribe_from_list is replaced by
    the real mass mailing link containing info that will be used to
    unsubscribe the user.

But there was an issue in the case of multiple domain, if this scenario
happened:

  • system parameter web.base.url is http://domain1
  • a user use "Test" button on a mass mailing
  • system parameter web.base.url becomes http://domain2
  • the mass mailing is sent

The unsubscribe link is broken, this is because the implementation of
"Test Mailing" feature would update the mass mailing with absolute
links, so if the domain change, we the unsubscribe link is no longer
found and replaced into the source.

opw-2124890

Forward-Port-Of: #42373

@fw-bot
Copy link
Contributor Author

fw-bot commented Jan 7, 2020

Ping @nle-odoo
Cherrypicking 12125e3 of source #42373 failed

stderr:

error: could not apply 12125e31a1f... [FIX] mass_mailing: can unsubscribe in multidomain
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

@robodoo robodoo added seen 🙂 conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot labels Jan 7, 2020
@nle-odoo nle-odoo force-pushed the saas-11.3-11.0-mass-mailing-opw-2124890-nle-ylg9-fw branch 2 times, most recently from 8d419bd to 348b6b4 Compare January 7, 2020 13:33
@nle-odoo
Copy link
Contributor

nle-odoo commented Jan 7, 2020

should be fixed, I will just test on runbot before merging

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jan 7, 2020
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jan 7, 2020
The `unsubscribe` feature of mass mailings repose on having a link with
HREF attribute `/unsubscribe_from_list` inside the mail message.

When the mass mailing is sent:

- relative URL are replaced by absolute URL (`/unsubscribe_from_list` is
  replaced by `{system parameter web.base.url}/unsubscribe_from_list`)

- `{system parameter web.base.url}/unsubscribe_from_list` is replaced by
  the real mass mailing link containing info that will be used to
  unsubscribe the user.

But there was an issue in the case of multiple domain, if this scenario
happened:

- system parameter web.base.url is http://domain1
- a user use "Test" button on a mass mailing
- system parameter web.base.url becomes http://domain2
- the mass mailing is sent

The unsubscribe link is broken, this is because the implementation of
"Test Mailing" feature would update the mass mailing with absolute
links, so if the domain change, we the `unsubscribe` link will no longer
be found and replaced into the source.

opw-2124890
closes odoo#42373

X-original-commit: fccf20b
@nle-odoo nle-odoo force-pushed the saas-11.3-11.0-mass-mailing-opw-2124890-nle-ylg9-fw branch from 348b6b4 to 57db840 Compare January 14, 2020 10:04
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Jan 14, 2020
@nle-odoo
Copy link
Contributor

robodoo r+

robodoo pushed a commit that referenced this pull request Jan 14, 2020
The `unsubscribe` feature of mass mailings repose on having a link with
HREF attribute `/unsubscribe_from_list` inside the mail message.

When the mass mailing is sent:

- relative URL are replaced by absolute URL (`/unsubscribe_from_list` is
  replaced by `{system parameter web.base.url}/unsubscribe_from_list`)

- `{system parameter web.base.url}/unsubscribe_from_list` is replaced by
  the real mass mailing link containing info that will be used to
  unsubscribe the user.

But there was an issue in the case of multiple domain, if this scenario
happened:

- system parameter web.base.url is http://domain1
- a user use "Test" button on a mass mailing
- system parameter web.base.url becomes http://domain2
- the mass mailing is sent

The unsubscribe link is broken, this is because the implementation of
"Test Mailing" feature would update the mass mailing with absolute
links, so if the domain change, we the `unsubscribe` link will no longer
be found and replaced into the source.

opw-2124890
closes #42373

closes #42852

X-original-commit: fccf20b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
@robodoo robodoo closed this Jan 14, 2020
@robodoo robodoo temporarily deployed to merge January 14, 2020 12:27 Inactive
@fw-bot fw-bot deleted the saas-11.3-11.0-mass-mailing-opw-2124890-nle-ylg9-fw branch January 28, 2020 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants