Commit Graph

19672 Commits

Author SHA1 Message Date
renovate[bot]
89a24c3e8b
🐛 Fixed rare rendering issue of lists appearing as headings (#19511)
closes https://github.com/TryGhost/Product/issues/4247

- bumps `@tryghost/kg-default-transforms` with a fix to our de-nesting transform so ListNode is no longer ignored as a badly nested child node which can occur through copy/paste from other editors

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 07:19:38 +00:00
renovate[bot]
ecd54b1a63 Update dependency mysql2 to v3.7.1 2024-01-18 00:28:28 +00:00
renovate[bot]
1ee784cf20 Update dependency terser to v5.27.0 2024-01-17 16:17:43 +00:00
Simon Backx
f3c1366406
🐛 Fixed searching posts in member filters (#19505)
fixes PROD-201

The issue was caused because we were searching the 'name' field instead of the 'title' field.

This also increases the performance when loading the posts:
- Makes sure no relations are loaded
- Only return the fields we actually need
- Stop using limit=all, and replaced it with network based search
2024-01-17 16:06:06 +00:00
Kevin Ansfield
957b9f31d4
Fixed type error when logging editor error (#19504)
refs https://github.com/TryGhost/Ghost/pull/19284

- previous commit had only partially rolled back usage of `errorInfo` variable but it wasn't caught because the line in question has linting disabled
2024-01-17 13:39:15 +00:00
Simon Backx
a60704c588
Revert "Added support for "Refresh Ahead" caching strategy" (#19502)
Reverts TryGhost/Ghost#19499
2024-01-17 13:12:58 +00:00
Fabien 'egg' O'Carroll
aaaa3ba797
Added support for "Refresh Ahead" caching strategy (#19499)
The main changes are:
- Updating the pipeline to allow for doing a background refresh of the
cache
- Remove the use of the EventAwareCacheWrapper for the posts public
cache

### Background refresh

This is just an initial implementation, and tbh it doesn't sit right
with me that the logic for this is in the pipeline - I think this should
sit in the cache implementation itself, and then we call out to it with
something like: `cache.get(key, fetchData)` and then the updates can
happen internally.

The `cache-manager` project actually has a method like this called
`wrap` - but every time I've used it it hangs, and debugging was a pain,
so I don't really trust it.

### EventAwareCacheWrapper

This is such a small amount of logic, I don't think it's worth creating
an entire wrapper for it, at least not a class based one. I would be
happy to refactor this to use a `Proxy` too, so that we don't have to
add methods to it each time we wanna change the underlying cache
implementation.
2024-01-17 14:00:24 +01:00
Ghost CI
3b0f99d455 v5.76.0 2024-01-17 09:16:09 +00:00
Kevin Ansfield
100e7b70c6
Added TK Reminders feature (#19491)
no issue

- keep an eye on on https://ghost.org/changelog/ for full details
2024-01-17 08:57:35 +00:00
renovate[bot]
c37642a67b Update dependency json-stable-stringify to v1.1.1 2024-01-16 23:05:24 +00:00
Simon Backx
bc79293594
Fixed generating offers in data generator (#19495)
no issue

The data generator created an offer for the free product. This caused an
error in admin UI because it couldn't find the tier for the offer.

This fixes the issue in both the data generator and the admin UI.
2024-01-16 13:53:34 +00:00
Paul Davis
9d7dcc5aff
Send Ghost version to migrator tool (#19494) 2024-01-16 13:10:39 +00:00
Kevin Ansfield
f88fdfe363
Increased test timeout for HTML transform unit tests (#19490)
closes https://github.com/TryGhost/Product/issues/4086

- JSDOM require on CI has been found to occasionally be very slow causing random timeouts
- doubled test time to eliminate the noise
2024-01-16 11:16:46 +00:00
renovate[bot]
a1158a5595 Update Types packages 2024-01-15 21:04:04 +01:00
Simon Backx
285a684ef6
Updated data generator to support >2M members (#19484)
no issue

The data generator went out of memory when trying to generate fake data
for > 2M members. This adds some improvements to make sure it doesn't go
out of memory.

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2024-01-15 15:23:49 +00:00
Simon Backx
709a0cf3c4
🐛 Fixed error logging crash when email recipients count if off by 1% (#19485)
no issue

When creating the batches when sending an email, we log a message to
Sentry when there is an unexpected offset of 1% between creating the
email and actually creating the batch recipients. We used a method that
was not mapped in our Sentry proxy.

Location of error: ghost/email-service/lib/BatchSendingService.js:286
2024-01-15 16:21:11 +01:00
Michael Barrett
ed0762fb51
Removed usage of yg when using NQL (#19287)
refs https://github.com/TryGhost/NQL/pull/73

The referenced PR removes `yg` from the parsed NQL output, so we also
need to remove any usage of it in Ghost
2024-01-15 14:40:01 +00:00
renovate[bot]
b6cf09130f Update dependency html-validate to v8.9.1 2024-01-15 09:42:36 +01:00
renovate[bot]
524f73c545 Update dependency socket.io to v4.7.4 2024-01-14 20:54:29 +00:00
renovate[bot]
eeea991654 Update dependency html-validate to v8.9.0 2024-01-14 09:18:35 +01:00
Steve Larson
039df67990
Fixed dashboard stats member count (#19478)
refs e27a5c1
- should not be pluralized
2024-01-13 19:07:39 +00:00
Simon Backx
d468563feb
Replaced menu members count stats API with members count cache (#19476)
no issue

The members stats API is a lot more slower than the normal members count
cache, and we use the members count cache in a lot more places. So we
can cache it more.
2024-01-13 20:05:29 +01:00
Simon Backx
1f2857e0e4
Reduced amount of member count queries when opening the editor (#19474)
no issue

When we open the editor, we fire 4 requests to fetch member counts. This
commit fixes this by replacing those calls with the members count cache
service.
2024-01-13 19:13:49 +01:00
Kevin Ansfield
2c4052b332
Improved API speed of members count cache queries (#19475)
no issue

- the members API endpoint by default adds `order by created_at` to the SQL queries which creates unnecessary overhead when we only care about a count because MySQL sorts the table before querying the single member
- specifying an explicit `order by id` overrides the default API behaviour
- locally with 2 million members the query times drop from >5sec to ~1sec
2024-01-13 19:12:16 +01:00
Steve Larson
e27a5c1e23
Removed duplicate member count queries in admin (#19473)
no refs
- member_count endpoint was queried multiple times on load
- moved to collectively use the member stats service
- prevented multiple tasks from being queued up to return count
2024-01-13 18:40:28 +01:00
Daniel Lockyer
be6b9e437f Refactored fetching schema tables in data generator
- we want to pass in the schema tables instead of cross requiring them
  from a different package because it means the package isn't standalone
  and moving the code structure around breaks the data generator
2024-01-13 18:28:14 +01:00
renovate[bot]
09921fd2b4 Update dependency @sentry/profiling-node to v1.3.5 2024-01-12 18:05:56 +00:00
renovate[bot]
84c2fe9051 Update dependency @sentry/profiling-node to v1.3.4 2024-01-11 17:05:58 +00:00
Zabriskije
ed4d0b8356
Updated Italian translations (#19389)
Translated new lines in `portal.json`
2024-01-11 05:17:14 -05:00
renovate[bot]
78e2c10d3c Update dependency newrelic to v11.9.0 2024-01-10 22:17:49 +00:00
renovate[bot]
3f9598d14c Update dependency @sentry/profiling-node to v1.3.3 2024-01-08 21:57:00 +00:00
renovate[bot]
0b0c177952 Update dependency mysql2 to v3.7.0 2024-01-08 01:45:46 +00:00
Daniel Lockyer
18599fb9ce
Merged v5.75.3 into main
v5.75.3
2024-01-05 15:24:59 +01:00
Ghost CI
f21f025659 v5.75.3 2024-01-05 13:58:49 +00:00
Simon Backx
d2cb23c3fa
Wired up Docker setup script and increased data generation performance (#19420)
ref PROD-233

- Stored whether Docker is used in the config files
- When running `yarn setup`, any existing Docker container will be
reset. Run with `-y` to skip the confirmation step.
- `yarn setup` will always init the database and generate fake data
- Increased amount of default generated data to 100,000 members + 500
posts.
- Made lots of performance improvements in the data generator so we can
generate the default data in ±170s
2024-01-05 13:42:30 +00:00
Daniel Lockyer
d2ab091599
Updated snapshots for the new year
- these shouldn't be hardcoded but it changes so infrequently that we
  can just update the snapshots for now and then fix it at a later point
2024-01-05 13:31:07 +00:00
Daniel Lockyer
a667b160c1
Lazyloaded @sentry/profiling-node dependency
- we don't need to load this if we haven't configured Node profiling to occur
- this might help fix random segfaults we've been seeing in CI, which
  only started occurring after this dependency was added
2024-01-05 13:30:21 +00:00
Michael Barrett
b639993a1b
Removed Sentry Express integration (#19443)
no refs

Removed Sentry Express integration as it is not compatible with Ghost's
use of Express
2024-01-05 13:02:29 +00:00
Michael Barrett
06a413c807
Updated Sentry env to use PRO_ENV when available (#19441)
refs
[ARCH-33](https://linear.app/tryghost/issue/ARCH-33/fix-sentry-environment)

To ensure that we are correctly identifying the environment that data is
being sent to Sentry from, we can use the `PRO_ENV` environment variable
if it is available. This will be set to `production` in production and
`staging` in staging. If `PRO_ENV` is not available, we will fall back
to retrieving the environment from config (`env`)
2024-01-05 13:02:29 +00:00
Chris Raible
0feebfcf63
Added Sentry Profiling to Ghost server (#19319)
refs ARCH-29

- Added Sentry Profiling to collect more detailed performance data on
the backend.
- This feature is opt-in behind a config. To enable profiling, first
enable tracing with `sentry.tracing.enabled: true`, then set
`sentry.profiling.enabled: true` and `sentry.profiling.sampleRate` to a
decimal number between 0 and 1.
2024-01-05 12:57:18 +00:00
Michael Barrett
bd6bfe13c0
Added custom Sentry integration for Knex.js (#19315)
no refs

Added custom Sentry integration for Knex.js to trace database queries in
Sentry
2024-01-05 12:54:26 +00:00
Chris Raible
f91d046f5e
Added Sentry performance monitoring to Ghost Server (#19243)
refs ARCH-21

- We currently have NewRelic setup for a few of our largest customers
for monitoring performance, but it is too expensive to enable across all
sites
- Sentry has similar (but simpler) performance monitoring tools to keep
track of response times that are available to us for free, but we just
haven't configured them
- This PR sets up Sentry Performance monitoring for API requests so we
can have one place for monitoring errors + performance so we can stay on
top of response times more easily.
- Tracing is disabled by default, so there is no additional overhead
unless `sentry.tracing.enabled` is set to `true` in the site's config.
Additionally, `sentry.tracing.sampleRate` should be set to a decimal
value between 0 and 1. This value defaults to 0 to avoid accidentally
blowing through quota, and requires a value to explicitly be set in
order to send the traces to Sentry.
2024-01-05 12:53:36 +00:00
Michael Barrett
1263cf148e
Updated Sentry env to use PRO_ENV when available (#19441)
refs
[ARCH-33](https://linear.app/tryghost/issue/ARCH-33/fix-sentry-environment)

To ensure that we are correctly identifying the environment that data is
being sent to Sentry from, we can use the `PRO_ENV` environment variable
if it is available. This will be set to `production` in production and
`staging` in staging. If `PRO_ENV` is not available, we will fall back
to retrieving the environment from config (`env`)
2024-01-05 12:10:39 +00:00
renovate[bot]
1fa2a11cbc Update dependency knex-migrator to v5.1.7 2024-01-05 12:32:45 +01:00
renovate[bot]
85f3ef3d14 Update dependency postcss to v8.4.33 2024-01-05 11:05:49 +01:00
renovate[bot]
ce5466d017 Update dependency sqlite3 to v5.1.7 2024-01-05 11:05:15 +01:00
renovate[bot]
1e6267deac Update dependency mailgun.js to v9.4.1 2024-01-04 17:53:34 +00:00
Michael Barrett
2d28dbe2fd
Removed Sentry Express integration (#19443)
no refs

Removed Sentry Express integration as it is not compatible with Ghost's
use of Express
2024-01-04 14:31:57 +00:00
renovate[bot]
a93e288253 Update dependency i18next to v23.7.16 2024-01-04 13:47:04 +00:00
Kevin Ansfield
46d6c56763
Added ResizeObserver loop error to Sentry ignore list (#19440)
closes https://github.com/TryGhost/Product/issues/4238

- the error often comes from extensions that we can't control and doesn't correspond to anything being broken so it's just noise
2024-01-04 10:50:15 +00:00
renovate[bot]
dc45d5285a Update dependency cssnano to v6.0.3 2024-01-04 10:44:39 +01:00
Sag
1f5a42d34c
Added webmentions endpoint to robots.txt disallow (#19433)
fixes PROD-290

- in order to receive webmentions (e.g. recommendations), Ghost sites
expose a /webmentions/receive endpoint. This endpoint is wrongly being
indexed by Google as a regular page, and causes indexing errors in
Google Search Console
2024-01-03 17:30:37 +00:00
renovate[bot]
668e51e631 Update dependency newrelic to v11.8.0 2024-01-03 16:20:33 +00:00
Sag
21397a4518
Added [test] prefix to test emails (#19431)
fixes GRO-157

- the [TEST] prefix was removed unintentionally during the rewrite of
the email sending service
2024-01-03 16:08:56 +00:00
renovate[bot]
d89dace67f Update dependency i18next to v23.7.15 2024-01-03 13:29:42 +00:00
renovate[bot]
ebcf0ad508 Update dependency i18next to v23.7.14 2024-01-02 22:48:14 +00:00
renovate[bot]
56fd992a1f Update dependency image-size to v1.1.1 2024-01-02 17:41:16 +00:00
renovate[bot]
9e2558931f
🐛 Fixed signup card background color and editor crash when typing :, or :| (#19421)
refs https://github.com/TryGhost/Ghost/issues/19282
refs https://github.com/TryGhost/Koenig/pull/1136

- fixes signup card background color
- fixes crash when typing `:,` or `:|` or similar
2024-01-02 17:26:55 +00:00
renovate[bot]
04e4e807c2 Update dependency i18next to v23.7.13 2024-01-02 12:14:25 +00:00
Simon Backx
54e3abfbc2
Added generator referrer attribution for paid subscriptions (#19419)
ref PROD-244
2024-01-02 11:29:24 +00:00
renovate[bot]
17e03a6eca Update dependency @babel/plugin-proposal-decorators to v7.23.7 2024-01-02 09:48:42 +01:00
renovate[bot]
a2c28f2036 Update dependency ember-auto-import to v2.7.2 2024-01-02 09:47:01 +01:00
renovate[bot]
43dbc4ca89 Update dependency cssnano to v6.0.2 2024-01-02 09:46:50 +01:00
renovate[bot]
e90e403aca Update dependency ws to v8.16.0 2024-01-02 08:39:49 +00:00
renovate[bot]
fb0e87014e Update dependency html-validate to v8.8.0 2024-01-02 09:39:12 +01:00
renovate[bot]
8a3ec6a447 Update dependency cookies to v0.9.1 2024-01-02 09:38:11 +01:00
Daniel Lockyer
a86bf46347 Updated snapshots for the new year
- these shouldn't be hardcoded but it changes so infrequently that we
  can just update the snapshots for now and then fix it at a later point
2024-01-02 09:07:55 +01:00
Daniel Lockyer
d21ab1aa4e Lazyloaded @sentry/profiling-node dependency
- we don't need to load this if we haven't configured Node profiling to occur
- this might help fix random segfaults we've been seeing in CI, which
  only started occurring after this dependency was added
2024-01-02 09:07:55 +01:00
renovate[bot]
9f2365209d Update dependency image-size to v1.1.0 2023-12-28 15:32:30 +00:00
renovate[bot]
efb2b07c60 Update dependency fastq to v1.16.0 2023-12-18 19:47:14 +00:00
renovate[bot]
858b853085 Update metascraper to v5.42.0 2023-12-18 09:41:00 +00:00
renovate[bot]
bce90d5337 Update dependency newrelic to v11.7.0 2023-12-14 22:01:01 +00:00
Simon Backx
4c9d08bf03 Fixed data generator in SQLite 2023-12-14 18:30:45 +01:00
Simon Backx
70b991cc1c Improved subscriptions in data generator
ref PROD-244

- Added support for canceled subscriptions and different subscription statusses
- Removed generation of susbcriptions table (not used)
- Added old canceled subscriptions for free members
- Added both positive and negative MRR events
2023-12-14 18:30:45 +01:00
Simon Backx
5351b88b59 Added random expiry date for complimentary subscriptions in data generator
ref PROD-244
2023-12-14 18:30:45 +01:00
Simon Backx
e1ef7c44d8 Fixed creating stripe subscriptions for complimentary members in data generator
ref PROD-244
2023-12-14 18:30:45 +01:00
Simon Backx
58d1412d9b Added referrer attribution and fixed data generator for scheduled posts
ref PROD-244

Scheduled posts should have a published_at set to the future
2023-12-14 18:30:45 +01:00
Simon Backx
58f23726fe Added recommendation click and subscribe events to data generator
ref PROD-244
2023-12-14 18:30:45 +01:00
Simon Backx
50788a78df Added recommendations data generator
ref PROD-244
2023-12-14 18:30:45 +01:00
Simon Backx
6f3a22d0a7 Added email_recipient_failures to data generator
ref PROD-244
2023-12-14 18:30:45 +01:00
Simon Backx
54eb3e5b08 Added generated amount to debug logs 2023-12-14 18:30:45 +01:00
Simon Backx
8a01e7a076 Improved batch and recipient data generation
ref PROD-244

Instead of generating one batch with all recipients, we now will generate
one batch per 1000 members and distribute the recipients across them.
2023-12-14 18:30:45 +01:00
Simon Backx
52566dc1e0 Wrapped data generator data creation in transaction function
ref PROD-233

Errors were not handled properly because of a missing rollback and try/catch.

Using a function is easier generally.

Also added ignored contraint checks to increase performance a tiny bit.
They ended up not mattering much, so we can consider to remove them again.
2023-12-14 18:30:45 +01:00
Simon Backx
a3bbd579dd Improved data generator clear data performance
ref PROD-233
2023-12-14 18:30:45 +01:00
EchoBilisim
6b50585a0e
Update portal.json (#19372)
Incorrect translations and missing translations completed.
2023-12-14 09:25:12 -05:00
Daniel Lockyer
47f50e2d35
Merged v5.75.2 into main
v5.75.2
2023-12-14 13:51:23 +01:00
Ghost CI
c2ad349b78 v5.75.2 2023-12-14 12:34:56 +00:00
Kevin Ansfield
7276b975f8
🐛 Fixed editor crash when typing :,, :|, or similar
closes https://github.com/TryGhost/Ghost/issues/19375

- bumps `@tryghost/koenig-lexical` to patched version including fix for the emoji picker bug (https://github.com/TryGhost/Koenig/pull/1136)
2023-12-14 12:20:15 +00:00
Sanne de Vries
255d1b1740
Added site url link to newsletter header image (#19380)
No ref
2023-12-14 12:08:10 +00:00
renovate[bot]
a2ff5a8412 Update dependency @embroider/macros to v1.13.4 2023-12-14 12:40:22 +01:00
renovate[bot]
df2e15aa58 Update dependency ember-auto-import to v2.7.1 2023-12-14 12:40:02 +01:00
Chris Raible
a33ce7c20c
Added Sentry Profiling to Ghost server (#19319)
refs ARCH-29

- Added Sentry Profiling to collect more detailed performance data on
the backend.
- This feature is opt-in behind a config. To enable profiling, first
enable tracing with `sentry.tracing.enabled: true`, then set
`sentry.profiling.enabled: true` and `sentry.profiling.sampleRate` to a
decimal number between 0 and 1.
2023-12-13 21:53:19 -08:00
Joel DeSante
dc7e2b9261
🐛Fixed XSS vulnerability involving post excerpts (#17190)
closes https://github.com/TryGhost/Ghost/issues/17058

- Uses the lodash `escape` function.
- Avoids XSS vulnerabilities in post excerpts.
2023-12-13 15:23:48 -06:00
Shaun Roselt
b2a429437e
Added Missing German Translations (#19346)
I added missing translations for German

- [x] There's a clear use-case for this code change, explained below
- [x] Commit message has a short title & references relevant issues
- [x] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!
2023-12-13 13:38:12 -05:00
Kevin Ansfield
4ceb5dc16b
Fixed error when deleting post (#19369)
closes https://github.com/TryGhost/Product/issues/4230

- deleting a post could cause React components to trigger save tasks during teardown which then threw errors because they attempt to set properties on a deleted model instance
- added checks to the `beforeSaveTask()` to abort if the post object has been deleted
2023-12-13 17:45:23 +00:00
Kevin Ansfield
b74a611fbd
🐛 Fixed hang in editor when back button is pressed whilst feature image caption is focused (#19367)
closes https://github.com/TryGhost/Product/issues/4228

- when leaving the editor via back button the feature image caption editor's blur handler was called by the React editor component after Ember had torn down the route resulting in an attempt to use `post.set()` when `post` doesn't exist
- the error also caused Lexical to re-render to try and recover which then triggered the blur handler again resulting in an infinite loop
- adding a check to ensure `this.post` exists was enough to fix the problem
2023-12-13 17:25:00 +00:00
Daniel Lockyer
bba95ce034 Enabled persistent filesystem caching for Ember builds
fixes https://github.com/TryGhost/DevOps/issues/123

- ember-auto-import supports webpack v5 and v5 supports persistent file
  caching
- this stores a cache of built files across warm boots, so Admin built
  via `yarn dev` should be faster next time
- also ensures that recursive `node_modules` folders are emptied upon
  `yarn fix`, as the webpack cache is stored in `node_modules` under
  `ghost/admin`
- locally, this speeds up a warm build by 2x (!)
2023-12-13 16:40:18 +01:00
Peter Zimon
58d9b8e382
Update migration in settings (#19278)
refs.
7b40393d77

We're improving the usability and possibilities for publishers to
migrate from other platforms such as Substack, Medium or Mailchimp. This
PR applies changes to Ghost Settings to support the new flows, more
specifically:

- moves import and export functions out of Labs to its own setting,
directly available from search and the menu
- adds direct access to various platform migrations
- moves "Delete all content" to a dedicated setting group at the bottom
of all setting

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-12-13 16:25:29 +01:00
renovate[bot]
820c5a4175 Update dependency mailgun.js to v9.4.0 2023-12-13 11:53:07 +00:00
Daniel Lockyer
20b0890a02 Cleaned up duplicate await
- noticed whilst bouncing around the codebase
- shouldn't change anything but it gets rid of some tsserver warnings
2023-12-13 11:54:31 +01:00
Chris Raible
c90e033fcf
Added an email rendering test for all Koenig cards (#19059)
refs TryGhost/Product#4125

This PR adds two new integration tests to ensure all our Koenig cards
are rendered properly after going through the EmailRenderer. Although we
have thorough tests for the cards themselves in the Koenig repo, the
EmailRenderer does post-processing on the rendered HTML, such as
inlining CSS, which can adversely impact the rendered output of our
cards in email clients (usually Outlook).

Since email newsletters are a core feature of Ghost, these bugs are
typically fairly urgent, and since it is email, they are also quite
difficult to troubleshoot and fix. These two tests are intended to
prevent bugs of this sort, which in the past have been created by
seemingly harmless changes like bumping dependencies that are used in
the EmailRenderer.

The idea is to create a 'Golden Post' which has at least 1 of every card
from Koenig, run that post through the EmailRenderer, and take a
snapshot of the rendered HTML. In the future, if we make any changes to
the EmailRenderer or the Koenig cards themselves, this will trigger us
to carefully consider the changes, and it provides an 'expected' output
to compare our changes against.

Additionally, the second test simply checks that all cards from
`kg-default-nodes` are included in the 'Golden Post'. This protects
against any new cards that we will add in the future — as soon as we add
them to Koenig and bump `kg-default-nodes` in Ghost, this test will
fail, prompting us to add the new card to the Golden Post and update the
snapshots.

We should also run the 'Golden Post' through a test in Litmus, which
allows us to visually inspect the rendered email across many different
email clients. Ideally we would create a process to review the output of
the 'Golden Post' in Litmus whenever we update the snapshot as well.
2023-12-12 16:05:04 -08:00
renovate[bot]
3346606d77
Update dependency @tryghost/koenig-lexical to v1.0.8 (#19301)
refs https://github.com/TryGhost/Ghost/pull/19343

- bump was missed in earlier commit
2023-12-12 22:26:12 +00:00
-Nut-
876a0d6b2d
Added Thai translations (#19305)
I've just pushed a commit with the Thai translation. This should be a
sufficient translation but there is always room for improvements and a
second pair of eyes.

---------

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-12-12 16:39:24 -05:00
Shaun Roselt
0ffbc198be
Updated Missing Afrikaans Translations (#19325)
I added missing Afrikaans Translations

- [x] There's a clear use-case for this code change, explained below
- [x] Commit message has a short title & references relevant issues
- [x] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!
2023-12-12 16:36:12 -05:00
renovate[bot]
45891f83b1 Update dependency ws to v8.15.1 2023-12-12 21:10:38 +00:00
renovate[bot]
d1b41f8f0b Update dependency i18next to v23.7.9 2023-12-12 19:42:27 +00:00
Chris Raible
24910a6ef2
Added Sentry logging in BatchSendingService (#19321)
refs ARCH-25

- Added a log message if the email_count on an email differs from the
totalCount calculated while creating batches by more than 1%, so we can
investigate further.
2023-12-12 11:28:43 -08:00
Kevin Ansfield
565b9b245e
🐛 Fixed callout card not rendering all inline formats (#19343)
refs https://github.com/TryGhost/Ghost/issues/19129

- bumps Koenig packages containing fix for callout card rendering
2023-12-12 19:00:32 +00:00
Kevin Ansfield
b586b63ac9
🐛 Fixed inability to drag-select text in caption alt inputs (#19342)
refs https://github.com/TryGhost/Koenig/pull/1134

- bumps Koenig to version including fix for dragging to select text in caption alt inputs
2023-12-12 18:26:10 +00:00
Kevin Ansfield
9706754d6a
🐛 Fixed quote and aside formatting being lost in single-block snippets (#19341)
refs https://github.com/TryGhost/Product/issues/4197

- bumped Koenig packages containing fix for snippets capturing plain text when only the text of an aside or quote block is selected
2023-12-12 17:56:21 +00:00
Simon Backx
60fb2e3139
Added quantities and seed option to the data generator (#19330)
ref PROD-243
2023-12-12 12:50:55 +01:00
Jono M
2b85980302
Fixed theme template picker state syncing with AdminX (#19328)
refs PROD-235

Special case where we need to set the old theme to inactive after
activating a new theme.
2023-12-12 11:27:59 +00:00
Michael Barrett
95eaaad459
Added custom Sentry integration for Knex.js (#19315)
no refs

Added custom Sentry integration for Knex.js to trace database queries in
Sentry
2023-12-12 11:09:49 +00:00
Sanne de Vries
98ff45647c
🎨 Updated editor layout to be more mobile friendly (#19327)
Refs https://github.com/TryGhost/Ghost/issues/18690
2023-12-12 11:51:59 +01:00
Djordje Vlaisavljevic
5c19249473
Added yearly discount indicator to monthly/yearly toggle PROD-60 PROD-222 PROD 223 (#19276)
refs PROD-60, PROD-222, PROD-223, PROD-89, PROD-94

- Indicator shows up in the monthly/yearly toggle if there are any paid
tiers with yearly discount, and shows the highest discount in order to
nudge visitors towards checking out yearly plan
- A couple of smaller portal improvements: typos, spacing, alignment

---------

Co-authored-by: Simon Backx <simon@ghost.org>
2023-12-12 09:32:56 +00:00
renovate[bot]
8bc3aae20b Update dependency @babel/plugin-proposal-decorators to v7.23.6 2023-12-12 10:31:38 +01:00
Djordje Vlaisavljevic
090c8b59da
Updated Serbian translations (#17841)
refs https://github.com/TryGhost/Product/issues/2795
---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 2a6b633</samp>

This pull request improves the localization of the portal feature for
Serbian users by adding or updating translations in the `portal.json`
file.
2023-12-11 13:22:05 -05:00
Steve Larson
ccc9c9bdd8
Removed emoji picker feature flag (#19314)
closes TryGhost/Product#4109
- requires new editor packages which are bumped in this commit
2023-12-11 09:51:37 -06:00
Jono M
9ff482f985
Updated AdminX routing to work with and without a leading slash (#19312)
no issue
2023-12-11 14:43:06 +00:00
Sanne de Vries
61a91f7dbd
Flipped thumbs-down icon horizontally in email and Portal (#19306)
Refs https://github.com/TryGhost/static/pull/3
- This way the thumbs-down is facing the opposite direction as the
thumbs-up
2023-12-11 13:05:11 +00:00
Kevin Ansfield
1479c55068
🐛 Fixed video uploads hanging in editor when using iOS (#19302)
refs https://github.com/TryGhost/Koenig/issues/1121

- bumps `@tryghost/koenig-lexical` to version including fix (https://github.com/TryGhost/Koenig/pull/1122)
2023-12-11 11:27:59 +00:00
Ronald Langeveld
c969dd18a8
Revert "Fixed private mode cookie for local development (#17938)" (#19298)
This reverts commit f303eee8a4.

refs https://ghost.slack.com/archives/C0568LN2CGJ/p1702277420152709
https://linear.app/tryghost/issue/PROD-46/rss-url-for-private-mode-site-is-hardcoded
2023-12-11 09:18:03 +00:00
renovate[bot]
9fae565673 Update sentry-javascript monorepo to v7.86.0 2023-12-11 09:48:49 +01:00
renovate[bot]
1375a72fbf Update dependency html-validate to v8.7.4 2023-12-11 09:48:39 +01:00
renovate[bot]
2caf1ec93a Update dependency ws to v8.15.0 2023-12-11 03:41:38 +00:00
renovate[bot]
996ca6ac87 Update dependency ts-node to v10.9.2 2023-12-09 10:51:51 +01:00
renovate[bot]
8cbf133614 Update dependency newrelic to v11.6.1 2023-12-07 19:41:46 +00:00
renovate[bot]
b84cb87d90 Update dependency terser to v5.26.0 2023-12-07 15:59:56 +00:00
Kevin Ansfield
309aaf98aa
Added TK support to feature image caption editor (#19285)
closes https://github.com/TryGhost/Product/issues/4227

- added `@onTKCountChange` to `<KoenigLexicalEditorInput>`
  - when present the `isTKEnabled` flag will be turned on and the `<TKCountPlugin>` registered
- added `@registerAPI` support to `<KoenigLexicalEditorInput>` so we can focus the caption editor when its TK indicator is clicked
- added manual display of TK indicator for the caption input
  - default editor indicator positioning doesn't work for this input because its container is not full editor width
  - hid it by adding `overflow: hidden` to the inner caption container
  - added custom indicator button shown when we have a non-zero count
2023-12-07 15:46:23 +00:00
Kevin Ansfield
4b5718f6e3
Added error reporting when editor instances fail to load (#19284)
no issue

- recently we introduced code that broke the editor in older versions of
Safari but we weren't alerted to it until we started getting customer
reports
- we have an `ErrorBoundary` around the React editor components but this
wasn't reporting the error anywhere and simply showed an error message
- updated the boundary to report to Sentry when configured so we can
notice and fix any editor-breaking issues faster
2023-12-07 14:11:07 +00:00
Daniel Lockyer
845d3cf759 Fixed generating multiple members_newsletters records
refs https://github.com/TryGhost/DevOps/issues/119

- members_newsletters needs members_subscribe_events, but it was also
  then generating `subscriptions` records and the whole thing was really
  slow
- for now, subscriptions is not a used table so we can remove use of it
- also adds support for generating more than one subscription record
  with an 80% chance of being subscribed
2023-12-07 14:44:00 +01:00
Daniel Lockyer
db16e565bc Added --print-dependencies to data generator
refs https://github.com/TryGhost/DevOps/issues/119

- this allows you to debug the dependency chain to understand why a
  particular table is being generated
2023-12-07 14:44:00 +01:00
Daniel Lockyer
ff34a98b94 Deduplicated batch insertion code
refs https://github.com/TryGhost/DevOps/issues/119

- this function can simply call the `import` function, which performs
  the same code as we had here
- this makes the code cleaner to read and understand
2023-12-07 14:44:00 +01:00
Daniel Lockyer
76455cb64a Decreased likelihood of duplicate member emails
refs https://github.com/TryGhost/DevOps/issues/119

- we can just expand the range here so it becomes extremely unlikely to
  ever hit duplicate emails
2023-12-07 14:44:00 +01:00
Daniel Lockyer
bb99a4c394 Removed unnecessary await
refs https://github.com/TryGhost/DevOps/issues/119

- this is not needed and tsserver was flagging it up
2023-12-07 14:44:00 +01:00
Daniel Lockyer
739c690a29 Fixed generating duplicate newsletter names
refs https://github.com/TryGhost/DevOps/issues/119

- this switches away from using a static list of names in favor of ones
  generated by faker, so we don't run into duplicate names
- also minor code re-arranging
2023-12-07 14:44:00 +01:00
renovate[bot]
8197a740b1 Update dependency metascraper to v5.41.0 2023-12-07 12:36:19 +00:00
Chris Raible
1b43b5c60a
Added Sentry performance monitoring to Ghost Server (#19243)
refs ARCH-21

- We currently have NewRelic setup for a few of our largest customers
for monitoring performance, but it is too expensive to enable across all
sites
- Sentry has similar (but simpler) performance monitoring tools to keep
track of response times that are available to us for free, but we just
haven't configured them
- This PR sets up Sentry Performance monitoring for API requests so we
can have one place for monitoring errors + performance so we can stay on
top of response times more easily.
- Tracing is disabled by default, so there is no additional overhead
unless `sentry.tracing.enabled` is set to `true` in the site's config.
Additionally, `sentry.tracing.sampleRate` should be set to a decimal
value between 0 and 1. This value defaults to 0 to avoid accidentally
blowing through quota, and requires a value to explicitly be set in
order to send the traces to Sentry.
2023-12-06 15:04:35 -08:00
renovate[bot]
a87804be57 Update dependency i18next to v23.7.8 2023-12-06 20:43:02 +00:00
renovate[bot]
1c04bdbdb2 Update dependency typescript to v5.3.3 2023-12-06 21:29:30 +01:00
renovate[bot]
24f73321ce Update metascraper to v5.40.0 2023-12-06 20:10:16 +00:00
Kevin Ansfield
1071317780
Fixed TK indicators not being correct when opening post with TKs (#19263)
no issue

- bumps `@tryghost/koenig-lexical` which includes fix and performance improvement for TKs
2023-12-06 17:38:33 +00:00
Steve Larson
549aaa4c5a
Added tests for TK indicators within editor (#19262)
closes TryGhost/Product#4225
- added basic tests for TK detection in title
- added coverage for TK reminder modal popping up
2023-12-06 11:29:27 -06:00
Kevin Ansfield
8f43cc9ad2
Fixed horizontal positioning of TK indicators on wider cards (#19257)
no issue

- bumped `@tryghost/koenig-lexical` for improved positioning behaviour
2023-12-06 12:12:37 +00:00
Steve Larson
d696e8b2e2
Added support for TK tracking inside cards (#19247)
refs https://github.com/TryGhost/Product/issues/4209

- bumped Koenig packages
  - `koenig-lexical` added nested editor TK support
  - all packages dropped Node 16 support
- switched to using `isTKEnabled` prop and `<TKCountPlugin>`

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2023-12-06 11:32:36 +00:00
Simon Backx
3f6ea04c43
Added portal default plan setting (#19238)
fixes PROD-61

This adds a new default plan setting. It defaults to yearly, which is
the current default selected interval in Portal.

Behind the new portal improvements feature flag, the default plan can be
changed. It will also change automatically if the available intervals
are changed.

This PR also wires up passing the new setting to the Portal preview.
2023-12-06 11:39:58 +01:00
Simon Backx
7c8a141264 Bumped Portal to 2.37.x
no issue
2023-12-06 11:30:47 +01:00
Aileen Booker
96841a5060 Added clipboard write permission to billing iframe
no issue

- The billing app needs to be able to write to the clipboard to copy DNS values
2023-12-05 12:33:22 -04:00
Daniel Lockyer
077652e3f3 Added metrics for measuring members importer
fixes https://linear.app/tryghost/issue/PROD-199/add-metrics-for-members-importer

- we know the members importer is slow but we need metrics to prove it
- this should collect import count, error count + runtime for the
  members importer, so we can analyze the data
2023-12-05 17:07:39 +01:00
Steve Larson
96320d378a
Added TK indicator support to post title (#19231)
closes TryGhost/Product#4208
- added TK indicator to post title
- added to TK count in confirmation flow
2023-12-05 09:41:54 -06:00
Sanne de Vries
7ce5abb155
Added static modal for TK reminders (#19203)
Refs https://github.com/TryGhost/Product/issues/4218
- Moving the TK confirmation step into a small modal as a more
lightweight solution

---------

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2023-12-05 12:09:21 +01:00
renovate[bot]
351e93ebca Update dependency lib0 to v0.2.88 2023-12-04 22:09:17 +01:00
renovate[bot]
5811dcaa41 Update Types packages 2023-12-04 22:05:57 +01:00
renovate[bot]
e2a6a83fb6 Update sentry-javascript monorepo to v7.85.0 2023-12-04 22:05:42 +01:00
renovate[bot]
9cae89d361
Update dependency @tryghost/koenig-lexical to v0.5.27 (#19173) 2023-12-04 18:55:33 +00:00
Djordje Vlaisavljevic
36294c6482 Added feature flag for portal improvements
refs GRO-154
2023-12-04 18:16:23 +00:00
renovate[bot]
6d0dfbafb1 Update dependency terser to v5.25.0 2023-12-04 15:20:48 +00:00
Ahmad
4e857c4fd1
Added Arabic translation. (#16830)
I did my best in translation to Arabic. I believe it could be improved.

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-12-04 10:07:35 -05:00
Ghost CI
feb15d2273 Merged v5.75.1 into main 2023-12-04 14:56:08 +00:00
Ghost CI
9ac050dfe9 v5.75.1 2023-12-04 14:56:05 +00:00
renovate[bot]
50d40f298f Update dependency knex-migrator to v5.1.6 2023-12-04 15:21:00 +01:00
Simon Backx
e65ae2041c
🐛 Fixed deleting members with email disabled (#19222)
refs https://ghost.slack.com/archives/CTH5NDJMS/p1701688836406919

Deleting members with email disabled, results in deleting all members
due to a broken NQL filter.

The filter `(email_disabled:1)` results in selecting all members because
of the surrounding brackets, which cause a `yg` filter to be generated
by NQL which is not supported by code that handles the Mongo filters.

This is a quick fix to reduce damage, this will need a proper fix in NQL
/ lower level.
2023-12-04 15:07:30 +01:00
renovate[bot]
72ed1cdec2 Update Types packages 2023-12-04 11:06:28 +01:00
renovate[bot]
6f3d16f75b Update dependency postcss to v8.4.32 2023-12-04 08:37:46 +01:00
Ghost CI
90656aa047 v5.75.0 2023-12-01 16:04:16 +00:00
Ghost CI
643ec589a9 🎨 Updated Source to v1.1.2 2023-12-01 16:04:16 +00:00
Bastien Perez
296f906e6f
Add missing french translations (#18947)
Add missing french translations.

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-12-01 09:19:13 -05:00
renovate[bot]
de2482736e Update sentry-javascript monorepo to v7.84.0 2023-12-01 08:58:32 +01:00
michaelkueng
04b697da57
Added formal de_CH (#17843)
Added files for swiss german (de_CH). Went for the formal "Sie" (as
opposed to the informal "du" currently used in the locale de).

Suggestion: Allow variants like de_CH@informal and de_CH@formal to make
it possible to be able to offer both, formal and informal addresses for
languages like f.e. german or french and their respective variants.

---------

Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-11-30 17:27:22 -05:00
Sag
4ab9c24f12
Fixed sender email in the post preview for email (#19211)
Fixes GRO-74
2023-11-30 18:22:38 +00:00
Jono M
642c7f39cd
Fixed bugs with newsletter creation in admin (#19201)
refs ADM-4
2023-11-30 15:07:02 +00:00
Daniel Lockyer
4d029c4812 Fixed generating fallback context unnecessarily
fixes https://github.com/TryGhost/Product/issues/4216

When generating page/post metadata, we generate a "context object" from
several meta helpers. In the event there is no context from the resource
type, we generate a fallback object.

However... we generate this fallback object no matter what.

Now, the fallback object is just 3x settingsCache.get, which should be
fast, but it's not. I've opened a separate issue for that: https://github.com/TryGhost/Product/issues/4217

In the mean time, we can switch this logic around to only do these calls
when we have no other context.

From testing, this allows for 10% more throughput on a post 🤯
2023-11-30 10:39:35 +01:00
renovate[bot]
6f49f2f1a9 Update dependency html-validate to v8.7.3 2023-11-30 10:38:44 +01:00
Simon Backx
ab21b8ae1d
Allowed custom/empty replyTo for newsletters with managed sending domain (#19183)
fixes GRO-75
fixes GRO-100

And allow them to be empty
2023-11-30 09:16:03 +00:00
renovate[bot]
070c2851bd Update dependency ember-auto-import to v2.7.0 2023-11-30 07:52:25 +01:00
renovate[bot]
6c67827da1 Update metascraper to v5.39.0 2023-11-29 19:26:18 +00:00
Sag
3b7dc7555d
Fixed default sender address when email is managed (#19186)
fixes GRO-74

- uses the calculated setting "default_email_address" as first fallback, if there is no sender email for the newsletter
2023-11-29 19:24:16 +00:00
Paul Davis
9432fc0f4b
Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
Joe Grigg
8c55aa7065 Added retryStrategy to redis cache adapter with configurable retry delay
no-issue
2023-11-29 16:06:05 +00:00
renovate[bot]
8fc6fef168 Update dependency newrelic to v11.6.0 2023-11-29 15:59:56 +00:00
Sag
f8ad5fb2ea
Updated Portal to use calculated support and default email addresses (#19163)
fixes GRO-72

- added "default_email_address" and "support_email_address" to the
public settings
- when available, use these addresses in Portal. Otherwise, fallback to
current logic
2023-11-29 09:48:05 -03:00
renovate[bot]
0b57c01dd9 Update dependency @babel/plugin-proposal-decorators to v7.23.5 2023-11-29 12:30:50 +01:00
renovate[bot]
d5f3b26e87 Update sentry-javascript monorepo to v7.83.0 2023-11-29 12:29:34 +01:00
renovate[bot]
5acd8116e2 Update dependency @breejs/later to v4.2.0 2023-11-29 00:05:22 +00:00
Jono M
3f70cc08b7
Fixed create offer API not returning created_at (#19143)
refs https://github.com/TryGhost/Product/issues/4196

The offers API basically returns the data you pass to it, rather than
the created database record. It looks like this is how it was intended
to work in the first place; the `setMilliseconds` is because the test
helper expects `.000Z`, which I assume is because MySQL will strip off
the milliseconds when it's saved.
2023-11-28 15:11:35 +00:00
renovate[bot]
a5c4f30a9f Update dependency i18next to v23.7.7 2023-11-28 14:42:59 +00:00
Steve Larson
a586ac9469
Bumped editor packages (#19161)
no refs
- contains various fixes and improvements
2023-11-28 14:42:32 +00:00
Simon Backx
3687feca07
Updated support email address verification for DMARC changes (#19147)
fixes GRO-71

- Current flow: unchanged
- New managed flow: verification required
- New managed flow with custom sending domain: only verification
required for different domains
- Self hosters (feature flag): no verification required
2023-11-28 15:06:58 +01:00
Ghost CI
be6916f066 Merged v5.74.5 into main 2023-11-28 12:58:26 +00:00
Ghost CI
df3eea908a v5.74.5 2023-11-28 12:58:24 +00:00
Fabien "egg" O'Carroll
07f9564eea 🔐 Restricted reading files from outside the theme directory
closes https://github.com/TryGhost/Product/issues/4191

Without this patch, themes can read arbitrary files from your system and
expose them to the internet via the layout feature of express-hbs.

For example `{{!< ../../../../config.production.json}}` would spit out config,
which can contain secrets.

As theme upload is restricted to users with the Admin role, this mostly effects
hosting providers which use their own secret keys for e.g. mail or database config
2023-11-28 12:46:06 +00:00
EchoBilisim
4d4b150fd8
Update comments.json (#19110) 2023-11-28 13:41:52 +01:00
Fabien 'egg' O'Carroll
616247b6d5
Indexed over members_newsletters(newsletter_id, member_id) (#19156)
refs https://github.com/TryGhost/Product/issues/4181

We were seeing slow queries when joining on this table, and the index
speeds them up. The down migration is tricky because when we add the
index MySQL can optimise away some `KEY` indexes on the `newsletter_id`
column. When we then go to remove the newly created index, there is no
index for the FK! 

We also remove the use of `force index` as 1. the index we're forcing is
optimised away and 2. we don't need it anymore!


Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-11-28 12:20:14 +00:00
renovate[bot]
7d564d4173 Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
Steve Larson
e2807475f8
Updated editor packages (#19151)
closes TryGhost/Product#4204
- updated editor packages to get improvements to TK Plugin
2023-11-27 18:02:26 -06:00
Sag
54ee8d3389
Updated newsletter email verification to render the verified address (#19148)
refs GRO-80
- added a new meta field "email_verified" to the /verification endpoint
for newsletters. This meta field contains which email has been verified,
"sender_email" or "sender_reply_to"
- updated copy in newsletter settings, based on which email has been
verified
2023-11-27 18:28:57 +00:00
Simon Backx
6c37382bc3
Fixed requiring verification email for default address (#19140)
fixes GRO-79

When changing the Reply-To to the default address, the verification
email is now skipped.
2023-11-27 10:45:34 +00:00
Ghost CI
d30a6633ab v5.74.4 2023-11-27 07:56:41 +00:00
Ghost CI
bae7ca957d 🎨 Updated Source to v1.1.1 2023-11-27 07:56:41 +00:00
Daniel Lockyer
28e59b5444
Merged tag 'v5.74.3' into main
v5.74.3
2023-11-27 08:48:04 +01:00
Kevin Ansfield
b4ee76af5e
🐛 Fixed error when loading editor in Safari versions earlier than 16.4 (#19127)
no issue

- bumped `@tryghost/koenig-lexical` to version that no longer uses negative lookbehind in a regex which wasn't supported in Safari until version 16.4
2023-11-24 15:33:18 +00:00
Ghost CI
c6b86abb12 v5.74.3 2023-11-24 14:55:14 +00:00
Kevin Ansfield
761cc65d8f
🐛 Fixed error when loading editor in Safari versions earlier than 16.4
no issue

- bumped `@tryghost/koenig-lexical` to version that no longer uses negative lookbehind in a regex which wasn't supported in Safari until version 16.4
2023-11-24 14:41:43 +00:00
Simon Backx
a037ce3dde
Added calculated email address settings (#19115)
fixes GRO-73

We need to avoid duplicating the complex logic for determining the
default email address and the support email address. So these are now
exposed as calculated settings.
2023-11-23 13:07:15 +00:00
Simon Backx
17ec1e8937
Added email address alignment protections (#19094)
ref GRO-54
fixes GRO-63
fixes GRO-62
fixes GRO-69

When the config `hostSettings:managedEmail:enabled` is enabled, or the
new flag (`newEmailAddresses`) is enabled for self-hosters, we'll start
to check the from addresses of all outgoing emails more strictly.

- Current flow: nothing changes if the managedEmail config is not set or
the `newEmailAddresses` feature flag is not set
- When managedEmail is enabled: never allow to send an email from any
chosen email. We always use `mail.from` for all outgoing emails. Custom
addresses should be set as replyTo instead. Changing the newsletter
sender_email is not allowed anymore (and ignored if it is set).
- When managedEmail is enabled with a custom sending domain: if a from
address doesn't match the sending domain, we'll default to mail.from and
use the original as a replyTo if appropriate and only when no other
replyTo was set. A newsletter sender email addresss can only be set to
an email address on this domain.
- When `newEmailAddresses` is enabled: self hosters are free to set all
email addresses to whatever they want, without verification. In addition
to that, we stop making up our own email addresses and send from
`mail.from` by default instead of generating a `noreply`+ `@` +
`sitedomain.com` address

A more in depth example of all cases can be seen in
`ghost/core/test/integration/services/email-addresses.test.js`

Includes lots of new E2E tests for most new situations. Apart from that,
all email snapshots are changed because the from and replyTo addresses
are now included in snapshots (so we can see unexpected changes in the
future).

Dropped test coverage requirement, because tests were failing coverage
locally, but not in CI

Fixed settings test that set the site title to an array - bug tracked in
GRO-68
2023-11-23 10:25:30 +01:00
Chris Raible
a97e2b823e
Added error handling to Sentry's beforeSend (#19109)
refs TryGhost/Product#4175

- Added error handling to Sentry's beforeSend function in both Admin and
Core, so if there is any error in beforeSend, we will still send the
unmodified event to Sentry
- This is in response to an incident yesterday wherein the beforeSend
function threw an error due to an unexpected missing value in the
exception. The event sent to Sentry was the error in the beforeSend
function, and the original error never reached Sentry.
- If the original event had reached Sentry, even if unmodified by the
logic in beforeSend, we could have been alerted to the issue sooner and
more easily identified all affected sites.
- Also added defensive logic to protect for certain values in the
exception passed to beforeSend not existing and added unit tests for the
beforeSend function in admin and core
2023-11-23 02:46:50 +00:00
Steve Larson
f981993ba4
Revert "🎨 Updated editor layout to be more mobile friendly (#19103)" (#19108)
no refs

This reverts commit 329488139a.

- updates for mobile result in the locator queries finding two elements
instead of one, causing tests to fail
- reverting for now until we take a look closer with mobile, as it seems
CI is running at a mobile size
2023-11-22 19:26:17 +00:00
Steve Larson
4b1f61f947
Wired up TK count to confirmation flow (#19107)
closes TryGhost/Product#4185
- display TK count in the TK reminder/confirmation modal
2023-11-22 19:12:50 +00:00
Kevin Ansfield
5c32b6ccbf
Wired up TK reminder step in publish flow (#19104)
refs https://github.com/TryGhost/Product/issues/4184

- set up property on the editor controller for tracking number of TKs, action for updating it, and reset mechanism to ensure we go back to 0 when switching post
- uses random number for now pending `<TkPlugin>` being updated to expose the TK count
- passed TK count data to the publish flow modal so it can show a reminder step before the publish options step when there are still TKs in the post content
- added `onCountChange` prop to `<TkPlugin>` ready for the count feature to be implemented
2023-11-22 17:19:19 +00:00
Sanne de Vries
329488139a
🎨 Updated editor layout to be more mobile friendly (#19103)
Refs https://github.com/TryGhost/Product/issues/3712
2023-11-22 16:55:25 +00:00
Sanne de Vries
ec332520eb
Added static TK reminder step to publishing flow (#19049)
Refs https://github.com/TryGhost/Product/issues/4165
2023-11-22 15:36:20 +00:00
Jono Mingard
efc0f68b96 Merge tag 'v5.74.2'
v5.74.2
2023-11-22 14:53:42 +00:00
renovate[bot]
5969614a58 Update dependency miragejs to v0.1.48 2023-11-22 15:50:35 +01:00
Steve Larson
98215c6fea
Updated TK Reminders plugin use (#19100)
refs TryGhost/Product#4155
- moved plugin to top level so we can pass in props
2023-11-22 14:48:05 +00:00
Ghost CI
5299d1176e v5.74.2 2023-11-22 14:37:51 +00:00
Steve Larson
0954e08cf9
🐛 Fixed creating posts with an empty root (#19098) (#19099)
refs TryGhost/Product#4156
- bumped renderer package to handle empty root node
2023-11-22 08:26:09 -06:00
Steve Larson
03fec65fd5
🐛 Fixed creating posts with an empty root (#19098)
refs TryGhost/Product#4156
- bumped renderer package to handle empty root node
2023-11-22 14:18:26 +00:00
Daniel Lockyer
8debc4eb02 Forced use of specific index on members_newsletters
refs https://github.com/TryGhost/Product/issues/4181

- we've seen MySQL change its query planner to use a different index
  than the ideal one, resulting in drastically slower query performance
  when fetching newsletters with the member count
- this forces the use of the ideal index on MySQL
- this kept many of the Ghost team up overnight, so I hope MySQL is
  happy
2023-11-22 15:12:42 +01:00
Peter Zimon
6b46c828e7
Admin X demo app content (#19079)
refs. https://github.com/TryGhost/Product/issues/4169

- Added demo content for POC AdminX demo app
2023-11-22 13:44:39 +01:00
renovate[bot]
e01c87800e Update dependency mysql2 to v3.6.5 2023-11-22 00:59:57 +00:00
Ghost CI
6941ef0148 Merged v5.74.1 into main 2023-11-21 16:49:06 +00:00
Ghost CI
34dc2f8c1e v5.74.1 2023-11-21 16:49:03 +00:00
Kevin Ansfield
d5c5f9d8f5
🐛 Fixed re-ordering within galleries sometimes getting stuck on disabled (#19080)
refs https://github.com/TryGhost/Product/issues/4170
refs https://github.com/TryGhost/Koenig/pull/1084

- bumps `@tryghost/koenig-lexical` to version containing a fix for gallery re-ordering not working in some situations
2023-11-21 16:21:21 +00:00
Kevin Ansfield
daf7b2714e
🐛 Fixed re-ordering within galleries sometimes getting stuck on disabled (#19080)
refs https://github.com/TryGhost/Product/issues/4170
refs https://github.com/TryGhost/Koenig/pull/1084

- bumps `@tryghost/koenig-lexical` to version containing a fix for gallery re-ordering not working in some situations
2023-11-21 16:12:52 +00:00
renovate[bot]
b275450bec Update Types packages 2023-11-21 15:06:56 +01:00
renovate[bot]
56d18edf0e Update sentry-javascript monorepo to v7.81.1 2023-11-21 15:05:41 +01:00
renovate[bot]
98941cef3a Update dependency yjs to v13.6.10 2023-11-21 11:53:03 +00:00
Kevin Ansfield
2f07af05cb
Wired up tkReminders flag in Admin+editor (#19074)
refs https://github.com/TryGhost/Ghost/pull/19057

- the flag and toggle UI had been added but we were missing the final part of wiring up the feature in Admin and passthrough to the editor
2023-11-21 11:10:28 +00:00
Jono M
baa62c0bed
Fixed AdminX loading failure screen layout (#19072)
no issue

This was broken when adding the AdminX demo app - it would no longer
display at full height.
2023-11-21 10:26:34 +00:00
Simon Backx
b6519e0f1f
Removed usage of unquoted ids in filter strings (#19070)
fixes GRO-34
fixes GRO-33

This is a revision of a previous commit, that broke the browser tests
because changes in the data generator (requiring bookshelf had side
effects).

This adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So
they surface tiny bugs in our codebase.

You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e

Removed some defensive logic that could be explained by this discovered
issue.
2023-11-21 09:45:36 +01:00
renovate[bot]
fedda8b898 Update dependency mysql2 to v3.6.4 2023-11-21 08:14:56 +00:00
Ronald Langeveld
83a1060983
Added last redeemed property to Offers (#19066)
refs https://github.com/TryGhost/Product/issues/4153

- wired up a new last_redeemed prop to the Offers API endpoint.
2023-11-21 08:02:15 +00:00
Ronald Langeveld
bc6f69d823
Fixed created_at types in Offers (#19065)
no issue

- fixed types in offers for the created_at property
2023-11-21 09:43:12 +02:00
Steve Larson
a398067159
Added TK reminders labs feature (#19057)
refs TryGhost/Product#4156
2023-11-20 23:30:16 +00:00
renovate[bot]
17dec5a749 Update dependency typescript to v5.3.2 2023-11-20 20:11:26 +01:00
renovate[bot]
7a3ae4ab75 Update sentry-javascript monorepo to v7.81.0 2023-11-20 16:57:32 +01:00
Chris Mitchell
07e5e2c272
Added Scottish Gaelic translations (#19001)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-11-20 15:56:51 +00:00
Daniel Lockyer
2ac8f39e77 Included all apps in asset-delivery output
- this should loop over all apps without us having to manually add them
  to the debug lines
2023-11-20 16:49:10 +01:00
Daniel Lockyer
641e0cbbdd Fixed building @tryghost/admin-x-demo project before Admin
refs a93c665d20

- this project needs to be built before Admin because Admin
  symlinks/copies the assets
2023-11-20 16:49:10 +01:00
Michael Barrett
55392646e1
Refined cache invalidation when updating a user (#19028)
refs https://github.com/TryGhost/Arch/issues/101

Refined the cache invalidation logic so that when updating a user, we
only invalidate the cache when an attribute of the user that is used on
the frontend changes.
2023-11-20 14:14:30 +00:00
Simon Backx
d5492bd63c
Revert "Removed usage of unquoted ids in filter strings" (#19052)
Reverts TryGhost/Ghost#19031

Browser tests are failing with an unknown cause
2023-11-20 13:50:07 +00:00
Jono M
a93c665d20
Created a skeleton AdminX demo app (#19005)
refs https://github.com/TryGhost/Product/issues/4152

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at a28462f</samp>

This pull request adds a new admin-x app called `admin-x-demo`, which
demonstrates how to use the shared packages `admin-x-framework` and
`admin-x-design-system` to create a simple app that renders a button and
a modal. It also improves the development workflow, the vite
integration, the dependency management, and the type checking for the
admin-x apps and packages. It modifies some files in the
`admin-x-framework` and `admin-x-design-system` packages to make the
modals prop optional, to introduce a new type for the props from the
Ember app, to fix the z-index of the modal backdrop, and to use
consistent file extensions and module syntax.
2023-11-20 13:30:15 +00:00
Simon Backx
320eaac4c4
Removed usage of unquoted ids in filter strings (#19031)
fixes GRO-34
fixes GRO-33

This also adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So they
surface tiny bugs in our codebase.

You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e

Also removed some defensive logic that could be explained by unquoted ids.
2023-11-20 14:00:31 +01:00
Kevin Ansfield
1be490ae9e
Reduced size of social metadata images (#19048)
refs https://github.com/TryGhost/Product/issues/4140

- added `social-image` image size to our `internalImagesSizes` list with a max-width of 1200
- extracted image utils from `{{img_url}}` helper to a utils file for re-use
- updated `getImageDimensions` method that reads image dimensions and modifies the finalised `metaData` object before use to adjust dimensions and associated URLs to match max width of 1200px
2023-11-20 12:39:51 +00:00
renovate[bot]
0cf25d0afe Update dependency yjs to v13.6.9 2023-11-20 12:25:48 +00:00
Harry Suryapambagya
722847f62e
Updated Bahasa Indonesia translations (#18483) 2023-11-20 12:12:46 +00:00
Markus Härnvi
489ef84c68
Updated Swedish translations (#18749)
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-11-20 12:28:51 +01:00
remylpt
e51f39e2c9
Updated French translations (#18719)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-11-20 11:12:05 +00:00
mihneabont
e84f792663
Fixed Romanian grammar (#18939)
Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-11-20 12:01:51 +01:00
Jono M
5e057dee11
Added tests to AdminX framework package (#19022)
refs https://github.com/TryGhost/Product/issues/4159

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at 9e68f4d</samp>

This pull request refactors several components in the `admin-x-settings`
app to use common hooks from the `@tryghost/admin-x-framework` package,
which reduces code duplication and improves consistency. It also updates
the `package.json` file and adds unit tests for the `admin-x-framework`
package, which improves the formatting, testing, and dependency
management. Additionally, it makes some minor changes to the `hooks.ts`,
`FrameworkProvider.tsx`, and `.eslintrc.cjs` files in the
`admin-x-framework` package, which enhance the public API and the
linting configuration.
2023-11-20 11:00:51 +00:00