Commit Graph

32555 Commits

Author SHA1 Message Date
Ghost CI
e82ed951f4 v5.33.3 2023-02-01 11:07:19 +00:00
Kevin Ansfield
3c695064bd
🐛 Fixed blank email previews when opening from member activity feeds (#16207)
refs https://github.com/TryGhost/Team/issues/2506

`email` objects no longer contain a `html` field and the fallback logic in the email preview modal was failing resulting in a 404 from trying to fetch an email preview using the email id rather than a post id.

- added quick-fix to the preview modal logic to use `data.post_id || data.id` for generating the preview URL (previous logic never expected to reach the fallback when working with an email record)
2023-02-01 09:52:45 +00:00
Simon Backx
4f889586ad
🐛 Fixed email header image width not set (#16210)
refs
https://ghost.slack.com/archives/CTH5NDJMS/p1675182725388589?thread_ts=1675181248.903819&cid=CTH5NDJMS

Missing dependency was causing image widths not set
2023-01-31 18:51:36 +01:00
Ghost CI
444ca6f5e5 v5.33.2 2023-01-31 14:37:44 +00:00
Naz
25d81c99ca
Fixed {{price}} helper to render empty instead of throwing
refs https://github.com/TryGhost/Toolbox/issues/497
refs fb7532bf5d

- We downgraded the 'GS090-NO-PRICE-DATA-CURRENCY-CONTEXT' rule in gscan to non-fatal, meaning Ghost should not be throwing an error but instead render an empty value for {{price}} helper when price data is empty.
- For example, a legacy syntax like this: '{{price currency=@price.currency}}' should not cause a page render error but return an empty price string.
- The pattern of returning an empty string instead of crashing is used in other helpers like {{img_url}} and and {{url}}
2023-01-31 22:14:43 +08:00
Ghost CI
249942892a v5.33.1 2023-01-30 16:18:14 +00:00
Simon Backx
b50e3915ea 🐛 Fixed HTML escaping of feature_image_caption in newsletters
no issue

feature_image_caption was escaped in the new email stability flow, while that should not happen (bold/underline/...).
2023-01-30 16:58:59 +01:00
Fabien 'egg' O'Carroll
8a8bd60d1c 🐛 Fixed newsletter resending showing incorrect recipient data
closes https://github.com/TryGhost/Ghost/issues/16125

We weren't taking into account any existing email segment set on the
post. This is usually not an issue because during the publishing flow
the post.emailSegment and the selectedRecipientFilter are kept in sync,
but it becomes and issue when the email fails to send and is later
retried - we now have an inconsistency between the two values.
2023-01-30 16:58:47 +01:00
Ghost CI
829c325e51 v5.33.0 2023-01-27 16:00:43 +00:00
John O'Nolan
d4725bfe87
Updated email tips copy 2023-01-26 13:12:03 -04:00
Simon Backx
c798f383f9 🐛 Fixed not reactivating email analytics jobs
no issue

When a site doesn't have any emails on boot, it doesn't schedule the email analytics job. With this change, the new email flow will also restart that job after an email has been created.
2023-01-26 17:35:45 +01:00
Simon Backx
6631071dd3
Improved handling large amounts of email events (#16189)
refs https://github.com/TryGhost/Team/issues/2486

Stop the event fetching loop as soon as we receive events that were
created later then when we started the loop. This ensures that we don't
miss events if we receive a giant batch of events that take a long time
to process.
2023-01-26 16:06:15 +01:00
Daniel Lockyer
672d6b3f90
Added migration label to PRs containing migrations
- this helps us to filter PRs for migrations in the future
2023-01-26 15:46:47 +01:00
Aileen Booker
488d9bb135
Added referrals invite notification (#16187)
no issue

- Ghost users that make >= $100 MRR will see a dismissible notification that invites them to the Ghost Referral program
- Only applies to Admin and Owner users and when Stripe is setup and connected in live mode
- By saving a `referralInviteDismissed` property to the users' `accessibility` JSON object we can determine if the notification has been dismissed and won't show it again
- Added new `gh-referral-invite` component
2023-01-26 14:42:11 +00:00
Peter Zimon
63d216c321
Email debug updates (#16185)
no refs.

This commit fixes a couple of UX issues on the email debug screen:

- shows [...] button only for errors actually longer than the available
space to avoid confusion about where there's more error text
- use actual avatars instead of fake red/blue dots to make it consistent
with the rest of the app
- adds click through to member details screen to easily access member
data if needed
- updates text select for provider ID for easier copying
- removes unused "Download full error message" icon
2023-01-26 15:12:26 +01:00
renovate[bot]
bac75b5d1d Update peter-evans/create-or-update-comment digest to e0e8aa0 2023-01-26 12:46:01 +01:00
Naz
d3ff4348c8
Fixed test name as content version header is always present
refs 9ba251238a

- The test name should have been updated along with referenced change.
2023-01-26 19:20:15 +08:00
Steve Larson
a3064d95cb
completely blocked external requests in Webmentions tests (#16186)
no issue
-had timeout issues in test suite
-tests were still doing dns lookup via external request
2023-01-25 10:43:57 -06:00
Daniel Lockyer
693db59f73
Merged v5.32.0 into main
v5.32.0
2023-01-25 15:34:26 +01:00
Ghost CI
b1b24a6884 v5.32.0 2023-01-25 14:32:26 +00:00
Simon Backx
2d11c29695
🐛 Fixed email segment generation (#16182)
fixes https://github.com/TryGhost/Team/issues/2484

The flow only send the email to segments that were targeted in the email
content. But if a part of the email is only visible for `status:free`,
that doesn't mean we don't want to send the email to `status:-free`.
This has been corrected in the new email flow.
2023-01-25 14:59:56 +01:00
Simon Backx
846d033e20
Improved email error logging (#16184)
no issue

Logs errors to Sentry and adds error codes.
2023-01-25 14:59:49 +01:00
Simon Backx
5e1e6c9863
Improved email error logging (#16184)
no issue

Logs errors to Sentry and adds error codes.
2023-01-25 14:57:10 +01:00
Simon Backx
f4c55d123c
🐛 Fixed email segment generation (#16182)
fixes https://github.com/TryGhost/Team/issues/2484

The flow only send the email to segments that were targeted in the email
content. But if a part of the email is only visible for `status:free`,
that doesn't mean we don't want to send the email to `status:-free`.
This has been corrected in the new email flow.
2023-01-25 14:56:37 +01:00
Simon Backx
fc990e856a
Reduced email error messages (#16183)
fixes https://github.com/TryGhost/Team/issues/2487
2023-01-25 14:27:35 +01:00
Simon Backx
27619dd8a7
🐛 Reduced concurrency when fetching Mailgun events (#16176)
refs https://github.com/TryGhost/Team/issues/2482

This change adds a small sleep in between dispatching events in the
worker thread that reads the events from Mailgun. That should reduce the
amount of queries we fire parallel to each other and could cause the
connection pool to run out of connections.

It also reduces the amount of concurrent sending to 2 from 10. Also to
make sure the connection pool doesn't run out of connections while
sending emails, and to reduce the chance of new connections falling back
on a (delayed) replicated database.
2023-01-25 14:26:41 +01:00
Ronald Langeveld
dd74f42376
Added mentions email notifications (#16170)
closes https://github.com/TryGhost/Team/issues/2429

- sends email notifications to staff users when their site receives a Webmention.
- currently behind a flag, that can be toggled in the labs settings.
2023-01-25 21:10:29 +08:00
Djordje Vlaisavljevic
c630fae60e Fixed dark mode colors
refs https://github.com/TryGhost/Team/issues/2434
2023-01-25 13:01:39 +00:00
Djordje Vlaisavljevic
03593805d5 Hooked up recent mentions widget
refs https://github.com/TryGhost/Team/issues/2481
2023-01-25 12:47:48 +00:00
Djordje Vlaisavljevic
f0cf740df5 Changed ordering of mentions
refs https://github.com/TryGhost/Team/issues/2434
2023-01-25 12:47:48 +00:00
Simon Backx
17e0c0b856
Reduced email error messages (#16183)
fixes https://github.com/TryGhost/Team/issues/2487
2023-01-25 13:20:50 +01:00
Simon Backx
4b0ca9399d 🐛 Reduced concurrency when fetching Mailgun events (#16176)
refs https://github.com/TryGhost/Team/issues/2482

This change adds a small sleep in between dispatching events in the
worker thread that reads the events from Mailgun. That should reduce the
amount of queries we fire parallel to each other and could cause the
connection pool to run out of connections.

It also reduces the amount of concurrent sending to 2 from 10. Also to
make sure the connection pool doesn't run out of connections while
sending emails, and to reduce the chance of new connections falling back
on a (delayed) replicated database.
2023-01-25 13:07:01 +01:00
Rishabh Garg
503a9ebe51
🐛 Fixed invalid expiry for member tier subscriptions (#16174)
refs https://github.com/TryGhost/Team/issues/2476

When upgrading from a Complimentary subscription with an expiry, to a paid Subscription of the same Tier, the Member was eventually losing access to the Tier when the complimentary subscription expires as the `expiry_at` on the mapping was not removed. This change fixes the code by setting expiry as null when a member upgrades their subscription to paid. This also adds 2 migrations to fix any side-effects on existing sites -

- Removed invalid expiry tier expiry date for paid members
- Restored missing tier mapping for paid members
2023-01-25 12:29:27 +01:00
Daniel Lockyer
1d32931d0a
Revert "Added email snapshots for API versioning tests (#16139)"
- this reverts commit 85051199e3
- the tests here rely on dynamic content (the Ghost version number)
2023-01-25 12:29:27 +01:00
Daniel Lockyer
977c95157a
Removed flaky test
refs https://ghost.slack.com/archives/C02G9E68C/p1674558376712339

- this test is also flaky and causing random failures
2023-01-25 11:41:59 +01:00
renovate[bot]
8123f883bd Update dependency @types/express to v4.17.16 2023-01-25 11:28:02 +01:00
Rishabh Garg
a81620e37d
🐛 Fixed invalid expiry for member tier subscriptions (#16174)
refs https://github.com/TryGhost/Team/issues/2476

When upgrading from a Complimentary subscription with an expiry, to a paid Subscription of the same Tier, the Member was eventually losing access to the Tier when the complimentary subscription expires as the `expiry_at` on the mapping was not removed. This change fixes the code by setting expiry as null when a member upgrades their subscription to paid. This also adds 2 migrations to fix any side-effects on existing sites -

- Removed invalid expiry tier expiry date for paid members
- Restored missing tier mapping for paid members
2023-01-25 13:59:43 +05:30
renovate[bot]
270d2b26e5 Update sentry-javascript monorepo to v7.33.0 2023-01-25 08:40:51 +01:00
renovate[bot]
cbdd866dc7 Update dependency @playwright/test to v1.30.0 2023-01-25 08:40:36 +01:00
Aileen Booker
e243b583f6
Added Stripe guide to Stripe connect modal (#16178)
closes https://www.notion.so/ghost/Promote-Stripe-Guide-in-admin-a5740ce2afd7413bae7e1245cfc4d9ce

- Added a guide to Ghost Resources after successful connection with Stripe
- Updated modal layout
- Fixed bug where template condition was listening to wrong task descriptor and rendering a flash in between running and finished state
2023-01-24 18:55:16 +00:00
Djordje Vlaisavljevic
3dc85b0397 Added static Mentions widget behind the flag
refs https://github.com/TryGhost/Team/issues/2481
2023-01-24 15:55:37 +00:00
Cathy Sarisky
9db27cfd50
remove hardcoded values from Portal (#15661)
Portal currently has a Globals.js file that spells out all the colors in use in Portal, which should make it easy to customize the portal colors to match the chosen theme. There are a bunch of hardcoded values and this PR deals with those. The final outcome of these changes is absolutely invisible.

Co-authored-by: Peter Zimon <zimo@ghost.org>
2023-01-24 13:23:11 +01:00
Fabien "egg" O'Carroll
48e9393159 Removed flaky test
This test is failing because the `sleep` isn't long enough. Removing this test
until we've refactored to use the jobs service, at which point we can remove the
sleep and wait for the job to be complete.
2023-01-24 18:50:04 +07:00
Fabien "egg" O'Carroll
169eb6046e Fixed RoutingService checks for resource existence
We were incorrectly handling a "no resource found" return value from the
ResourceService, instead of an object with `null` values, we were expecting a
`null` value - so we were considering all URL's to be pointing toward a
resource.
2023-01-24 18:00:52 +07:00
Rishabh Garg
88979c852b
Updated email sending to remove invalid recipient emails (#16171)
closes https://github.com/TryGhost/Team/issues/2388

We have seen examples of sites with member emails that have invalid characters that can cause an entire email send to fail, or just cause a failure to those addresses. The issue that allowed members with invalid email address to be saved was patched earlier, but its possible there are still sites that contain some of those invalid email addresses.

This change updates new sending service to filter out the recipients with invalid email address before passing them to mail provider, so these rogue addresses don't affect the whole batch in anyway. We also trim the recipient emails to clear out any spaces first, which is the most likely culprit.

- uses new email validator that detects invalid email addresses with special chars
2023-01-24 16:13:10 +05:30
Fabien "egg" O'Carroll
9df131ee5a Checked for existence of page via a network request
refs https://github.com/TryGhost/Team/issues/2466

Now that we're checking for resources at the URL and rejecting if
there isn't one found, we want to make sure that we can handle pages
which are not a resource.

The idea here is to make a HEAD request to determine whether or not
the page exists. We don't need the full response so HEAD saves us some
bandwidth and we allow both 2xx and 3xx status codes because Ghost has
redirects to add missing trailing slashes, which may not be present in
the URL we're passed.
2023-01-24 16:17:40 +07:00
Fabien "egg" O'Carroll
919d0a80c0 Checked for existence of a resource to determine page existence
refs https://github.com/TryGhost/Team/issues/2466

The existing implementation was a very basic check to get us to the
first milestone. By checking if the page points to a resource we can
know for sure the URL exists on the site.
2023-01-24 16:17:40 +07:00
Naz
a22799e133
Added last_seen to authors routing config exclude
refs https://github.com/TryGhost/Toolbox/issues/503

- The "last_seen" property is not used in routing calculations. Without it the routing service was triggering an expensive process on each user login.
2023-01-24 12:29:09 +08:00
Naz
62e3caba2c
Fixed route update error on attach/detach events
refs https://github.com/TryGhost/Toolbox/issues/503

- There was an error thrown due to empty "model._changed" field
- When attached or detached events (e.g. tag.attached) are sent through, their models do not contain any _changed properties. This was taken into account when checking for route related resource changes
2023-01-24 12:29:09 +08:00
Djordje Vlaisavljevic
d394ce6638 Added Mentions page empty state
refs https://github.com/TryGhost/Team/issues/2479
2023-01-23 21:42:55 +00:00