Commit Graph

31827 Commits

Author SHA1 Message Date
Simon Backx
28e4eb60ae
🐛 Fixed offer links with an archived tier (#15792)
refs https://github.com/TryGhost/Team/issues/2233

**Problem**
When a user clicks an offer link that has an archived tier, the site
blocks and you are no longer able to scroll. This is because the product
for that offer can't be found. This has been fixed by updating the
`isActiveOffer` helper to also check for the existence of the
corresponding tier.

**Solution**
- You no longer are able to create new offers if there are no active
tiers
- A custom message is shown that instructs the user to create a new tier
if there are not active tiers on the offers page
- Improved detection of changes in tiers by correctly reloading the
members utils service after tier changes
- Portal redirects to the homepage for offers with an archived tier
(same behaviour as invalid offers)
- Offers of an archived tier are no longer visible in the dashboard
2022-11-11 10:11:34 +01:00
Simon Backx
f0b87216f7
🐛 Fixed visible canceled events in conversions tab on analytics page (#15796)
fixes https://github.com/TryGhost/Team/issues/2238

**Issue**
When viewing the 'conversions' tab on the analytics page, you could
sometimes see more listed events than the total number of conversions.
This is because other subscription events are also shown in the list.
E.g., if a new member became a paid subscriber that is attributed to a
given post, and later that subscrption has been canceled, that canceled
event would also be shown on the analytics page. This isn't really
desirable.

**Fix**
Now only 'created' subscription events are shown when the activity feed
is filtered by post_id. The other subtypes aren't related to that given
post and should be excluded.
2022-11-11 09:56:03 +01:00
renovate[bot]
12015a60fd
Update dependency bookshelf-relations to v2.5.0 2022-11-10 15:31:20 +00:00
Simon Backx
7c3d75ade7
🐛 Fixed pasting newlines in post titles (#15794)
fixes https://github.com/TryGhost/Team/issues/2193

- When pasting a title with a newline, we now trim the string and clear newslines before pasting.
- When sending the slug to the backend to generate a unique slug, we now sluggify it in the frontend before adding it to the URL to prevent issues with unsupported characters (causing possible routing problems in Pro).
2022-11-10 14:43:15 +01:00
Naz
23c29d0674
Fixed typo 2022-11-10 17:29:54 +07:00
Simon Backx
b821c84b9e
Cleaned up member filters (#15784)
fixes https://github.com/TryGhost/Team/issues/2134
fixes https://github.com/TryGhost/Team/issues/2133

- Moved all filters to separate files to make the filter component a lot more readable and easier to maintain.
- Removed long switch style code from hbs for filter column values
- Filters for features that are disabled (such as open tracking, click tracking or member attribution) are now hidden when they are disabled
- The open rate column in the members table is now only visible if open tracking is enabled
2022-11-10 11:05:12 +01:00
Simon Backx
c2dfb2b579
🐛 Fixed link click counts for duplicate links (#15789)
refs https://github.com/TryGhost/Team/issues/2213

When an email contains multiple links to the same destination, that link
is only shown once on the analytics page. The total displayed count is
not summed correctly.
2022-11-10 10:51:26 +01:00
Simon Backx
a5c4091620 Fixed analytics page feedback chart filter button links
no issue

Clicking the 'see members' button in the feedback chart tooltip went to a page with a hardcoded post id instead of the actual post id.
2022-11-10 10:38:09 +01:00
renovate[bot]
b74029697f
Update dependency webpack to v5.75.0 2022-11-09 16:17:31 +00:00
Sam Lord
ce05d84940 Removed Bluebird from importer
refs: https://github.com/TryGhost/Ghost/issues/14882

This commit totally removes Bluebird from the importer. Updated `@tryghost/promise` to use native async/await and refactored importer logic to avoid the need of `reflect()`.
2022-11-09 16:14:37 +00:00
Simon Backx
f4660b440b
Fixed sending emails when using MembersAgent.loginAs (#15791)
fixes https://github.com/TryGhost/Team/issues/1903

MembersAgent.loginAs sends email, asynchronously via events. Which
conflicts with tests that also test emails. We cannot properly await
these events, so this is currently fixed with a timeout of 200ms. But
this was too random and unreliable.
2022-11-09 16:25:42 +01:00
Elena Baidakova
d542fadd63
Adjusted feedback title to dark theme (#15793)
closes TryGhost/Team#2236
2022-11-09 19:19:27 +04:00
James Morris
79147bc837 Released Portal v2.19.9 2022-11-09 10:45:25 +00:00
James Morris
c99685de2c Toning down the audience feedback error modal
refs https://github.com/TryGhost/Team/issues/2234
2022-11-09 10:15:37 +00:00
Fabien "egg" O'Carroll
e255102976 Fixed check for existing Stripe Prices
Since we updated the currency variable to be lowercase we needed to
update the check for existing Stripe Price currencies to lowercase
too. Without this we will create extra Prices in Stripe, but the
functionality will still work.

We could consider using value objects for currency in future so that
we can provide an `equals` method which handles all of this for us.
2022-11-09 14:56:16 +07:00
Ronald Langeveld
eb4e591e6b
Bumped kg-lexical-html-renderer version
no issue

- from 0.0.10 to 0.0.11
2022-11-08 22:05:58 +07:00
James Morris
2fb6fcabb2 Changed post and page rows go to editor plus code and styles cleanup
- Made the majority of the row go to the editor instead
- Removed illegal nested hyperlinks and cleaned up other markup
- Removed some feature flag code around this page and fixed styles for them
- Improved some dark mode styling
- Lots of refactoring with code and styles

refs https://github.com/TryGhost/Team/issues/2223
2022-11-08 14:29:11 +00:00
renovate[bot]
d4c0224fd8 Update dependency ember-template-lint to v4.18.0 2022-11-08 13:10:42 +00:00
Simon Backx
663b0dfeb2
🐛 Fixed ref attribute in email links (#15775)
fixes https://github.com/TryGhost/Team/issues/2025 
fixes https://github.com/TryGhost/Team/issues/2023

The `ref` attribute has changed in email links:
- We now use the site name when linking to external sites
- We blacklist facebook.com because it doesn't support ref attributes
- '-newsletter' is not repeated anymore if the newsletter name already ends with 'newsletter'
- We always sluggify the ref
- We no longer overwrite existing ref, utm_source or source parameters
2022-11-08 11:24:00 +01:00
Ronald Langeveld
6214812ac0
Added e2e test for bulk member deletion (#15730)
ref https://github.com/TryGhost/Team/issues/1446

- tests the `delete` api endpoint method for deleting a bulk set of members.
2022-11-08 17:02:55 +07:00
Ghost CI
4b7dd71851 Merged heads/v5.22.9 into main 2022-11-08 09:04:04 +00:00
Ghost CI
f274275ef3 v5.22.9 2022-11-08 09:04:01 +00:00
Fabien "egg" O'Carroll
69aa52bd8e 🐛 Handled deleted Stripe objects in the Stripe Checkout flow
closes https://github.com/TryGhost/Team/issues/2222

Whilst we were checking for Stripe objects being active, we were not
checking for them existing in Stripe. This adds handling to all read
request to Stripe in the payment link flow, so that we can gracefully
handle deleted objects.

We've also included an automated test which fails without this fix.

We've also improved the query to find Stripe Prices which will result
in less request to the Stripe API to check if it is valid.
2022-11-08 16:03:07 +07:00
Elena Baidakova
a605679bfa
Moved all code for feedback chart to one file (#15774)
closes TryGhost/Team#2143
- All logic for feedback pie chart was spread through multiple files. It
would be difficult to scale it. Now it is encapsulated in one file.
2022-11-08 09:42:32 +04:00
Naz
cc72e8f599
🐛 Fixed complimentary_plan Member imports
closes https://github.com/TryGhost/Team/issues/2219

- The CSV importer was failing when a "complimentary_plan" flag was present with a "true" value. The root of the issue was the data model change where the "id" of the Tier object is no longer a String but an ObjectID instance. It's a slight departure from previous bookshelf object behavior where 'id' property is always a string that is a stringified ObjectID.
- In the future we should unify the logic across all data access objects to either keep the convention of using a String under id property or switch to ObjectId instances.
2022-11-08 11:47:00 +07:00
renovate[bot]
8fa9f1e7e6
Update Test & linting packages 2022-11-07 20:39:48 +00:00
Hannah Wolfe
b3cafff924
Fixed duplicate settings error from data generator
- clear the settings table down before importing
- maybe we don't need to splat them all... but for now this makes importing work on top of a freshly provisioned DB
2022-11-07 16:53:02 +00:00
Hannah Wolfe
dc6b308e37
Added extra logging to improve dev exp
- this takes a while, but it was hard to tell what the script was doing and if I should still wait
- tried to make it a little clearer, and have a green message at the end
2022-11-07 16:53:01 +00:00
Ghost CI
92c3d1e933 Merged heads/v5.22.8 into main 2022-11-07 16:13:43 +00:00
Ghost CI
5f9e354cae v5.22.8 2022-11-07 16:13:40 +00:00
Simon Backx
2a2f5cca50
🐛 Fixed source tracking using cached value (#15778)
refs https://ghost.slack.com/archives/C02G9E68C/p1667834794676479

- When enabling tracking, it could be the case that the server is ignoring the attributions because of the cached setting value.
- When disabling tracking, the frontend should take care of not
collecting new tracking information to the server, but still the backend value should be used as a fail-safe.
2022-11-07 16:55:17 +01:00
Simon Backx
3048c7e790 🐛 Fixed sending feedback on email only posts
fixes https://github.com/TryGhost/Team/issues/2220

`Post.findOne` is filtering by status 'published' by default. 'sent' isn't 'published' so we throw a 404 error when trying to send feedback to a 'sent' post.
2022-11-07 16:27:43 +01:00
Simon Backx
7cefd4f70b
Updated ghost head test to ignore Portal/Search version (#15777)
fixes https://github.com/TryGhost/Team/issues/2152

When updating the Portal of Search version, the snapshots will now
remain the same.
2022-11-07 15:09:26 +01:00
Simon Backx
231ceedc72
Readded activity feed pagination tests (#15776)
fixes https://github.com/TryGhost/Team/issues/2218

The test should run a lot faster now.
2022-11-07 15:08:56 +01:00
Elena Baidakova
b526c4b719
Add tests to tabs and events pagination (#15757)
closes TryGhost/Team#2128
2022-11-07 16:32:06 +04:00
Aileen Nowak
f2c0bff9df Updated <GHBillingIframe> to not leak event listeners
no issue
refs dac5cca899

- added cleanup of the `message` event handler added to `window` when the component is destroyed
- added a guard to the event handler method to abort early if a message is received whilst the component is being destroyed
- updated Billing Service and `<GHBillingIframe>` to not use `@classic` decorator
2022-11-07 11:59:14 +00:00
Ghost CI
1575304627 Merged heads/v5.22.7 into main 2022-11-07 10:46:01 +00:00
Ghost CI
96aa0e6ba6 v5.22.7 2022-11-07 10:45:58 +00:00
Fabien "egg" O'Carroll
65a4eb5eb6 🐛 Fixed upgrading Subscriptions to new Tiers
refs https://github.com/TryGhost/Team/issues/2204

This was found during Tiers flows testing, the logic for fetching
price information from Tiers had not been updated to use the new Tiers
package and Payments service. This only affects Tiers created since 5.22.x
2022-11-07 17:42:32 +07:00
Naz
6989d08b19
Fixed validation for Members API newsletters endpoint
refs https://github.com/TryGhost/Toolbox/issues/465
refs 31546a6fd3/packages/admin-api-schema/lib/schemas/members.json (L93-L103)

- Updated Members API newsletter validation to match the subset of Admin API's members validation schema.
2022-11-07 17:18:36 +07:00
Elena Baidakova
aa5d8655aa
🐛 Fixed icons size for Outlook (#15772)
closes TryGhost/Team#2167
2022-11-07 14:18:23 +04:00
Naz
ff8e30076d
Fixed typo 2022-11-07 15:23:50 +07:00
renovate[bot]
12023804de
Update dependency eslint to v8.27.0 2022-11-07 01:32:41 +00:00
leonyangela
8c0b5520ce
Added e2e tests for post.rescheduled webhook (#15735)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-11-05 13:52:03 +00:00
leonyangela
e8d8e07dad
Added e2e tests for page.rescheduled webhook (#15736)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-11-05 13:51:03 +00:00
Ghost CI
81566aca88 v5.22.6 2022-11-04 15:00:38 +00:00
Kevin Ansfield
6a573d4511
Added lexical post support to email renderer (#15767)
closes https://github.com/TryGhost/Team/issues/2207

- adds conditional to the post email serializer to switch between
`mobiledocLib` and `lexicalLib` depending on which format the post
contains
2022-11-04 11:19:40 +00:00
Sanne de Vries
2aa0ccde4f Fixed button group padding on email preview screen
No ref
2022-11-04 17:41:19 +07:00
Kevin Ansfield
91c3c9eece Fixed lexical editor not loading
refs https://github.com/TryGhost/Ghost/pull/15763

- the config service no longer exists, we need to use the object registered at `config:main` instead to grab the editor url
2022-11-04 09:25:52 +00:00
Daniel Lockyer
c32a013087
Merged v5.22.5 into main
v5.22.5
2022-11-04 13:05:33 +07:00