Automattic / Automattic/jetpack

Jetpack Newsletter Shows "Sorry, you are not allowed do that" Error Message for Editor and Author

Open
#35,146 4 comments 1 reaction 1 assignee Claimed by @BogdanUngureanu View on GitHub
[Feature] Subscriptions [Pri] Normal Bug Customer Report [LEGACY] Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

If the site is connected to Jetpack (from the Admin account) and the Newsletter function is enabled, then after clicking on the "Publish" button for the post as Editor or Author, it shows the "Sorry, you are not allowed do that" error message.

But clicking the same "Publish" button for the second prompt publishes the post correctly and sends the newsletter as well, so we are not sure why this error shows when the Jetpack Newsletter feature is enabled.

### Steps to reproduce

1. From the Admin account, connect the Jetpack to WP.com.
2. Make sure to enable the Newsletter (you can add one subscriber there).
3. Create an Editor/Author account.
4. Log out of the Admin account and log in to the Editor/Author account.
5. Create a new post as Editor/Author and click the "Publish" button on the top right.
6. As you click it, it will show the "Sorry, you are not allowed to do that" error message (you can also check the browser's console log for the error output), and when you again click on the "Publish" button that appears in the prompt, the post will be published successfully, and the newsletter will also be sent!

The above issue is not there if the Newsletter function is disabled!

Here is the video of the error message that appeared when clicking on the "Publish" button as Editor/Author for the post (when Newsletter function is enabled):

https://github.com/Automattic/jetpack/assets/52444539/397f698e-2e9c-4010-80dc-5205ebf06fa3

### A clear and concise description of what you expected to happen.

Since there is no issue in publishing the post or sending a newsletter even if the Editor/Author has not connected their account with WP.com, there shouldn't be the error message.

### What actually happened

_No response_

### Impact

All

### Available workarounds?

No but the platform is still usable

### Platform (Simple and/or Atomic)

_No response_

### Logs or notes

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.