-
Notifications
You must be signed in to change notification settings - Fork 813
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
Memberships: Product creation fail message #12226
Conversation
This is an automated check which relies on |
@kraftbj I don't think this needs cherry-pick. This code here is never executed in Jetpack. I am getting it into JP for Fusion's sake, but it makes no difference for the users and their sites. Its merged to wpcom where it makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it works to avoid the first error, I think we would also need to update the Membership block itself to support use-cases when no product can be created. Right now, when running into this error you end up getting the following in the block editor:
Warning: Each child in an array or iterator should have a unique "key" prop.
Check the render method of `MembershipsButtonEdit`.
This seems to happen because this.state.products
is an empty array.
Understood it isn't needed, but I do like to keep any code related to a new feature in Jetpack going out at the same time, even if it doesn't run. If it is a bug fix for something unreleased that either fixes something seen or has no liability (in this case), rather cherry-pick than not. Cherry-picking is not something we expect or want you, as the originating developer, to do. It's a quick thing on my side as I'm working through the beta week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message isn't especially helpful since it does not tell you what to do next, but it's better than the current version in master
.
Caution: This PR has changes that must be merged to WordPress.com |
That is because I honestly don't know why this error occurs on your site :D |
D27845-code is deployed. |
@artpi Let's take that opportunity to bring the file in sync to solve those Fusion issues. See D27848-code. |
@jeherve Fusion PR is waiting patiently for when this right here lands. |
* Better product craetion message, port changes from WPCOM * Better error passing
Cherry-picked to |
For some reasons, product creation fails for certain sites. #9802 (review)
The error message is terrible. We have captured extensive logs on wpcom side, but error is not returned properly.
This change is only executed on WPCOM side and its already merged there.
This PR syncs it.
No testing necessary.