Home

>

Tools

>

Ghost

>

Releases

>

4.46.2

Ghost Release: 4.46.2

Tag Name: v4.46.2

Release Date: 5/2/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.46.2 is a maintenance release that fixes a critical error in the Members webhooks functionality. The bug was causing webhooks to fail when firing due to missing newsletter relations. This release also includes several API version compatibility improvements and CI pipeline updates to ensure proper testing on the v4.x branch.

Highlight of the Release

    • Fixed critical error in Members webhooks functionality
    • Improved API version compatibility handling
    • Enhanced content-version middleware to ensure consistent behavior
    • Updated CI pipeline to include v4.x branch testing

Migration Guide

No migration steps are required for this release. This is a drop-in replacement that fixes bugs and improves existing functionality without introducing breaking changes.

Upgrade Recommendations

Recommended for All Users

This release is recommended for all users, especially those who:

  • Use webhooks for member-related events
  • Have integrations that depend on member webhooks
  • Experience issues with API version compatibility

The update addresses a critical bug in the Members webhooks functionality and improves API version handling, which enhances overall system reliability.

Bug Fixes

Fixed Members Webhooks Error

Fixed a critical issue where Members webhooks were failing to fire properly. The problem occurred because the last seen timestamp was being updated via the model rather than the repository, which meant that the default relations (specifically newsletters) were not being loaded correctly.

The fix includes:

  • Updating the repository to load the newsletters relation
  • Changing the last seen timestamp update to use the repository
  • Updating the output serializer to handle missing newsletter relations
  • Ensuring consistent versions of the domain-events package across all dependencies

API Version Compatibility Improvements

  • Fixed initialization error in the API version compatibility service
  • Added tests for handling unknown versions with accept-versions set ahead and behind
  • Refactored the service to expose its own middleware for correct initialization sequence

New Features

No significant new features were added in this release. This is primarily a maintenance release focused on bug fixes and improvements to existing functionality.

Security Updates

No security fixes were included in this release.

Performance Improvements

Content-Version Middleware Improvements

Moved content-version middleware onto the API app to ensure it's consistently applied. Previously, content-version was only set if one of Ghost's endpoints touched the request, which led to inconsistent behavior in some scenarios. This change ensures the middleware is always applied correctly.

Impact Summary

This release fixes a critical issue with Members webhooks that could affect integrations relying on member-related events. The fix ensures that webhooks fire correctly by properly loading newsletter relations when updating the last seen timestamp. Additionally, improvements to API version compatibility and content-version middleware enhance the consistency and reliability of the API. These changes are particularly important for developers working with the Ghost API and site owners who rely on webhook integrations for their workflows.

Full Release Notes

Statistics:

File Changed19
Line Additions229
Line Deletions301
Line Changes530
Total Commits8

User Affected:

  • Fixed error when firing Members webhooks, ensuring proper functionality for integrations
  • Improved API version compatibility handling for more consistent behavior
  • Better testing coverage with CI updates for the v4.x branch

Contributors:

ErisDSdaniellockyerallouis