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

"The website with id X that was requested wasn't found. Verify the website and try again" #1890

Closed
KristofersOzolinsMagebit opened this issue Feb 26, 2024 · 3 comments · Fixed by #1911
Assignees
Milestone

Comments

@KristofersOzolinsMagebit
Copy link

KristofersOzolinsMagebit commented Feb 26, 2024

Issue Description

The newsletter_subscriber_save_after event listener causes this error to be thrown: "The website with id X that was requested wasn't found. Verify the website and try again"

image

The second argument for Magento\Newsletter\Model\Subscriber loadBySubscriberEmail method is websiteId not storeId

$subscriberOld = $factory->loadBySubscriberEmail($subscriber->getCustomerId(), $subscriber->getStoreId());

image

Preconditions

Mailchimp 103.4.57
Magento 2.4.3

Happens when the store_id does not match website_id

@gonzaloebiz
Copy link
Collaborator

Take a look at #1840 the fix will be available next release this week

@evilprophet
Copy link

@gonzaloebiz I'm not sure if this bug is properly fixed because you are using customerId in the method which loading subscriber by email
$subscriberOld = $factory->loadBySubscriberEmail($subscriber->getCustomerId(), $subscriber->getStoreId());

@gonzaloebiz
Copy link
Collaborator

Hi @evilprophet

you are right, my fault, working in a fix

Thanks

gonzaloebiz added a commit that referenced this issue Feb 29, 2024
@gonzaloebiz gonzaloebiz added this to the 10x.x.59 milestone Feb 29, 2024
@gonzaloebiz gonzaloebiz linked a pull request Feb 29, 2024 that will close this issue
gonzaloebiz added a commit that referenced this issue Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants