Commit Graph

2449 Commits

Author SHA1 Message Date
Ghost CI
ff3c3a904b Merged v5.64.0 into main 2023-09-20 03:59:19 +00:00
Ghost CI
24bebc1ace v5.64.0 2023-09-20 03:59:17 +00:00
Steve Larson
c0f70144fc
🐛 Fixed collection card post excerpts (#18232)
refs TryGhost/Product#3913
- posts starting with a lexical card resulted in blank space in excerpts
2023-09-19 23:12:57 +00:00
Sag
e1c966b6d7
Added filter option to the Recommendations Admin API's browse endpoint (#18233)
closes https://github.com/TryGhost/Product/issues/3907
2023-09-19 20:42:27 +00:00
Steve Larson
fada0237b8
Added link to collections card posts (#18228)
closes TryGhost/Product#3905
- added link to collections card posts
2023-09-19 12:05:29 -05:00
Kevin Ansfield
ff3eb63fd8
Revert "Added page html reset and re-render to handle dynamic collection card content (#18146)" (#18229)
This reverts commit 3e9da6df0c.

- changes introduced an error fetching `/admin/pages/` when using MySQL
- "The values in where clause must not be object or array"
2023-09-19 16:59:56 +00:00
renovate[bot]
65838394c3 Update dependency ws to v8.14.2 2023-09-19 15:59:51 +00:00
Kevin Ansfield
3e9da6df0c
Added page html reset and re-render to handle dynamic collection card content (#18146)
no issue

Collection cards contain dynamic data that can change when there's any change to a published post but in Ghost all post/page content is rendered once on save and stored as a static string meaning we need a new approach for triggering a re-render of pages that plays well with caching.

- fixed typo in the relations/authors code that meant we weren't correctly calling the prototype method on the Post model inside the `onFetchedCollection` event handler
- updated Post model to clear the `html` field of all pages when saving or deleting a published post
- updated Post model to re-render `html` fields when fetching individual posts or a collection of posts
- modified `insertExtraPostsTags` fixture util to wrap it's concurrent post edits in a transaction otherwise MySQL errors because it hits a deadlock
2023-09-19 16:46:38 +01:00
Simon Backx
64b472166c Removed required webmentions flag for mentions admin endpoint
fixes https://github.com/TryGhost/Product/issues/3830

This endpoint is required for recommendations to work: admin-x loads the incoming recommendations by querying the mentions endpoint. If the mentions flag was not enabled, this endpoint wasn't available.
2023-09-19 17:31:55 +02:00
Simon Backx
95c8ba11d6
Added E2E tests for Public Site Settings in members API (#18223)
fixes https://github.com/TryGhost/Product/issues/3901
2023-09-19 14:47:34 +00:00
Sag
d5ad5d2dd0
Added read endpoint to the Recommendations Admin API (#18221)
closes https://github.com/TryGhost/Product/issues/3910
2023-09-19 13:56:26 +00:00
Naz
00e5f84d88
Repopulated collections_posts built-in collections data
closes https://github.com/TryGhost/Arch/issues/74
refs b5d1245be1

- We have turned off the collections feature flag after a unsuccessful attempt to make collections GA. With the flag turned off, collections_posts data has gone stale and needs repopulation to function properly again.
- This migration is meant to clear the data on collections_posts table and repopulated it again the same way initial migration did in 5.5/2023-07-10-05-16-55-add-built-in-collection-posts.js script.
2023-09-19 21:23:53 +08:00
naz
826b5be002
Optimized collection repository queries (#18194)
refs https://github.com/TryGhost/Arch/issues/86

- Creating bookshelf models for each collection_post relation created a
massive overhead. On a dataset with 500k collections_posts records the
timing was roughly 7s comparing to 810ms after the optimization.
- Optimized memory and performance of collections fetching by querying post
ids only by default
2023-09-19 21:07:11 +08:00
renovate[bot]
8843d3c25b Update dependency y-protocols to v1.0.6 2023-09-19 09:53:53 +00:00
Daniel Lockyer
f705dda314 Updated Admin-X bundling process
refs https://github.com/TryGhost/DevOps/issues/80

- as part of moving Admin-X-Setting towards GA, we want to change it from
  loading the settings externally via a CDN, to bundling it in with
  Admin
- the bulk of the changes here are removing the config in Ghost, setting
  up the copy to the Admin assets dir, and loading the new path in Admin
- several other changes have come along the way as I've cleaned up
  unneeded code
2023-09-19 11:31:55 +02:00
naz
9cd542dc59
Optimized collection repository queries (#18194)
refs https://github.com/TryGhost/Arch/issues/86

- Creating bookshelf models for each collection_post relation created a
massive overhead. On a dataset with 500k collections_posts records the
timing was roughly 7s comparing to 810ms after the optimization.
- Optimized memory and performance of collections fetching by querying post
ids only by default
2023-09-19 16:02:14 +08:00
renovate[bot]
8cfff3743b Update dependency postcss to v8.4.30 2023-09-19 08:09:20 +02:00
Fabien "egg" O'Carroll
cbea9e8948 Restricted content gating filter to status & tiers
refs https://github.com/TryGhost/Arch/issues/83

As we've only used the status and tiers in the cache key generation (as those
are currently the only ones that are present in DB's) we want to make sure that
content gating doesn't use any other properties, which means the cache behaviour
will match the content gating behaviour
2023-09-19 12:39:50 +07:00
Fabien "egg" O'Carroll
e865f57e88 Customised key generation for Posts Content API
refs https://github.com/TryGhost/Arch/issues/83

The options included are the only ones which have an effect on the response
data, as well as that we are using the properties of members which are used by
content-gating module. For the read operation we need to include the ID too.
2023-09-19 12:39:50 +07:00
Fabien "egg" O'Carroll
cfef41cd8f Added support for custom cache key generation
refs https://github.com/TryGhost/Arch/issues/83

This allows endpoints to implement their own key generation, with access to the
frame object they can be smart about key generation and use only options and
context values that are appropriate.
2023-09-19 12:39:50 +07:00
Steve Larson
0b64247ad2
Bumped Koenig packages (#18211)
no refs
- few improvements to collections card behaviour
2023-09-18 21:18:52 +00:00
Sag
3b1fcb6c16
Added fixed height to avoid jumps in the Recommendations settings (#18184)
closes https://github.com/TryGhost/Product/issues/3881

We observe the height of the recommendation table, and keep it fixed between pages — so that the UX is smoother when navigating between pages.
2023-09-18 17:43:57 +02:00
Simon Backx
b545dfa0cc
Improved recommendation controller structure (#18208)
fixes https://github.com/TryGhost/Product/issues/3900

1. The service never returns a Recommendation Entity, but always plain
objects (which for now is the same as Recommendation without the
methods).
2. Updated the controller to be more readable and minimal (we keep this
controller, in addition to the existing endpoints and serializers)
- The controller does minimal validation and allows for type checking
(so we get compile time errors in case the service expects new fields)
- The controller uses the `UnsafeData` class to easily validate the
input from requests, and throws appropriate errors (with correct field
descriptions — "Expected a string at recommendations.0.title") without
too much boilerplate code. In addition the interface is typed, so we get
compile errors if there are breaking changes in the service.
- Removed `EntityWithIncludes`, since we now use plain objects, we
inject the relations directly into those plain objects (with some new
types that add type support)
- Added new tests to make sure that edits only affect the given fields,
and never undefined fields
2023-09-18 14:36:49 +00:00
Sanne de Vries
353c565739
Fixed collection card empty parameters outputting null on frontend (#18205)
Refs https://github.com/TryGhost/Product/issues/3630

- Bumped kg-default-nodes to 0.1.30
2023-09-18 13:49:45 +00:00
Sanne de Vries
a27ba55b50
Fixed reading time not showing up on frontend (#18201)
Refs https://github.com/TryGhost/Product/issues/3630
2023-09-18 10:58:44 +00:00
Sanne de Vries
6273568718
Added default margin to collection cards (#18199)
Refs https://github.com/TryGhost/Product/issues/3630
2023-09-18 10:24:49 +00:00
renovate[bot]
290ff10dad Update dependency yjs to v13.6.8 2023-09-18 10:17:00 +00:00
Steve Larson
3001e4c032
Enabled dynamic post rendering (#18183)
no refs
- contains changes for dynamic rendering with lexical posts
2023-09-15 18:18:18 +00:00
Steve Larson
37a9ffc63e
Bumped serializer to later in boot (#18181)
no refs
- import was too early in boot process, causing db init to fail
2023-09-15 16:32:12 +00:00
Steve Larson
077bd2c883
Added serialization to collection posts fetch (#18179)
no refs
- renderer was missing data from serializer
2023-09-15 15:33:36 +00:00
Ghost CI
3a8fac8348 v5.63.0 2023-09-15 15:14:27 +00:00
Simon Backx
07bc183702 Bumped Portal to 2.36.0 2023-09-15 16:47:12 +02:00
Eduard Mayer
082a67c7f6
Updated page metadata to use author image over cover image (#17689)
- the schema.org data fo an author should primarily use the authors image as the image item instead of the cover image.
- otherwise the schema.org metadata will be invalid, since the image item is missing when no cover image has been uploaded.
2023-09-15 16:07:06 +02:00
Simon Backx
4e2710ada2 Added stats to recommendations endpoints
fixes https://github.com/TryGhost/Product/issues/3854
fixes https://github.com/TryGhost/Product/issues/3864
2023-09-15 15:57:27 +02:00
Sag
6e68c43f78
Added uniqueness validation for the recommendation URL (#18163)
closes https://github.com/TryGhost/Product/issues/3818

- in Admin, when adding a recommendation, the URL is compared against all existing ones. If the URL is already recommended, the publisher is shown an error: "A recommendation with this URL already exists.". Protocol, www, query parameters and hash fragments are ignored during the URL comparison.
- on the backend, there is another uniqueness validation for the recommendation URL. This check is redundant when adding a recommendation from Admin, but helps to keep data integrity when recommendations are added through other paths (e.g. via the API)
2023-09-15 13:14:47 +00:00
Sanne de Vries
61d14b2d12
Updated font sizes of signup and header cards (#18168)
No ref
2023-09-15 14:46:49 +02:00
Kevin Ansfield
a750ed847c
Fixed collections card rendering drafts in front-end output (#18166)
no issue

- added missing `context.public = true` option that tells our data fetching layer that this is a "Frontend/Content API" request and relevant filters should be applied
- adjusted require of posts service so it's only grabbed on the first render rather than every render
2023-09-15 11:16:35 +00:00
Ronald Langeveld
851504030c
Added Support Email verification modals to Admin X (#18152)
refs
https://www.notion.so/ghost/df5bdea8f7ea4aca9d25eceb6a1bf34c?v=be2f15b6b58b4c27a0e11374282bead0&p=163762d9513a4e6dbd60c28e19228fdc&pm=s

- Added a modal to confirm that the new support email has been verified.
- to achieve that a couple of adjustments had to be made
- Updated the RoutingProvider to handle routes with query params.
- Added a new useQueryParams hook to grab query params where needed.
- wired up the email verification api.
- added feature flags / labs logic to the core package with the new URL and updated test.

---

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

This pull request adds email verification functionality for the support
email address in the portal settings. It fixes a bug in the routing
provider, adds a new API function, a new custom hook, and a new modal
component to handle the verification process. It also updates the
settings query with the verified email address.
2023-09-15 16:00:24 +07:00
renovate[bot]
9730229968 Update sentry-javascript monorepo to v7.69.0 2023-09-15 10:33:55 +02:00
renovate[bot]
a28e4a4395 Update dependency @playwright/test to v1.38.0 2023-09-15 10:09:33 +02:00
Naz
7a4cd1207f Fixed migrator initialization error
refs 488af56ef9

- The referenced commit introduced a postsService initializaiton at the top level of the module - causing cascading failure all the way down in the URL service, whe the ENV variables are not set.
- This fix is just a quick fix to unblock the main branch. A proper initialization of the service should be done ensuring we don't have to re-create a posts-service instance on each render method call.
2023-09-15 15:43:05 +08:00
Princi Vershwal
3436c4870d
Added newsletter in get helper
refs https://github.com/TryGhost/Product/issues/3859

---------

Co-authored-by: Michael Barrett <mike182uk@gmail.com>
2023-09-15 11:48:22 +05:30
Naz
99f29a169c Removed post delete related event handling
closes https://github.com/TryGhost/Arch/issues/91

- We have on cascade delete (a9f9f6121a/ghost/core/core/server/data/schema/schema.js (L1068)) on `post_id` column which handles post deletion logic automatically on DB level.
- The commented out handlers in the long term should be hooked up with public CollectionService methods on the client side.
2023-09-15 13:50:25 +08:00
Steve Larson
488af56ef9
Enabled collections rendering (#18150)
refs TryGhost/Product#3883
- passes endpoint through to the lexical renderer for collections
rendering
- ghost still needs a `kg-default-nodes` and `kg-lexical-html-renderer`
update to support this completely
2023-09-14 20:22:18 -05:00
Kevin Ansfield
1c68bd6779
Fixed transaction errors using PostsService inside of Post model's onSaving hook (#18148)
no issue

`PostsService` and `CollectionsService` were missing some passthroughs and had differing naming for a transaction instance on the `options` object which meant SQLite would hang if the Lexical renderer called out to `PostsService.browsePosts`

- added passthrough of `transacting` to the Lexical renderer ready for implementation of the collection-fetching function
- added rename of `options.transacting` to `options.transaction` and passthrough from `PostsService` to `CollectionsService` (passthrough from collections repository to bookshelf and required `transaction->transacting` was already in place)
2023-09-14 17:22:10 +00:00
Sanne de Vries
eb831a8ba9
Added responsive styles to collection card html (#18142)
Refs https://github.com/TryGhost/Product/issues/3630
2023-09-14 12:47:53 +00:00
Simon Backx
82079c1dc5 Added click tracking endpoints for recommendations
fixes https://github.com/TryGhost/Product/issues/3853
2023-09-14 14:47:02 +02:00
Michael Barrett
a1f056ee86
🐛 Fixed portal showing incorrect expiry date for comped subscription (#18120)
refs https://github.com/TryGhost/Product/issues/3875

When a member had a comped subscription, the portal was showing an
incorrect expiry date. This was because the `expiry_date` was being set
to the `created_at` date of the subscription, rather than the
`expiry_date` of the comped subscription
2023-09-14 08:46:23 +01:00
Naz
1d7bb44a94 Fixed post.deleted event mapping
https://github.com/TryGhost/Arch/issues/90

- When a post.deleted event is emitted the original 'data' object does not contain an 'id' property. The logic in collections service assumes the id would be present to update the collections efficiently.
2023-09-14 14:31:23 +08:00
renovate[bot]
2146d07d86 Update dependency lib0 to v0.2.85 2023-09-13 21:49:35 +02:00
Kevin Ansfield
12621d8157
Added core content API integration fixture (#18114)
refs https://github.com/TryGhost/Product/issues/3874

- the new collections card needs to access the Content API rather than the Admin API in order to show the card as it will appear on the front-end but we don't have a default integration that can be fetched via the Admin API for Admin to use when fetching from the Content API
- adds a new "Ghost Core Content API" integration with the `core` type so that it can be read via the `/admin/integrations/` endpoint and used in Admin to make Content API requests
2023-09-13 17:04:49 +01:00
Simon Backx
e888a4e820
Added recommendation events tables (#18084)
fixes https://github.com/TryGhost/Product/issues/3852

Tech spec:
https://www.notion.so/ghost/Recommentions-Tech-Spec-598f09e4109f4eef8d9e32db7245a90c?pvs=4#d30e0081613a4f51860acd40169a4d68
2023-09-13 17:18:40 +02:00
Sanne de Vries
dbc93bf1c7
Added collection card frontend CSS (#18107)
Refs https://github.com/TryGhost/Product/issues/3630
2023-09-13 11:54:41 +00:00
Fabien 'egg' O'Carroll
9dde39b2a4
Handled CollectionPost relations manually (#18081)
refs https://github.com/TryGhost/Arch/issues/86

bookshelf-relations was generating tonnes of select queries from the
posts table in order to update the relations. We've instead implemented
this ourselves, so as to avoid the superfluous fetches. Working closer to
the db like this is nice, and makes you think more about performance.

This logic could be pulled out into a util (not bookshelf plugin) where
it could be used explicitly, but with the complexity hidden, we'll see ig.
2023-09-13 14:16:22 +07:00
renovate[bot]
ed57df7ec6 Update dependency lib0 to v0.2.84 2023-09-13 07:58:24 +02:00
Naz
ce10d34e5e Allowed optionally enabling collections through a flag
refs https://github.com/TryGhost/Ghost/pull/18028

- The previous conditional meant that if the "host settings" collections enabled flag was set, we couldn't disable collections. The referenced pull request would also disable the collections across all of the hosted environment instances. The updated logic optionally takes into account the "labs" flag, as it should have from the very beginning.
2023-09-13 13:56:56 +08:00
Naz
bbb5b64ec5 Cleaned up member's neswletter test suite
refs https://github.com/TryGhost/Arch/issues/87

- We just introduce member's newsletters serialization, so removed the comments reminding to do so.
2023-09-13 13:18:43 +08:00
Naz
282de7f0b4 Added newsletter payload serializer
refs https://github.com/TryGhost/Arch/issues/87

- The newsletters in members payload have leaked internal properties from Public Members API. The code skipped the output serialization step, which is now in place.
- The newsletter resource returned from the API consistently returns these properties:
id,
name,
description,
sort_order
2023-09-13 13:18:43 +08:00
Naz
a284e8275d Added a test for Public member data endpoint
refs https://github.com/TryGhost/Arch/issues/87

- There was no test whatsoever! Adding a super basic test to have some certainty the output doesn't change after a refactor
2023-09-13 13:18:43 +08:00
Naz
e73b16979f Trimmed down Members Admin API response data
refs https://github.com/TryGhost/Arch/issues/87

- The Members Admin API and members.* webhooks were returning too many fields in the nested `newsletters` objects. There was no "allowlist" serializer for the newsletter object, which meant every time we add a new field to the database we would unintentionally return extra fields without a second thought.
- With this change only following fields will be returned with `members[x].newsletters[x]`:
'id',
'name',
'description',
'status'
2023-09-13 13:18:43 +08:00
Naz
2e84cdca36 Added specific newsletters and attribution tests
refs https://github.com/TryGhost/Arch/issues/87

- Round 2 for the previous commit. Removes use of `anyArray` for all
- Using `anyArray` in snapshot test is an anti-pattern which leads to leaking output fields unintentionally when the API changes.
- Adding these fixes is fundamental work before changing the output of 'member.newsletters' property
2023-09-13 13:18:43 +08:00
Naz
4999523289 Added specific newsletters and attribution tests
refs https://github.com/TryGhost/Arch/issues/87

- Using `anyArray` in snapshot test is an anti-pattern which leads to leaking output fields unintentionally when the API changes.
- Adding these fixes is fundamental work before changing the output of 'member.newsletters' property
2023-09-13 13:18:43 +08:00
Kevin Ansfield
ff0426fd86
🐛 Fixed incorrect order of author/publisher in bookmarks cards created with beta editor (#18085)
no issue

- bumps Koenig packages
- `@tryghost/kg-default-nodes` contains fix for swapped author/publisher in bookmark renderer
- all packages contain bumped Lexical dependencies
2023-09-12 16:29:07 +00:00
renovate[bot]
a276335b66 Update dependency @types/common-tags to v1.8.2 2023-09-12 14:36:23 +02:00
renovate[bot]
7ffb3206a8 Update dependency uuid to v9.0.1 2023-09-12 12:29:51 +02:00
Simon Backx
d166977ae4
Updated Portal to always honor outboundLinkTagging setting (#18079)
no issue

- Do not set ?ref in recommendations if analytics is disabled
- Do not send url_history if analytics is disabled
- Expose outboundLinkTagging as a public setting
2023-09-12 10:27:04 +00:00
renovate[bot]
e32e0cb7af Update dependency luxon to v3.4.3 2023-09-12 09:02:09 +02:00
renovate[bot]
c6cf4fc2f3 Update dependency @actions/core to v1.10.1 2023-09-11 21:34:39 +02:00
Simon Backx
f566729ed6
Fixed recommendation order (#18060)
fixes https://github.com/TryGhost/Product/issues/3851

- Order was not applied via the CRUD plugin
- Removed usage of CRUD findAll, and swapped to Bookshelf fetchAll
instead, to decrease dependencies of invisible Bookshelf plugins logic
- Reverted page and limit options possibility via findAll method
2023-09-11 11:04:34 +00:00
renovate[bot]
73aca83fe5 Update dependency mysql2 to v3.6.1 2023-09-11 02:07:34 +00:00
renovate[bot]
7f6bd5ec31 Update dependency ws to v8.14.1 2023-09-08 18:31:09 +00:00
Ghost CI
88efa1a930 v5.62.0 2023-09-08 15:03:00 +00:00
Simon Backx
669be72673
Wired up pagination to recommendations (#18018)
fixes https://github.com/TryGhost/Product/issues/3822
fixes https://github.com/TryGhost/Product/issues/3838

This PR became a bit big because it affected multiple parts of Ghost
that needed to be updated to prevent breaking anything.

### Backend
- Added pagination to the recommendations API's
- Updated BookshelfRepository template implementation to handle
pagination
- Allow to pass `page` and `limit` options to Models `findAll`, to allow
fetching a page without also fetching the count/metadata (=> in the
repository pattern we prefer to fetch the count explicitly if we need
pagination metadata)
- Added E2E tests for public recommendations API (content API)
- Extended E2E tests of admin recommendations API

### Portal
- Corrected recommendations always loaded in Portal. Instead they are
now only fetched when the recommendations page is opened.

### Admin-X
- Added `usePagination` hook: internally used in the new
`usePaginatedQuery` hook. This automatically adds working pagination to
a query that can be used to display in a table by passing the
`pagination` and `isLoading` results to the `<Table>`
- Added placeholder `<LoadingIndicator>` component
- Added a loading indicator to `<Table>`. This remembers the previous
height of the table, to avoid layout jumps when going to the next page.
2023-09-08 12:32:06 +02:00
renovate[bot]
9e3e1d8c73 Update dependency newrelic to v11.1.0 2023-09-07 21:33:43 +00:00
Jono M
1366296330
Bumped AdminX settings and fixed default JS path (#18007)
no issue
2023-09-07 08:53:51 +00:00
Kevin Ansfield
8c91662a47
Added conversion to beta editor format when creating content via ?source=html (#18000)
closes https://github.com/TryGhost/Product/issues/3803

Previously when the beta editor was enabled, using `?source=html` to create posts via the API would create posts in the old editor rather than the beta. This change switches conversion over to the new editor format when the beta is enabled so the full flow can be tested.

- added `htmlToLexicalConverter` method to our lexical library
- updated post and page input serializers to add html-to-lexical conversion when the beta editor is enabled
- updated post model to handle the mobiledoc+lexical co-existing state
  - this is a special case that is only valid for `?source=html` because providing both directly via the API is prohibited
  - we need the extra check here because at the input serializer layer we don't have access to the model to check if we're updating a mobiledoc post or a lexical post so the serializer sets both formats on a `?source=html` request when the beta is enabled and lets the model handle choosing the correct one
2023-09-06 21:16:40 +00:00
Simon Backx
62ee0928bb Bumped Portal to v2.35.0 2023-09-06 17:33:42 +02:00
renovate[bot]
a3a71a6728 Update dependency ws to v8.14.0 2023-09-06 15:27:00 +00:00
Simon Backx
f71c074d31
Added one-click-subscribe detection (#17995)
fixes https://github.com/TryGhost/Product/issues/3820

- This adds a new public site endpoint in the members API to check if a
site can offer the one-click-subscribe feature
- This is implemented on the members API as a copy of the `site`
endpoint because the admin API site endpoint is protected by CORS and
mainly because it can be served on a different domain than the
recommended site and this is hard to detect reliably from the frontend
- Added a new calculated setting `allow_self_signup`, which can replace
the setting that is currently used in Portal (best to do this after a
release otherwise we risk creating issues if a patch release happens)
2023-09-06 15:11:14 +00:00
Ghost CI
0387f75eeb Merged v5.61.3 into main 2023-09-06 10:55:49 +00:00
Ghost CI
1fd32288e0 v5.61.3 2023-09-06 10:55:47 +00:00
Sag
a08e0ed14e
Added logic to update the recommendations_enabled setting on add/delete (#17975)
closes https://github.com/TryGhost/Product/issues/3799

- the recommendations_enabled setting is updated when a recommendation
is created or deleted. It's enabled as soon as there is at least one
recommendation in the database
- the recommendations_enabled setting exists to avoid fetching the
recommendation count from the database directly in themes. The setting
is cached and doesn't need a read every time from the database
2023-09-05 18:31:48 +00:00
Ghost CI
ca91b847f3 Merged v5.61.2 into main 2023-09-05 17:55:54 +00:00
Ghost CI
50341d164f v5.61.2 2023-09-05 17:55:51 +00:00
Kevin Ansfield
0b37e835af
🐛 Fixed incorrect rendering of links following line breaks in beta editor
closes https://github.com/TryGhost/Product/issues/3827

- links following a line break in the editor were being rendered before the line break when previewing/publishing
- bumps Koenig packages which includes relevant fix in `@tryghost/kg-lexical-html-renderer`
2023-09-05 18:28:39 +01:00
Simon Backx
8b1ca62025
Added "Recommended you" section to settings (#17973)
fixes https://github.com/TryGhost/Product/issues/3808 
refs https://github.com/TryGhost/Product/issues/3791
2023-09-05 12:46:27 +02:00
renovate[bot]
0d6e979077 Update dependency express-hbs to v2.4.2 2023-09-05 06:52:42 +00:00
Daniel Lockyer
f65c31c8b2 Removed unnecessary callback function
- `serveStatic` doesn't even support this parameter, so the function is
  never called
- this clears up a big red line in code editors
2023-09-04 16:50:53 +02:00
Ghost CI
d7c0b2392b Merged v5.61.1 into main 2023-09-04 08:11:31 +00:00
Ghost CI
be3905b822 v5.61.1 2023-09-04 08:11:30 +00:00
Daniel Lockyer
d4217bd321
🐛 Fixed missing Admin assets in published tarball
refs https://github.com/TryGhost/Ghost/issues/17932

- we were missing `chunk.208.dbf172ad32f72f21a5dc.js` from our published tarball
- turns out this is due to the lines in the `.npmignore` file to remove
  .db files, which also matched this file
- we can make the regex more specific to avoid these cases
2023-09-04 10:09:16 +02:00
Fabien "egg" O'Carroll
5e3470a3a1 Fixed invalid Offers from throwing when reading
closes https://github.com/TryGhost/Product/issues/3675
refs c98bf80248

As part of our architecture guidelines Repository implementations should protect
against invalid or malformed data in persistence. We do not want read operations
of Entities to throw because of such data. For some fields that bad data can be
fixed or handled in the constructor or static create factory method and replaced
with valid data, others will cause the factory to throw.

This means that Repositories should catch these errors and exclude those
entities from their results. We log the errors in Sentry so that we have
visibility on the state of bad data in DBs
2023-09-02 16:58:48 +07:00
Fabien "egg" O'Carroll
84e6026408 Fixed Offer entity types in OfferBookshelfRepository
JSDoc has a problem with using values as types across repositories, rather than
getting `Offer` as the type we end up with `typeof Offer` as the type - which is
incorrect. Instead we use `import` syntax inside of JSDoc which resolves correctly
2023-09-02 16:58:48 +07:00
Fabien "egg" O'Carroll
127c61d4c6 Moved OfferRepository to core
As per our architecture guidelines we want to keep bookshelf implementations of
Repositories in Ghost core, so that all the bookshelf code is kept together, and
the packages implementing business logic with entities and services require less
dependencies to test. This separation should also help us inadvertently add
business logic to repository implementations by having a more "physical"
boundary between them.
2023-09-02 16:58:48 +07:00
Ghost CI
31d9165296 v5.61.0 2023-09-01 15:04:56 +00:00
Daniel Lockyer
c6cb35074a Updated linting and testing packages 2023-09-01 15:51:17 +02:00
Simon Backx
8600ccf387 Added BookshelfRepository and BookshelfRecommendationRepository
refs https://github.com/TryGhost/Product/issues/3800
2023-09-01 15:10:34 +02:00
Simon Backx
d5c8804e23 Updated InMemoryRecommendationRepository to follow newer pattern
refs https://github.com/TryGhost/Product/issues/3800
2023-09-01 15:10:34 +02:00
Sag
96d9099195
Revert "Added support for importing Stripe Coupons as Offers (#17415)" (#17915)
refs https://github.com/TryGhost/Product/issues/3674
refs https://github.com/TryGhost/Product/issues/3675

- this reverts commits 8a32941ae8 and
b587429008
- the reverted commits added some logic to create offers based on a
Stripe coupon. However, the logic bypassed the Offer entity, and
therefore skipped any validations/constraints — causing invalid data in
the database and some sites to crash.
2023-09-01 09:49:29 +02:00
Sanne de Vries
a19883ac75
Fixed signup and header card split layout bug on frontend (#17916)
No ref
2023-09-01 07:20:17 +00:00