-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
🐛 Fixed free tier showing in the tiers-only paywall in posts #19807
Conversation
refs INC-36 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post. It also throws a loud error when using the bulkEdit action
…hat object" This reverts commit 35b8b78.
78b032c
to
40c30e7
Compare
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.
I think we also need a non-bulk E2E test that tries to edit a post with a free tier and check if it isn't saved (because here was the main issue).
We should make sure we don't require changes in the API. Users should still be able to set the tiers of a post by only specifying the id's.
Apart from that we need to consider to also add the fix to the output serializer so we don't return the free tier for posts that already have the free tier linked (alternative would be a migration, but that is a lot heavier).
1eac712
to
b32c870
Compare
.matchBodySnapshot({ | ||
pages: [Object.assign({}, matchPageShallowIncludes, { | ||
published_at: null, | ||
tiers: [{id: paidTier.id, ...tierSnapshot}] |
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.
Shouldn't this be
tiers: [{id: paidTier.id, ...tierSnapshot}] | |
tiers: [{id: paidTier.id}] |
?
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.
This is to avoid timestamps issues with the updated_at
fields are so on
refs INC-36 fixes #19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
* upstream/main: (32 commits) Update dependency i18next to v23.10.1 Fixed udpated banner z-index (#19822) Update dependency jose to v4.15.5 Update dependency express to v4.18.3 v5.80.1 Fixed tiers paywall selecting all paid tiers (#19817) 🐛 Fixed free tier showing in the tiers-only paywall in posts (#19807) Fixed tiers paywall selecting all paid tiers (#19817) 🐛 Fixed free tier showing in the tiers-only paywall in posts (#19807) Fix a French translation error in portal.json (#19803) Updated test to check for Unsplash button in Admin (#19814) Fixed button spacing in Portal unsubscribe popup footer (#19815) Update dependency terser to v5.29.1 Released Portal v2.37.5 (#19812) Update dependency terser to v5.29.0 🎨 Improved lazy-loading of comments data (#19809) Fixed various Unsplash design bugs (#19806) 🎨 Improved lazy-loading of comments data (#19809) 🐛 Fixed unexpected conversion of single-quoted attributes in HTML cards (#19727) Fixed various Unsplash design bugs (#19806) ...
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
…t#19807) refs INC-36 fixes TryGhost#19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
refs INC-36 fixes #19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
refs INC-36 fixes #19796 - The tiers-only paywall was incorrectly rendering "Free". Example: "This post is for subscribers of the Free, Silver and Gold tiers only" - Steps to reproduce the issue: 1. Create a post with public visibility, publish it 2. Then swap the visibility to specific tiers. The default selects all paid tiers. Leave it like that 3. Update the post. The paywall show Free, even though it should be showing only the paid tiers - This fix filters out the "free" tier when visibility is set to tiers, before updating a Post or a Page. The fix includes bulk updates from the list of Posts and Pages (right-click on a Post/Page > Change Access).
refs INC-36
fixes #19796