Home

>

Tools

>

Ghost

>

Releases

>

4.40.0

Ghost Release: 4.40.0

Tag Name: v4.40.0

Release Date: 3/18/2022

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost v4.40.0 introduces several key improvements including Admin API integration for tiers and offers, product name property for member subscriptions, and a new MemberCancelEvent model to track subscription cancellations. This release also includes important bug fixes for member "last seen at" data, post access in the get helper, and various UI improvements. The API framework has been refactored for better maintainability, and preparations have been made for the upcoming Ghost v5 release by aliasing canary endpoints to non-versioned URLs.

Highlight of the Release

    • Admin API integration for tiers and offers is now enabled
    • Added product name property to member subscriptions
    • New MemberCancelEvent model for tracking subscription cancellations
    • Fixed member 'last seen at' data not being returned in the API
    • Refactored API framework mapper into individual files for better maintainability
    • Aliased canary endpoints to point to non-versioned URLs in preparation for Ghost v5

Migration Guide

Canary API Endpoints

If you're using canary endpoints in your custom code or integrations, be aware that these now point to non-versioned URLs in preparation for Ghost v5. 'Canary' is by definition unstable, so breaking any unprepared client explicitly using the canary is expected.

Token Compatibility

Tokens created for versioned API audiences are forward compatible (created for versioned -> verified at non-versioned API) but not backwards compatible (created for non-versioned -> verified at versioned). If your integration relies on API tokens, ensure you're aware of this behavior.

Upgrade Recommendations

This is a standard feature release with important bug fixes and enhancements. It's recommended for all Ghost users to upgrade to v4.40.0, especially if you:

  1. Use the members feature and have experienced issues with "last seen at" data
  2. Rely on content gating functionality through the get helper
  3. Experience performance issues with the members list screen
  4. Are developing integrations that work with tiers and offers

The upgrade should be straightforward with no breaking changes reported. As always, it's recommended to backup your database before upgrading.

Bug Fixes

Member Data and UI Fixes

  • Fixed member "last seen at" data not being returned in the API, resolving issues where member details showed "Not seen yet" and the members list didn't show last seen dates when filtering
  • Fixed duplicate email open rate column when filtering members by open rate
  • Fixed slow loading and high memory usage of members list screen

Content and Theme Fixes

  • Fixed post access in the get helper, ensuring proper content gating functionality by adding the missing status property to the member object
  • Fixed scheduled date/time inputs not being focusable when used from post preview modal
  • Fixed horizontal scrolling issue in code blocks in emails
  • Fixed minified CSS not reflecting latest changes, which had caused the private site landing page to be visually broken

API and Database Fixes

  • Removed archived tiers from content API unless explicitly requested
  • Fixed various database-related issues in tests to improve reliability
  • Fixed error handling on database truncate in tests

New Features

Admin API Integration for Tiers and Offers

With multiple tiers now generally available, developers can work with Tiers and Offers via Content/Admin API. This update adds permissions to admin integration roles for new sites and includes a migration to update existing sites with correct permissions.

Product Name for Member Subscriptions

Added the member.subscriptions.price.product.name property to the member read endpoint, providing more detailed subscription information.

MemberCancelEvent Model

Introduced a new model that stores members' subscription cancellations, triggered when a subscription is canceled either by an admin or by the member themselves.

Non-versioned API URLs

In preparation for Ghost v5, canary-related URLs have been moved to a non-versioned format. This includes test coverage proving token back compatibility and improved code readability around API URL variables.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Members List Performance

Fixed slow loading and high memory usage of the members list screen, providing a more responsive admin experience when managing large member databases.

API Framework Improvements

Refactored mapper into individual files using the endpoint's docname as the mapper name. This improves code organization and sets the foundation for automating mapper calls for endpoints in the future, reducing the amount of code needed to make the framework work.

Impact Summary

Ghost v4.40.0 brings significant improvements for developers and site administrators. The addition of Admin API integration for tiers and offers empowers developers to build more sophisticated membership solutions. Site administrators benefit from better member management with the new MemberCancelEvent model and fixes to the members list performance.

The refactoring of the API framework's mapper system improves code organization and maintainability, setting the foundation for future enhancements. The preparation for Ghost v5 through non-versioned API URLs indicates the platform's continued evolution.

Several quality-of-life bug fixes improve the experience for content creators and administrators alike, particularly around scheduled posts, member data visibility, and email content rendering. Overall, this release enhances Ghost's capabilities as a professional publishing platform while maintaining stability and improving performance.

Full Release Notes

  • 🐛 Fixed member "last seen at" data not being returned in the API - Kevin Ansfield
  • 🐛 Fixed post access in the get helper (#14282) - Fabien 'egg' O'Carroll
  • 🐛 Fixed duplicate email open rate column when filtering members by open rate - Kevin Ansfield
  • 🐛 Fixed slow loading and high memory usage of members list screen - Kevin Ansfield
  • 🐛 Fixed scheduled date/time inputs not being focusable when used from post preview modal - Kevin Ansfield

View the changelogs for full details:

🪄 Love open source? We're hiring Node.js Engineers to work on Ghost full-time

Statistics:

File Changed86
Line Additions1,800
Line Deletions623
Line Changes2,423
Total Commits38

User Affected:

  • Can now use Admin API integration for tiers and offers
  • Need to be aware of canary endpoints now pointing to non-versioned URLs in preparation for Ghost v5
  • Benefit from improved API framework with refactored mapper into individual files
  • Have access to new `member.subscriptions.price.product.name` property in member read endpoint

Contributors:

tpateldaniellockyerrenovate-botnazrshbhgrgErisDSmatthanleyallouiskevinansfielddjordjevlaisSimonBackx