Commit Graph

15882 Commits

Author SHA1 Message Date
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
Djordje Vlaisavljevic
bbbdd26f3f Added conditionals for displaying mention info
refs https://github.com/TryGhost/Team/issues/2434
2023-01-23 21:42:55 +00:00
Sam Lord
24bdcf5e9d Added WebMentions to data generator
closes: https://github.com/TryGhost/Toolbox/issues/509
closes: https://github.com/TryGhost/Toolbox/issues/507
2023-01-23 17:39:00 +00:00
renovate[bot]
90ad60dd85 Update sentry-javascript monorepo to v7.32.0 2023-01-23 16:46:58 +01:00
renovate[bot]
d4cd6be9f7
Update metascraper to v5.33.5 2023-01-23 12:04:33 +00:00
renovate[bot]
929d32dddf Update dependency knex to v2.4.2 2023-01-23 13:00:53 +01:00
Fabien "egg" O'Carroll
182e0b831d Implemented and tested ResourceService as separate class
refs https://github.com/TryGhost/Team/issues/2465

This code is still in the Ghost package for now as it's essentially glue code.
2023-01-23 18:34:52 +07:00
Fabien "egg" O'Carroll
f746f223cd Implemented and tested RoutingService as separate class
refs https://github.com/TryGhost/Team/issues/2466

This code is still in the Ghost package for now as it's essentially glue code.
2023-01-23 18:34:52 +07:00
Sagar Gupta
bba4743739
Removed bluebird dependency from unit tests in core (#16096)
refs https://github.com/TryGhost/Ghost/issues/14882

- Replaced `new Promise.reject()` / `new Promise.resolve()` with the
static methods `Promise.reject` / `Promise/resolve` from native promises
- Replaced `Promise.delay()` with a promisified `setTimeout()`
2023-01-23 11:23:48 +00:00
Kevin Ansfield
42b30ac613 Fixed email preview input dropdown not closing when clicking on iframe
no issue

- clicks on the iframe never bubble out of the iframe so weren't captured by the dropdown-closing event listener
- added an event listener directly on the iframe's body element when we render the iframe's content that manually calls out to our generic dropdown closing method
2023-01-23 09:47:46 +00:00
Sanne de Vries
4b61f23bd0 Fixed minor email preview visual bugs
No ref
2023-01-23 10:46:30 +01:00
Naz
2a01dd0481
Added test coverage for sitemap base generator
refs https://github.com/TryGhost/Toolbox/issues/503

- The "updateURL" method was not covered during implementation. Covering the gap with basic tests for the "updateURL" method
2023-01-23 16:33:41 +08:00
Naz
4aacd50fee
Added coverage for URLResourceUpdatedEvent
refs https://github.com/TryGhost/Toolbox/issues/503

- The listener was not covered during quick and dirty implementation. While in the area did some cleanup to the sitemap manager test
- One of the problems I've stumbled upon when adding a test is having multiple instances of SiteManager in the test, which in turn created multiple "subscribe" events and repeat handle executions. Fixed it by having just one site manager instance (a singleton) as that's the pattern that used in main codebase
2023-01-23 16:33:41 +08:00
Naz
714a6f6900
Updated sitemaps to react to a partial resource update
refs https://github.com/TryGhost/Toolbox/issues/503

- The Dynamic URL service no longer generates "url.added" event when only a partial resource update happened - only non-url forming properties were modified. The sitemaps service still needs to know when to update the lastmod ("Last Modified") field associated with specific URL.
2023-01-23 16:33:41 +08:00
Naz
39ef1d20db
Excluded 'tiers' from fields that affect url generation for posts
refs https://github.com/TryGhost/Toolbox/issues/503

- Tier's are sometimes dynamically generated and are present in the "_changed" properties, causing full URL regeneration. They have no effect on post's URL, so should not trigger URL regeneration.
2023-01-23 16:33:41 +08:00
Naz
fbf9442e39
Added extra JSDocs
no issue
2023-01-23 16:33:41 +08:00
Naz
ccb485110b
Short-circuited resource URL regeneration when it's not necessary
refs https://github.com/TryGhost/Toolbox/issues/503

- Full URL regeneration process was happening even when only unrelated to URL generation fields were updated (e.g. 'plaintext' change in post does not affect the URL of the post). Stopping the  "resource updated" event processing early circumvents full url regeneration inside of DynamicRouting, which can be quite heavy depending on routing configuration
- The URLResourceUpdatedEvent is supposed to be emmited whenever there's an update to the resource already associated with the URL and no url-affecting fields were touched.
2023-01-23 16:33:41 +08:00
Naz
ec4045cb57
Added dynamic-routing-events package
refs https://github.com/TryGhost/Toolbox/issues/503

- Reusing existing events inside of dynamic routing would only contribute to general confusion that is already there. Having separate "DomainEvents" is the best practice used throughout the code which is substituting generic events.
- The URLResourceUpdatedEvent is supposed to be emmited whenever there's an updated to the resource already associated with the URL circumventing full url regeneration process inside of DynamicRouting
2023-01-23 16:33:41 +08:00
Ronald Langeveld
95b6a9d569
Added mentions email notification alpha flag (#16164)
refs https://github.com/TryGhost/Team/issues/2429

- Added an alpha feature flag toggle for webmentions' email notifications
2023-01-23 15:42:48 +08:00
renovate[bot]
e3b0152ae0
Update dependency ember-template-lint to v5.3.2 2023-01-23 02:01:35 +00:00
Simon Backx
3ac282598c Fixed Playwright tests for new email flow
no issue

Tests stopped working because the Mailgun mocker stopped working since we moved to the new email flow.

This also fixes a unit test that needed to get updated.
2023-01-20 19:00:13 +01:00
Simon Backx
693216c29e Improved failed email error messages
refs https://ghost.slack.com/archives/C02G9E68C/p1673570945616369?thread_ts=1672700158.659209&cid=C02G9E68C

Fixed a typo in the error messages and made the errors more clear. Also hide the email configuration part when there is no email configuration.
2023-01-20 18:37:43 +01:00
Daniel Lockyer
56b0e65583
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-20 18:05:36 +01:00
Ghost CI
ff1039bcbe v5.31.0 2023-01-20 16:01:01 +00:00
Ghost CI
d3557c2879 🎨 Updated Casper to v5.4.5 2023-01-20 16:01:00 +00:00
Simon Backx
a269fbe15a Fixed mention card target link 2023-01-20 15:54:22 +01:00
Simon Backx
5287aeb320 Added noopener security to mention cards 2023-01-20 15:21:23 +01:00
Fabien 'egg' O'Carroll
33ebe971f8
Added BookshelfMentionRepository implementation (#16156)
fixes https://github.com/TryGhost/Team/issues/2418

This stores the received webmentions in the database.

Co-authored-by: Simon Backx <simon@ghost.org>
2023-01-20 14:32:50 +01:00
Rishabh Garg
c7230f1858
Improved email stability (#16159)
- bumps new email flows to GA improving overall email stability
2023-01-20 18:55:20 +05:30
Rishabh
0a65f3405e Added new urls to known referrers list for source attribution
- adds new urls for Google and LinkedIn as known referrers so they are grouped together on Admin
2023-01-20 18:13:05 +05:30
Simon Backx
e879406659
Added outbound link tagging setting (#16146)
fixes https://github.com/TryGhost/Team/issues/2432
    
Adds outbound_link_tagging setting (enabled by default and behind
feature flag). If the feature flag is enabled, and the setting is
disabled, we won't add ?ref to links in emails.
    
This includes new E2E tests for email click tracking, which were also
extended to check outbound link tagging (for both MEGA and the new email
stability flow).

Also fixes a test fixture for the comments_enabled setting.
2023-01-20 13:41:36 +01:00
Simon Backx
8a95c62ff1
🐛 Fixed post links being marked as edited when they were not (#16153)
fixes https://github.com/TryGhost/Team/issues/2461

- Ignores 'edited' links when there is only one second differences.
- Make sure we don't set updatedAt when linking a post to a redirect
2023-01-20 13:31:54 +01:00
Daniel Lockyer
34fe49b110
Added version information to log lines
refs https://github.com/TryGhost/Toolbox/issues/501

- this reverts commit 48dda23554
- also includes a resolution for `@elastic/elasticsearch` so we don't
  run a version that is potentially problematic - see referenced issue
  for context
2023-01-20 13:18:44 +01:00
Fabien "egg" O'Carroll
40c280f6ac Improved naming of output serializer url util 2023-01-20 18:49:26 +07:00
Fabien "egg" O'Carroll
68f469c78b Fixed mock instantiation
This mock will fail by default now, which stops us from adding bad data in prod.
2023-01-20 18:49:26 +07:00
Fabien "egg" O'Carroll
833182bc7f Implemented a basic RoutingService for Mentions
refs https://github.com/TryGhost/Team/issues/2466

This initial implementation just checks that we're on the right origin and
subdomain, but should be extended to check if the URL actually resolves to a
page hosted on the site!
2023-01-20 18:49:26 +07:00
Fabien "egg" O'Carroll
5b4bc01504 Added initial inline ResourceService implementation
refs https://github.com/TryGhost/Team/issues/2465

We've restricted this to Post resources for now until we update the Mention
entity to be able to handle multiple resource types.
2023-01-20 18:49:26 +07:00
Naz
d44386dae3
Refactored resource config as a DI in Resources
refs https://github.com/TryGhost/Toolbox/issues/503
refs https://github.com/TryGhost/Toolbox/issues/406

- In Ghost 5.x we dropped multi-versioned API, which means there's no need to track resource configs dynamically as there can only be one version
- Along with removed "initResourceConfig" refactored the "config" file itself to be injected into Resource's constructor - allows for easier testing.
2023-01-20 19:47:26 +08:00
Ronald Langeveld
3061fb2b3b
Added mentions database table (#16150)
closes https://github.com/TryGhost/Team/issues/2417

- added new `mentions` database table to be able to store incoming webmentions.
- updated schema and tests to match.
2023-01-20 19:08:07 +08:00
Simon Backx
8c9893e568 Improved MentionSendingService timeout
no issue

The current timeouts were unreliable.
2023-01-20 11:46:18 +01:00
Steve Larson
8895d22602
Added mention discovery service (#16154)
fixes https://github.com/TryGhost/Team/issues/2407

The MentionDiscoveryService fetches mentioned sites to return the webmention endpoint.
2023-01-20 11:45:48 +01:00
Fabien 'egg' O'Carroll
b1e6eb0b5e
Unsubscribed existing Members with suppressed emails (#15952)
refs https://github.com/TryGhost/Team/issues/2367

We already have existing Members which have their emails suppressed that
need to have their newsletter subscriptions removed.
2023-01-20 16:14:50 +07:00
renovate[bot]
81fe4840dd Update dependency postcss to v8.4.21 2023-01-20 09:07:51 +01:00
Djordje Vlaisavljevic
f7f2224fc5 Added logic for displaying author and publisher
refs https://github.com/TryGhost/Team/issues/2434
2023-01-19 22:38:30 +00:00
renovate[bot]
3737788d75 Update dependency i18next to v22.4.9 2023-01-19 17:58:16 +00:00
Simon Backx
a596acf7d2
Added MentionSendingService (#16151)
fixes https://github.com/TryGhost/Team/issues/2409

The MentionSendingService listens for post changes and sends webmentions
for outbound links in the post.
2023-01-19 17:35:10 +01:00
Daniel Lockyer
1f32a7be8a
Added CI test to ensure i18n strings are extracted out
refs https://github.com/TryGhost/Ghost/issues/15502

- this will test if we have strings that aren't present in the JSON
  files in CI, so we don't miss out on translations
2023-01-19 16:20:55 +01:00
Djordje Vlaisavljevic
437e1cc936 Updated Mention card design
refs https://github.com/TryGhost/Team/issues/2434
2023-01-19 12:52:28 +00:00
Djordje Vlaisavljevic
62d4746469 Added missing properties
refs https://github.com/TryGhost/Team/issues/2434
2023-01-19 12:50:57 +00:00
Kevin Ansfield
7e98f1b9f4 Fixed editor cards being accessible when their availability checks failed
no issue

Using the slash menu it was possible to insert cards that shouldn't have been accessible based on their availability checks. This was happening because we were only hiding the visibility of the cards in the template rather than completely removing them from the slash command matching logic.

- added `{{card-menu-items}}` helper that combines the availability matching and snippet section addition to return a complete array of sections+items that match the current system state and post type
- added `@menuItems` argument set to the output of `{{card-menu-items}}` to the two card menu components so they are working against a pre-filtered list of menu items
  - lets us remove duplication of code that handled pushing snippets section into the menus
- removed availability check conditionals from `<KoenigMenuContent>` as the menu items passed in are now pre-filtered
2023-01-19 12:38:49 +00:00
Fabien "egg" O'Carroll
111c5742c9 Implemented WebmentionMetadata using the oembed service
https://github.com/TryGhost/Team/issues/2458

This is an initial pass at pulling metadata from webmention sources, we've also
updated the fake data to pull from some real-world sites which implement
webmentions. We've reused the oembed service here, long term it would be nice to
pull the metadata parsing/pulling part out, so that we can have more generic
error messages.
2023-01-19 19:25:52 +07:00
Fabien "egg" O'Carroll
4215786bf1 Improved internal types for the Mention entity
This makes development a little more streamlined, and helped catch a wee bug!
2023-01-19 19:25:19 +07:00
Fabien "egg" O'Carroll
3a0e0831ec Updated Mention entity validation of properties
Based on a discussion in slack we want to make all metadata properties optional,
with the exception of the title, which will default to the host of the source
URL if it's missing.

This is so that we can accept as many webmentions as possible and convert them
into Mentions. If we were to have strictly validation, we'd end up having to
drop webmentions that didn't match our criteria, and lose important data.

Giving the title a default allows us to provide a consistent UI experience too.
2023-01-19 19:24:07 +07:00
Fabien "egg" O'Carroll
743da542d0 Wired up the Webmention receive endpoint to the Mentions service
refs https://github.com/TryGhost/Team/issues/2419

This is the initial stab at having everything wired up, we're not
using a queue but we are handling the processing of the Webmention
asyncrounsly so that the HTTP response can be end immediately.

We've also laid the groundwork for extending and implementing the
correct processing of Webmentions, for example checking if the target
URL exists in the system, pulling out the metadata from the Webmention
source and fetching any internal resources.
2023-01-19 18:41:49 +07:00
Fabien "egg" O'Carroll
d0d45d45bc Refactored OEmbed service into a proper service
This allows us to share the implementation with other parts of the codebase, the
specific usecase here being fetching the metadata from webmention sources, for
display in the mentions UI, which will be borrowing a lot of stuff from the
bookmark card.
2023-01-19 18:41:49 +07:00
Fabien "egg" O'Carroll
a7eeb8f628 Fixed Mention Admin API mapper
There was a typo when reading the featured image property causing it not to show
up in the API responses.
2023-01-19 18:41:49 +07:00
Fabien "egg" O'Carroll
52892e0695 Added source_site_title and source_author to Mentions Admin API
refs https://github.com/TryGhost/Team/issues/2435

We need to update the API to explicitly include the new data from our Mention
entity
2023-01-19 18:41:49 +07:00
Fabien "egg" O'Carroll
560d168169 Added site title and author to Mention entity
refs https://github.com/TryGhost/Team/issues/2435

We've made these fields optional, and we may need to extend this to other fields
too as we discover more about the data we're able to get access to.
2023-01-19 18:41:49 +07:00
Daniel Lockyer
f45bba21f6
Disabled autoRefresh for inserted Actions events
- we don't end up using the inserted model from Bookshelf, so we
  shouldn't be performing a SELECT on the entry
- this disables refreshing the model using Bookshelf's `autoRefresh:
  false` and allows the key through the sanitization for `add
2023-01-19 09:28:28 +01:00
renovate[bot]
150f2f8a5f Update dependency eslint-plugin-react to v7.32.1 2023-01-19 01:55:30 +00:00
Daniel Lockyer
fbbea1c8a1
Configured i18next-parser settings
refs https://github.com/TryGhost/Ghost/issues/15502

- prevent it from creating `_old` files
- set JSON indentation to 4 spaces
2023-01-18 18:29:54 +01:00
Daniel Lockyer
2cf161168b
Added yarn translate:portal command
refs https://github.com/TryGhost/Ghost/issues/15502

- the amazing `i18next-parser` dependency will extract our translated
  strings from Portal and dump them into locale files, so we never have
  to add them manually
2023-01-18 18:23:53 +01:00
Djordje Vlaisavljevic
3634815a51 Updated HTML tags
refs https://github.com/TryGhost/Team/issues/2434
2023-01-18 16:49:04 +00:00
Djordje Vlaisavljevic
a3fcd5be6a Added static mention card design
refs https://github.com/TryGhost/Team/issues/2434
2023-01-18 16:42:44 +00:00
Daniel Lockyer
fb030353fe
Moved i18n translations into JSON files
refs https://github.com/TryGhost/Ghost/issues/15502

- plain JSON files are cleaner and less overwhelming than boilerplate JS
  files, and given they're going to be automatically generated, we
  probably won't be able to support comments anyway
2023-01-18 17:03:22 +01:00
Elena Baidakova
7ba40a92a1
Added @tryghost/kg-simplemde package (#16147)
refs TryGhost/Team#2427
2023-01-18 19:54:59 +04:00
Sanne de Vries
f5d03409c9 Fixed video card thumbnail error message incorrectly shown
No ref
2023-01-18 15:17:16 +01:00
Daniel Lockyer
5b2fc983c6
Added email snapshots to settings BREAD service test
refs https://github.com/TryGhost/Toolbox/issues/499

- switching to email snapshots allows us to track more of our output to check for regresssions
2023-01-18 14:19:27 +01:00
Daniel Lockyer
0d9268ad86 Added i18n package
refs https://github.com/TryGhost/Ghost/issues/15502

- this is an early implementation of an i18n provider by
  exporting an instance of `i18next`
- there's a lot more to be done here but baby steps :)
2023-01-18 13:54:14 +01:00
Simon Backx
4d54880113
Added error handling for ENAMETOOLONG import error (#16054)
fixes https://github.com/TryGhost/Team/issues/2200

When zipping a folder that contains files with UTF-8 characters in the filename, using the MacOS Archive Utility, the resulting zip will be missing some UTF-8 configuration bit. This breaks the unzipper, causing it to decode the filenames using the wrong encodign.

When the file names are long, and become longer than the length allowed by the OS, an ENAMETOOLONG error is thrown. This error is not handled by the importer, and causes the import to fail.

This adds a specific check for this error so we can show a clear error message to the user, that helps them to resolve the issue. We are currently unable to fix the issue on our side, because of a lack of well supported zip libraries for node.
2023-01-18 13:28:36 +01:00
Simon Backx
6c2af0793c Fixed failing Stripe webhook test
refs acf0baa8c7

Due to the bump in express-test, we now handle string bodies 'properly'. So they now pass all the Express middlewares. In the past this failing test did not really pass by the bodyParser.raw middleware,
so the content-type check on the `bodyParser.raw({type: 'application/json'})` middleware was not executed. Now it is, and the test fails because the content-type header was not set to application/json.
2023-01-18 12:05:55 +01:00
Simon Backx
acf0baa8c7 Updated express-test to 0.13.0
no issue

This includes support for uploading files in tests.
2023-01-18 11:42:42 +01:00
Simon Backx
2dc9c7dbba
🐛 Fixed suppression list data for emails with plus sign (#16140)
no issue

When fetching the suppression list data for emails with a plus sign, the
parsing of the NQL filter fails:

```at Child.applyDefaultAndCustomFilters (/Ghost/node_modules/@tryghost/bookshelf-filter/lib/bookshelf-filter.js:66:23)
[ghost] email:[simon+test@ghos
[ghost] ------------^
[ghost] Expecting 'OR', 'RBRACKET', got 'AND'
```
2023-01-18 10:17:57 +01:00
Daniel Lockyer
9ba251238a Added Content-Version header to all API requests
refs https://github.com/TryGhost/Team/issues/2400

- we've deemed it useful to start to return `Content-Version` for all
  API requests, because it becomes useful to know which version of Ghost
  a response has come from in logs
- this should also help us detect Admin<->Ghost API mismatches, which
  was the cause of a bug recently (ref'd issue)
2023-01-18 08:38:07 +01:00
Daniel Lockyer
85051199e3
Added email snapshots for API versioning tests (#16139) 2023-01-18 08:09:28 +01:00
renovate[bot]
28ed23c13e Update dependency knex to v2.4.1 2023-01-18 07:43:07 +01:00
Naz
967dd7d244
Added deprecation notice to mockManager's sentEmailCount
refs https://github.com/TryGhost/Toolbox/issues/499

- The mockManager's sentEmailCount is left here to avoid breaking many tests that already depend on this method. With future improvements to email snapshot tests this method should not be used. Instead, emailMockReceiver's own sentEmailCount method should be used directly.
2023-01-18 12:55:45 +08:00
Simon Backx
87be76ebb3 Added externalAttribution feature flag
fixes https://github.com/TryGhost/Team/issues/2430
2023-01-17 15:15:32 +01:00
Djordje Vlaisavljevic
5a90975288 Fixed staff page bug when logged in as editor
no refs
2023-01-17 14:02:01 +00:00
Simon Backx
34d4e5c8d0
Added logging to webmention endpoint (#16137)
closes https://github.com/TryGhost/Team/issues/2424

Adds the new webmention endpoint, responds with the correct statuscode
and empty body at `https://site.ghost/webmentions/receive/`.

Also updates the head link tag to the new endpoint location. We don't
use /webmention because that could conflict with post slugs.
2023-01-17 14:26:43 +01:00
Daniel Lockyer
48dda23554
Reverted "Added version information to log lines"
refs https://github.com/TryGhost/Toolbox/issues/501

- this reverts commit f2116357b7
- something with Elasticsearch is causing high CPU usage, so this commit
  reverts that for now
2023-01-17 13:20:47 +01:00
Ronald Langeveld
57bc14e00f
Added Mentions endpoint to Admin (#16136)
ref https://github.com/TryGhost/Team/issues/2421

- added the Mentions API endpoint to Admin
- setup initial mention model in the Ember Store to be able to dev with the endpoint
- added basic routing to access the `/mentions` page that is currently behind feature flags
- Setup basic testing with a mirage mock endpoint.
2023-01-17 20:16:18 +08:00
Fabien "egg" O'Carroll
008d83ad08 Fixed the Mention mapper
This had some leftover code in that shouldn't have been merged.
2023-01-17 17:06:22 +07:00
Fabien "egg" O'Carroll
1babf6126a Added initial basic Mentions implementation
refs https://github.com/TryGhost/Team/issues/2416

This extends the mock API to use a more formal pattern of moving our
entity code into a separate package, and use the service/repository
patterns we've been work toward.

The repository is currently in memory, this allows us to start using
the API without having to make commitments to the database structure.

We've also injected a single fake webmention for testing. I'd expect
the Mention object to change a lot from this initial definition as we
gain more information about the type of data we expect to see.
2023-01-17 17:01:20 +07:00
renovate[bot]
3d79d10ddf Update dependency mysql2 to v3.0.1 2023-01-17 08:22:53 +01:00
Fabien 'egg' O'Carroll
a8a279d667
Wired up mock Mentions Admin API (#16134)
refs https://github.com/TryGhost/Team/issues/2416

This doesn't even return a Mention in the correct format at the moment,
but it's just to get an endpoint there, behind a flag and returning data
so that we can start playing with the API and having it hooked up the
the Admin.

The next step will be fleshing this out further and defining the
services and repository to back it, as well as updating the Admin so that
we can fetch mentions to display in the UI
2023-01-17 12:39:32 +07:00
Ronald Langeveld
e55405691a
Added webmentions package (#16133)
refs https://github.com/TryGhost/Team/issues/2408

- Added webmentions package 
- Setup basic folder structure, controllers, repositories & services to
get started.
- note package haven't been published yet
2023-01-17 13:18:16 +08:00
Naz
112ab23968
Removed direct use of @tryghost/jest-snapshot
refs https://github.com/TryGhost/Toolbox/issues/499
refs 6bcc47a0ad

- Using module directly caused issues with snapshots manager instance initialization (mocha hooks did not apply to a correct instance)
- See refed commit for more
2023-01-17 12:50:49 +08:00
Naz
1f6b2b4d5e
Added email content testing capabilities
refs https://github.com/TryGhost/Toolbox/issues/499

- Outgoing emails have been a weak point of Ghost's stability recently. The concept of "emailMockReceiver" similarly to "webhookMockReceiver", allows to test side-effects like outgoing emails.
- This is a first iteration which should lay groundwork for testing all outgoing emails in the future
- The change adds a new concept of "email mock receiver" which is very similar to how the "webhook mock receiver" works. The email mock receiver exposes two methods to record and verify snapshots:
- matchHTMLSnapshot - records and verifies only the HTML content of the outgoint email
- matchMetadataSnapshot - records and verifies all the non-HTML properties sent along an email content, e.g.: to address, plaintext, subject, etc.
- What's missing is matching content based on dynamic content like dates, links with JWT tokens, etc.
2023-01-17 12:50:49 +08:00
Steve Larson
9199547bfe add webmentions feature flag
refs #2406
Adding the alpha feature flag so we can begin testing.
2023-01-16 15:03:36 -06:00
renovate[bot]
e95cff2ef4 Update dependency glob to v8.1.0 2023-01-16 09:59:45 +01:00
renovate[bot]
15c6fbb12a Update dependency html-validate to v7.13.1 2023-01-16 09:57:58 +01:00
Ghost CI
460d2dc339 v5.30.1 2023-01-16 05:35:14 +00:00
Fabien 'egg' O'Carroll
a30bbd5c69
Added webmention endpoint discovery link to ghost_head (#16126)
We've wrapped both changes in a try/catch to make sure this has no
adverse affects. The endpoint currently doesn't exist - we're only
adding this to get an idea of how much traffic we'll expect to see.

Long term we'll want to read the endpoint from the webmention service.
2023-01-16 12:32:04 +07:00
renovate[bot]
9dda708305
Update dependency eslint to v8.32.0 2023-01-16 00:19:30 +00:00
Ghost CI
2884521195 v5.30.0 2023-01-13 16:00:44 +00:00
Rishabh
fea75365c7 Updated guard for site data in Portal
closes https://github.com/TryGhost/Team/issues/2276

Portal had died with an unintelligible error about portal plans/includes being undefined when there was missing site data in some extreme edge cases. This change catches any errors in site transformation and logs it to console instead of crashing portal unexpectedly
2023-01-13 21:01:58 +05:30
Daniel Lockyer
c4391567f3
Updated jsdoc for mailgun-client
- in the event the Mailgun config doesn't exist, we return `null` from
  this function
- this updates the jsdoc to correct the return type of `getInstance`
2023-01-13 16:10:32 +01:00
Rishabh Garg
7d060e5edb
Bumped email stability flag to beta (#16116)
- allows email stability to be turned on without developer experiments enabled
2023-01-13 20:30:15 +05:30
Rishabh
8d4bc97dbe Fixed admin utils test
refs 9fc9e4311d
2023-01-13 19:49:01 +05:30
Peter Zimon
1ccb2f08e7 Improved mobile popup for feedbacks
no refs.

Post feedback popups were not optimised for mobile usage at all. All the content was on top of the window which is really hard to reach using a single hand/thumb and it just looked like a scaled down version of a desktop modal.
2023-01-13 15:14:49 +01:00
renovate[bot]
a990769e31 Update dependency jwks-rsa to v3.0.1 2023-01-13 14:07:10 +01:00
Rishabh
9fc9e4311d Removed www prefix from newsletter link table
closes https://github.com/TryGhost/Team/issues/2206

- removes `www.` from the url shown on links table in post analytics
- we had previously removed http(s) protocol from it as well, and they are only shown while editing the url
2023-01-13 15:38:54 +05:30
Sanne de Vries
1645f551bc Fixed error message display bug in video card
No ref
2023-01-13 09:56:36 +01:00
Fabien 'egg' O'Carroll
14f282d640
Improved newsletter delivery rates and email suppression handling
This introduces the new suppressions feature which will automatically
unsubscribe members from newsletters when their email is added to the
suppression list in Mailgun, this is usually due to emails either
permanently bouncing to the address, or the member making a spam
complaint.

Both Members and Admins are able to see that the email has been added to
the list, and Members are be able to request their email be removed from
the list via Portal.

Overall this feature should improve delivery rates of newsletters and
improve the rating of the domain you're sending from.
2023-01-13 15:46:57 +07:00
Naz
c2b18f0c87
🔥 Removed support for {{lang}} helper
refs https://github.com/TryGhost/Toolbox/issues/497
refs https://github.com/TryGhost/Toolbox/issues/406

- Removes {{lang}} helper which has been completely deprecated since Ghost 5.0. When using the helper in themes with 5.x backend the output will be empty
2023-01-13 13:12:53 +07:00
Rishabh Garg
755e031017
Fixed hidden free tier in Portal settings (#16072)
closes https://github.com/TryGhost/Team/issues/2338

If a site has the Free tier hidden from the Portal, and subsequently the Stripe connection is disconnected, this produces a dead-end state where no new members can sign up and the Free tier cannot be reactivated again in Portal settings as its hidden. This change -

- enables free tier toggle to be always shown on site irrespective of Stripe connection
2023-01-12 19:29:17 +05:30
renovate[bot]
bb2ffee69d Update dependency @playwright/test to v1.29.2 2023-01-12 11:35:22 +01:00
Sam Lord
f2116357b7 Added version information to log lines
refs: https://github.com/TryGhost/Toolbox/issues/502

Updated to @tryghost/logging@2.4.0 to allow metadata to be logged
2023-01-12 10:34:23 +00:00
renovate[bot]
02e84bf62a Update sentry-javascript monorepo to v7.30.0 2023-01-12 11:32:44 +01:00
Daniel Lockyer
9b38bd9509
🐛 Fixed ECONNRESET error when connecting to Azure MySQL DB
fixes https://github.com/TryGhost/Ghost/issues/14990

- there was a bug in `mysql2` [1] when connecting to Azure DBs, but this was
  subsequently fixed, so this commit bumps the package in Ghost and
  `knex-migrator`, where this was also bumped
- of note, this release includes https://github.com/sidorares/node-mysql2/pull/1666 and
  https://github.com/sidorares/node-mysql2/pull/1751, which are very interesting

[1]: https://github.com/sidorares/node-mysql2/pull/1438
2023-01-12 10:46:09 +01:00
Rishabh
ee7474db45 Fixed portal failure on opening email prefs for logged out member
- opening email preferences page via portal link doesn't work if member is not logged in.
- opens the signin page now instead of silently crashing
2023-01-12 13:02:41 +05:30
Rishabh
28bea791dd Added playwright tests for portal links
refs https://github.com/TryGhost/Team/issues/2371
2023-01-12 13:02:41 +05:30
Ronald Langeveld
f0e98c8bcb Fixed TypeError in filter-value
no issue

- Fixes a `TypeError` that sometimes crops up when setting filters from
  the URL parameters.
2023-01-12 13:18:55 +08:00
renovate[bot]
0fc72f6bd7
Update dependency eslint-plugin-react to v7.32.0 2023-01-11 16:27:56 +00:00
Elena Baidakova
a7366249bc
Added data-test attr for e2e tests to Portal (#16104)
refs TryGhost/Team#2371
2023-01-11 19:39:29 +04:00
Simon Backx
d5a359f2db Removed possibility to use {uuid} replacements in email
fixes https://github.com/TryGhost/Team/issues/2383

A user could use `{uuid}` inside an email only content and it would work. This currently isn't supposed to be used outside internal features (link click tracking, feedback buttons). For now this is only fixed in the new email flow under the email stability flag.
2023-01-11 15:56:15 +01:00
Sanne de Vries
c616f56a2a Replaced copy that uses "See" to "View" across Admin
Refs https://www.notion.so/ghost/Member-activity-improvements-247080c54dac4ebf86d10b38508d2a19
2023-01-11 15:44:23 +01:00
Simon Backx
8a2303413d Restricted email-service package to 100% test coverage
fixes https://github.com/TryGhost/Team/issues/2339

The email service is now fully covered by tests, and this commit also forces the test coverage to remain 100% after future changes.
2023-01-11 13:54:26 +01:00
Simon Backx
ee36a0fce9 Added 100% test coverage to SendingService
refs https://github.com/TryGhost/Team/issues/2339
2023-01-11 13:39:25 +01:00
Ronald Langeveld
0e2d1b3afd
Added redeemed offers filtering for members (#16071)
closes https://github.com/TryGhost/Team/issues/2011

- Gives publishers the ability to filter members based on which offer they used (redeemed) when they subscribed for a paid membership.
- On the offers page, the redemption count number links to a the members page with the filter already applied making it easy to have insight on which members used the offer / coupon.
2023-01-11 20:13:09 +08:00
Elena Baidakova
1aae5ba2eb
Added e2e tests for default tier (#16103)
refs TryGhost/Team#2371
2023-01-11 15:44:34 +04:00
Sanne de Vries
48ea2a871b
Updated editor re-authentication modal (#16102) 2023-01-11 12:39:04 +01:00
Simon Backx
9650521376 Fixed variable date formatting in new email flow
refs https://github.com/TryGhost/Ghost/actions/runs/3892250013/jobs/6643448457

Depending on the environment the date formatting in a newsletter could change. Now it is always set to the DD MMM YYYY format (like the old flow).
2023-01-11 12:26:09 +01:00
Simon Backx
6a664d11b9 Added 100% test coverage to email renderer and fixed authors bug
refs https://github.com/TryGhost/Team/issues/2339

This fixed a bug in the new email flow that more than 2 authors were displayed as 'undefined & 2 others'.
2023-01-11 12:14:02 +01:00
Elena Baidakova
a3f7188369
Added e2e tests for archive/unarchive tiers (#16101)
refs TryGhost/Team#2371
2023-01-11 13:53:07 +04:00
Daniel Lockyer
f8fe009f9f
Merged v5.29.0 into main 2023-01-11 09:30:13 +01:00
Ghost CI
d8e3f29a76 v5.29.0 2023-01-11 08:23:41 +00:00
Fabien "egg" O'Carroll
1e393472dd Truncated suppressions table
We have been adding emails to the suppressions table which are not on
the suppression list in Mailgun due to a misunderstanding of how
Mailgun handles 5xx error codes.
2023-01-11 15:14:08 +07:00
Fabien "egg" O'Carroll
9fe3555897 Updated MailgunEmailSuppressionList to only handle previous bounces
We're seeing behaviour from Mailgun where permanent failures with a
5xx error code are not being added to their internal suppression list,
which is resulting in the Ghost list becoming out of sync with
Mailgun.

Rather than adding emails to the suppression list when Mailgun does,
we're instead going to add emails _after_ Mailgun does, by waiting for
an error code which tells us the email is already on the suppression
list.

Those codes are 605 for previous bounces and 607 for previous spam complaints.
2023-01-11 15:13:57 +07:00
renovate[bot]
a795359c1a Update dependency html-validate to v7.12.2 2023-01-11 09:13:56 +01:00
Fabien "egg" O'Carroll
8005e8a641 Truncated suppressions table
We have been adding emails to the suppressions table which are not on
the suppression list in Mailgun due to a misunderstanding of how
Mailgun handles 5xx error codes.
2023-01-11 15:10:39 +07:00
Fabien "egg" O'Carroll
49af26279d Updated MailgunEmailSuppressionList to only handle previous bounces
We're seeing behaviour from Mailgun where permanent failures with a
5xx error code are not being added to their internal suppression list,
which is resulting in the Ghost list becoming out of sync with
Mailgun.

Rather than adding emails to the suppression list when Mailgun does,
we're instead going to add emails _after_ Mailgun does, by waiting for
an error code which tells us the email is already on the suppression
list.

Those codes are 605 for previous bounces and 607 for previous spam complaints.
2023-01-11 15:10:39 +07:00
Elena Baidakova
9c664c8d02
Added data attributes to admin/tiers (#16095)
refs TryGhost/Team#2371
2023-01-11 11:35:55 +04:00
Ronald Langeveld
38174e0fd4 Added newsletters filter admin test
ref https://github.com/TryGhost/Team/issues/2012

- Added missing test for filtering members from specific newsletters
2023-01-11 14:49:23 +08:00
renovate[bot]
b86eaf8e71
Update dependency nock to v13.3.0 2023-01-10 21:36:44 +00:00
Simon Backx
117afb232c Improved stability of batch sending test
refs https://github.com/TryGhost/Ghost/actions/runs/3884901582/jobs/6628075997

The 'Doesn't include members created after the email in the batches' test sometimes failed randomly because of timing. This change ensures a strict timing.
2023-01-10 17:12:56 +01:00
Simon Backx
6a364e7779 Added 100% test coverage for EmailEventStorage
refs https://github.com/TryGhost/Team/issues/2339
2023-01-10 16:36:41 +01:00
Simon Backx
9ca2e3f183 🐛 Fixed storing email recipient failures
fixes https://github.com/TryGhost/Team/issues/2398

There was an error when fetching the existing email recipient failure. It ended up matching all recipient failures. The result was that only one failure was stored in the database.
2023-01-10 15:41:42 +01:00
Simon Backx
bdf45fad84 Added 100% test coverage to BatchSendingService
refs https://github.com/TryGhost/Team/issues/2339
2023-01-10 14:58:50 +01:00
Rishabh
7a74ec8daa Updated playwright tests to use updated data ids
refs https://github.com/TryGhost/Team/issues/2371

- cleans up and adds comments for portal playwright tests
- updates data test attributes for portal trigger and popup selectors for consistency
- updates data attribute usage for offers
2023-01-10 13:33:12 +05:30
renovate[bot]
c6d3bebf24 Update metascraper to v5.33.4 2023-01-10 06:56:01 +00:00
Rishabh
1a2a4829ed Released Portal v2.24.1 2023-01-10 11:49:35 +05:30
Rishabh
86c3a890a7 Updated portal frame ids
refs https://github.com/TryGhost/Team/issues/2371

- updates portal trigger and popup frame data test ids
2023-01-10 11:48:29 +05:30
Rishabh
7fea221137 Released Portal v2.24.0 2023-01-10 11:23:41 +05:30
Rishabh
628b80778f Updated create tier playwright util for all archived tiers
refs https://github.com/TryGhost/Team/issues/2371

- in case all tiers are archived before new tier is created, the add tier section can be collapsed and will need to be opened first before going through add tier flow
2023-01-10 09:34:21 +05:30
Rishabh
6987cf188f Added data test ids for portal
refs https://github.com/TryGhost/Team/issues/2371

- adds missing data test attributes for multiple portal components like popup iframe, view plans button etc
2023-01-10 09:34:21 +05:30
renovate[bot]
b3a6f74c0b
Update dependency luxon to v3.2.1 [SECURITY] 2023-01-09 16:38:57 +00:00
Elena Baidakova
69d4a96fb8
🎨 Add ability to send test email with chosen newsletter (#15783)
closes TryGhost/Team#1897

-
[Design](https://www.figma.com/file/RpEbPA7H7VHLtXjt3YyB2t/Multiple-Newsletters-Preview?node-id=0%3A1&t=YkDXy063OkCrAI4a-0)
-
[Discussion](https://ghost.slack.com/archives/C019B1K4FAM/p1667924062808939)
2023-01-09 17:48:30 +04:00
Elena Baidakova
5b5f4cdd3f
🐛 Fixed feedback buttons for dark mode (#16091)
refs TryGhost/Team#2396
2023-01-09 16:40:42 +04:00
Sanne de Vries
dd93422f28 Removed signup and conversion stats from page list
Refs https://www.notion.so/ghost/Remove-stats-from-pages-3f8d6eaf4b734c46a84b910b1a76e972
2023-01-09 12:18:32 +01:00
Sanne de Vries
edbc1a5839 Revert "Updated copy for email sending failure error message"
This reverts commit 3046e30802.
2023-01-06 19:24:32 +01:00
Sanne de Vries
3046e30802 Updated copy for email sending failure error message
No ref
2023-01-06 19:14:46 +01:00
renovate[bot]
608d4eb6d2 Update dependency knex to v2.4.0 2023-01-06 19:11:14 +01:00
Ghost CI
ab26c474f1 v5.28.0 2023-01-06 16:00:44 +00:00
Simon Backx
21835b0b03 🐛 Fixed duplicate member columns when filtering
refs https://ghost.slack.com/archives/CTH5NDJMS/p1672999077197199

When filtering on the same filter twice, columns were added twice. This change removes duplicate columns.
2023-01-06 16:04:22 +01:00
Simon Backx
26635f192f Added visible theme errors in admin
fixes https://github.com/TryGhost/Team/issues/2393
2023-01-06 15:51:34 +01:00
Simon Backx
3ddc85781c Fixed theme warnings not passed when installing theme
refs 6593c3e4a6

In development mode, we didn't pass the warnings when installing a theme. So the warnings were not visible with the fatal errors.
2023-01-06 15:26:54 +01:00
Simon Backx
f6e463ea43 Fixed missing awaits in publishing Playwright test
no issue
2023-01-06 14:18:54 +01:00
Rishabh
54b27f7d55 Fixed offers playwright test for redemption count
- updates check of redemption count using data test attributes to avoid unreliable member count check
2023-01-06 18:39:38 +05:30
Simon Backx
6593c3e4a6 🐛 Fixed warnings not visible when uploading theme with fatal errors
refs https://github.com/TryGhost/Team/issues/2393

Small bug if you upload a theme that has fatal errors, in development mode the warnings are not visible.
2023-01-06 13:54:09 +01:00
Simon Backx
7b3712a15b
Added visible theme errors in admin (#16081)
refs https://github.com/TryGhost/Team/issues/2393

- During boot and loading the active theme, we now cache the result of
the gscan validation. Cache configuration can happen in
`adapters.cache.gscan`
- We now also return non-fatal errors when activating or adding a theme.
- When the `themeErrorsNotification` feature flag is on, we fetch the
active theme (which includes the validation information) when loading
admin
- If the currently active theme has errors, we show an error
notification that can open the error modal
- Added a new endpoint: `/ghost/api/admin/themes/active/` that returns
the result of the last gscan validation of the active theme. If no cache
is available, it will run a new gscan validation.
- Added new permissions for the active action/endpoint (author, editor,
administrator)
2023-01-06 13:44:27 +01:00
Naz
a37bd19f74
ℹ️ Bumped gscan to 4.36.0
closes https://github.com/TryGhost/Toolbox/issues/497

- The classification of fatal/non-fatal errors has been updated to only be fatal when causing page renders with 5xx or 4xx responses.
- Some of the rules checking Ghost 5.x compatibility have been relaxed to only be "error" with the gscan version bump
- You can find more details on which exact rules were relaxed in the gscan's commit log - https://github.com/TryGhost/gscan/compare/v4.35.1...v4.36.0
2023-01-06 18:05:07 +07:00
Naz
3e209218d7
Made resource mismatch error more specific
refs https://github.com/TryGhost/Toolbox/issues/497

- During gscan fatal error downgrade to non-fatal some of the deprecated helpers were a bit vague to debug with no information on which exact "resource" was invalid
- Added resource name to the log for clarity. Should make life easier when debugging potential get helper misuses
2023-01-06 18:05:07 +07:00
Naz
8911af150a
Removed "code" property from global error variable
refs https://github.com/TryGhost/Toolbox/issues/406
refs b2a3e03ef3

- The "code" property in the global "error" variable (accessible via {{error.*}}) has been long deprecated - time to go, bye!
- When {{code}} or {{error.code}} helpers are used in the templates they will output an empty string from now on. Use {{statusCode}} instead!
2023-01-06 18:05:07 +07:00
renovate[bot]
f58a7725d6 Update dependency luxon to v2.5.2 2023-01-06 11:59:24 +01:00
renovate[bot]
1c64b8a8fc Update dependency html-validate to v7.12.1 2023-01-06 11:58:57 +01:00
Sam Lord
36e7e79eec Improved Playwright test, selector for redemption count
no issue

Selector for redemption count was not ideal - this makes it more specific & clear.
2023-01-06 10:56:19 +00:00
Rishabh
30c9dfd68d Fixed failing playwright test to remove member labels
- the test was using incorrect test state that was copied over from adding label test
- also adds guard for empty newsletters in member filters as in some cases it might not exist as found by test
2023-01-06 16:17:34 +05:30