Skip to content

Customer get unsubscribe to newsletter on password reset email request with Newsletter Need to Confirm Set to Yes on admin settings #17954

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

Closed
matin73 opened this issue Sep 6, 2018 · 15 comments
Assignees
Labels
Component: Customer Component: Newsletter Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@matin73
Copy link

matin73 commented Sep 6, 2018

Preconditions

  1. Magento 2.2.4 and 2.2.5
  2. PHP 7.0
    3.Open Admin Stores > Configuration > Customers > Newsletter > Need to Confirm Set to Yes and save.

Steps to reproduce

  1. Go to Storefront.
  2. Create customer account and "Sign in".
  3. Go to "Newsletter Subscription" in account page.
  4. Activate checkbox "General Subscription" , a confirmation request has been sent on email with link, dont click on this.
  5. Sign out of customer and go to link "Sign In" click "Forgot Your Password" and fill field to reset password and press button "Reset My Password"
  6. Check you email

Expected result

  1. Customer should stay "Subscribes to newsletter".
  2. Letter with "Set new password" button is present on email.

Actual result

  1. Letter "You have been unsubscribed from the newsletter" on email.
  2. Letter with "Set new password" button is present on email.
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 6, 2018
@magento-engcom-team
Copy link
Contributor

Hi @matin73. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@matin73 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@matin73
Copy link
Author

matin73 commented Sep 6, 2018

@matin73 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

x yes
no

@ghost ghost self-assigned this Sep 6, 2018
@ghost
Copy link

ghost commented Sep 6, 2018

@matin73 , thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce or try to reproduce this issue on a clean installation or latest release.

Only 3 letter on email box is present and customer is not unsubscription.
See scrennshots

letter_on_email

register

sub

reset_password

@matin73
Copy link
Author

matin73 commented Sep 6, 2018

maybe it depends on some configuration. here is my setup
grafik

grafik

grafik

@matin73
Copy link
Author

matin73 commented Sep 6, 2018

And maybe you have to make at least 1 order (at both systems customer made at least 1 order)

Edit: I created new customer without order - same problem.

@matin73
Copy link
Author

matin73 commented Sep 6, 2018

I think unsubscribe email is sent, if customer has not confirmed newsletter subscription yet ...!?

@ghost ghost removed the Progress: needs update label Sep 7, 2018
@matin73
Copy link
Author

matin73 commented Sep 7, 2018

I have testet in now once again. Steps to reproduce:

  1. Intall Magento
  2. Create customer account. Sign in and go to "Newsletter Subscription" in account.
  3. Activate checkbox for newsletter subscription " General Subscription"
  4. Now email "Newsletter subscription confirmation" is sent. Now do not click activation link in email.
  5. Log out from account and click "Forgot you passwort" link and enter email
  6. And now email "Newsletter unsubscription success" is automatically sent

The next thing ist following: This is very annoying because we importet 13.000 customer from old shop system. And all customer have to reset password because password could not be importet. So every customer gets FIRST another email that he has been SUBSCRIBED to newsletter and next email is that customer is unsubscribed. This is confusing customer becauser they do not want to get any newsletter!

@ghost ghost changed the title Customer get unsubsribed to newsletter on passwort reset email request Customer get unsubscribe to newsletter on password reset email request with Newsletter Need to Confirm Set to Yes on admin settings Sep 7, 2018
@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Component: Customer Component: Newsletter labels Sep 7, 2018
@ghost
Copy link

ghost commented Sep 7, 2018

@matin73 , thanks for you audate.
We've acknowledged the issue and added to our backlog.

@ghost ghost added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 7, 2018
@ghost ghost removed their assignment Sep 7, 2018
@jaiminparikh jaiminparikh self-assigned this Sep 8, 2018
@matin73
Copy link
Author

matin73 commented Sep 9, 2018

How can I fix this? I do not need newsletter at all. I tried to disable module by:
php bin/magento module:disable --clear-static-content Magento_Newsletter
php bin/magento setup:upgrade

But I get error:
Unable to change status of modules because of the following constraints:
Cannot disable Magento_Newsletter because modules depend on it:
Magento_Store: Magento_Store->Magento_Catalog->Magento_Customer->Magento_Newsletter
Magento_Directory: Magento_Directory->Magento_Backend->Magento_Customer->Magento_Newsletter
Magento_Eav: Magento_Eav->Magento_Backend->Magento_Customer->Magento_Newsletter
Customweb_Base: Customweb_Base->Magento_Customer->Magento_Newsletter
Magento_Theme: Magento_Theme->Magento_Customer->Magento_Newsletter
Magento_Backend: Magento_Backend->Magento_Customer->Magento_Newsletter
Magento_Customer: Magento_Customer->Magento_Newsletter

@rparsi
Copy link

rparsi commented Sep 10, 2018

@matin73 You can prevent the sending of newsletter emails by overriding (DI mechanism)
class Magento\Newsletter\Model\Subscriber, sample code below:

namespace MyVendor\Newsletter\Model;

use Magento\Newsletter\Model\Subscriber as Base;

class Subscriber extends Base
{
    public function sendConfirmationRequestEmail()
    {
        // do nothing here so that base class doesn't send emails
        return $this;
    }

    public function sendConfirmationSuccessEmail()
    {
        // do nothing here so that base class doesn't send emails
        return $this;
    }

    public function sendUnsubscriptionEmail()
    {
        // do nothing here so that base class doesn't send emails
        return $this;
    }
}

Make sure your app/code/MyVendor/Newsletter/etc/di.xml has

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Newsletter\Model\Subscriber" type="MyVendor\Newsletter\Model\Subscriber"/>
</config>

@matin73
Copy link
Author

matin73 commented Sep 10, 2018

@rparsi thanks. but to complicated

@rparsi
Copy link

rparsi commented Sep 12, 2018

@matin73 How is the solution complicated? I gave you all the necessary code, just change MyVendor to something appropriate for your application.
Your only other option is to find an off the shelf 3rd party extension that manages transactional emails.

@janakbhimani janakbhimani self-assigned this Oct 12, 2018
@magento-engcom-team
Copy link
Contributor

Hi @janakbhimani. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@sidolov
Copy link
Contributor

sidolov commented Oct 25, 2018

Hi @matin73. Thank you for your report.
The issue has been fixed in #18643 by @janakbhimani in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@sidolov sidolov added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 25, 2018
@sidolov sidolov closed this as completed Oct 25, 2018
@sidolov sidolov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 27, 2018
@sidolov
Copy link
Contributor

sidolov commented Oct 27, 2018

Hi @matin73. Thank you for your report.
The issue has been fixed in #18795 by @janakbhimani in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Customer Component: Newsletter Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants