cancel
Showing results for 
Search instead for 
Did you mean: 

Newsletter Subscription Message

SOLVED

Newsletter Subscription Message

Please tell me where this subscription message is:

 

==>  There was a problem with the subscription: Sorry, but the administrator denied subscription for guests. Please register.  <==

 

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Newsletter Subscription Message

Hello @Sheba

In Magento vendor folder below file path

Magento\Newsletter\Controller\Subscriber\NewAction.php

* This message display as 2 part 

1) "There was a problem with the subscription:" In execute the function.

2) "Sorry, but the administrator denied subscription for guests. Please register." In same file "validateGuestSubscription" protected function throw message.

 

Query solved? Accept as Solution.Thanks
SarfarazAhmed

View solution in original post

Re: Newsletter Subscription Message

Your Message comes from NewAction.php file,

Check file path in github,

__('There was a problem with the subscription: %1', $e->getMessage())

 

In above statement, $e->getMessage() comes dynamically from same file at below location,

'Sorry, but the administrator denied subscription for guests. Please <a href="%1">register</a>.'

 

If you want to change only string you can directly change from en_US files. Just create en_US.csv file into your code or theme folder,

en_US.csv#L81

string from en_US.csv

 

Please let me know if you have any issue.

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

View solution in original post

2 REPLIES 2

Re: Newsletter Subscription Message

Hello @Sheba

In Magento vendor folder below file path

Magento\Newsletter\Controller\Subscriber\NewAction.php

* This message display as 2 part 

1) "There was a problem with the subscription:" In execute the function.

2) "Sorry, but the administrator denied subscription for guests. Please register." In same file "validateGuestSubscription" protected function throw message.

 

Query solved? Accept as Solution.Thanks
SarfarazAhmed

Re: Newsletter Subscription Message

Your Message comes from NewAction.php file,

Check file path in github,

__('There was a problem with the subscription: %1', $e->getMessage())

 

In above statement, $e->getMessage() comes dynamically from same file at below location,

'Sorry, but the administrator denied subscription for guests. Please <a href="%1">register</a>.'

 

If you want to change only string you can directly change from en_US files. Just create en_US.csv file into your code or theme folder,

en_US.csv#L81

string from en_US.csv

 

Please let me know if you have any issue.

 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial