Home

>

Tools

>

Ghost

>

Releases

>

4.41.3

Ghost Release: 4.41.3

Tag Name: v4.41.3

Release Date: 3/25/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.41.3 is a maintenance release that focuses on internal code improvements and bug fixes. Key updates include adding serializers for various API endpoints, improving error handling for themes, fixing issues with offers functionality, and adding detection for deprecated theme configurations. This release enhances stability and prepares the codebase for future changes while addressing several minor bugs reported by users.

Highlight of the Release

    • Added detection of deprecated ghost-api usage in theme configurations
    • Fixed theme error handler to prevent unnecessary error reporting
    • Added serializers for multiple API endpoints to ensure consistent responses
    • Fixed issues with offers functionality
    • Added developer experience improvements with test snapshot aliases

Migration Guide

No migration steps are required for this release. This is a maintenance release that focuses on internal improvements and bug fixes without introducing breaking changes.

Theme developers should note that the engines.ghost-api property in theme configurations is now officially deprecated and will be removed in Ghost v5. It's recommended to update your themes to remove this property as it's no longer needed due to the versionless nature of the Content API.

Upgrade Recommendations

This is a recommended upgrade for all Ghost installations, especially for those experiencing issues with offers functionality or theme-related errors. The release contains important bug fixes and internal improvements that enhance stability.

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

Bug Fixes

Fixed Offers Functionality

  • Fixed an issue where discounts were not showing up on the account page for members with active discounts.
  • Fixed the redemption counter on the offers page which was not incrementing correctly.
  • The root cause was related to messages not reaching the internal bus listener due to duplication of the internal bus.

Fixed Theme Error Handler

Improved the theme error handler to prevent errors from being uploaded to Sentry when a 404 happens in Ghost Admin. Previously, 404s in Ghost Admin would create an ENOENT error in Express's static library, which would be unnecessarily reported to Sentry.

Fixed Members Connect Endpoint

Fixed an issue where the members connect endpoint was incorrectly returning JSON instead of the expected response format, which was caused by changes to the default serializer behavior.

Fixed Same RedirectManager Issue

Fixed an issue where the same redirectManager was being used between tests, causing errors when duplicate redirects were added. This was causing the error: Cannot destructure property 'fromRegex' of 'this.redirects[redirectId]' as it is undefined.

New Features

Added Detection for Deprecated Theme Configurations

Ghost now detects and warns about the use of the deprecated engines.ghost-api property in theme configurations. This property will be removed in Ghost v5 due to the versionless nature of the Content API. When uploading a new theme or activating an existing one that uses this property, users will now receive a warning.

Improved Developer Experience

  • Added aliases for updating test snapshots, making it easier to remember which variables trigger updates. The following variables now all trigger snapshot updates: SNAPSHOT_UPDATE, UPDATE_SNAPSHOT, SNAPSHOTS_UPDATE, and UPDATE_SNAPSHOTS.
  • Added theme-service-init metric during boot to track theme service initialization time, which is particularly useful for monitoring performance with user-provided themes.

Multiple Newsletters Flag

Added support for multiple newsletters, laying groundwork for future newsletter management features.

Security Updates

No significant security fixes were included in this release.

Performance Improvements

API Response Handling Improvements

  • Added default serializer handling to streamline API responses and reduce code duplication.
  • Removed unnecessary serializers for multiple endpoints (labels, actions, integrations, tags, authors) as they now use the default serializer behavior.

Code Cleanup and Optimization

  • Removed unnecessary use of rewire in several places, which can improve code coverage reporting and reduce complexity.
  • Updated .npmignore to exclude development-only files from being shipped with Ghost, reducing package size.
  • Added minified ghost.min.css to gitignore to prevent accidental commits of this release asset.

Impact Summary

Ghost v4.41.3 is primarily a maintenance release that improves internal code structure and fixes several minor bugs. The most notable improvements include:

  1. API Consistency: Added serializers for various API endpoints to ensure consistent response formats, which improves reliability for custom integrations and themes.

  2. Theme Handling: Added detection for deprecated theme configurations and improved error handling for themes, which helps prepare developers for future Ghost v5 compatibility.

  3. Offers Functionality: Fixed issues with offers where discounts weren't showing properly and redemption counters weren't incrementing correctly.

  4. Developer Experience: Added several quality-of-life improvements for developers working with Ghost, including test snapshot aliases and better error handling.

These changes collectively improve the stability and reliability of Ghost while preparing the codebase for future enhancements. Most users won't notice significant changes in day-to-day usage, but will benefit from the improved stability and bug fixes.

Full Release Notes

Statistics:

File Changed68
Line Additions3,711
Line Deletions1,833
Line Changes5,544
Total Commits61

User Affected:

  • Better error handling for theme-related issues
  • Improved API response consistency with added serializers
  • New aliases for updating test snapshots improving developer experience
  • Detection of deprecated `ghost-api` usage in theme configurations

Contributors:

peterzimontpateldaniellockyerSimonBackxrenovate-botnazErisDSsam-lordrshbhgrg