Home

>

Tools

>

Ghost

>

Releases

>

5.19.1

Ghost Release: 5.19.1

Tag Name: v5.19.1

Release Date: 10/17/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 v5.19.1: Bug Fix Release

This minor release addresses three key issues:

  1. Fixed 404 collection links for new tags - Resolved an issue where newly created tags attached to posts would sometimes result in 404 errors when accessing the tag collection page.

  2. Improved comment count handling - Fixed unnecessary API requests when comment counts aren't being displayed and added better error handling for the comments API.

  3. Enhanced reliability - Addressed a race condition in the event handling system that was causing intermittent issues with tag collections.

This release focuses on stability improvements without introducing new features or breaking changes.

Highlight of the Release

    • Fixed 404 errors when accessing collection pages for newly created tags
    • Eliminated unnecessary API requests when comment counts aren't displayed
    • Added proper error handling for unsuccessful comments API requests
    • Resolved race condition in bookshelf transaction events

Migration Guide

No migration steps are required for this release. Simply update to v5.19.1 to benefit from the bug fixes and performance improvements.

Upgrade Recommendations

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

  • Use tag collections extensively
  • Have comments enabled on their site
  • Have experienced 404 errors when creating new tags

The update addresses important bug fixes without introducing breaking changes, making it a safe and beneficial upgrade for all installations.

Bug Fixes

Fixed 404 collection links for new tags

When attaching a new tag to a post, users would sometimes encounter 404 errors when trying to access the tag collection page. This issue was caused by a race condition between event propagation in routing for the "tag.attached" event and the completion of the post+tag+relations transaction.

The root cause was identified in the bookshelf-transaction-events plugin, which was emitting the 'committed' event BEFORE the transaction was actually committed. This led to inconsistent behavior where sometimes the collection link would work correctly and other times it would return a 404 error.

Fixed unnecessary requests for comment counts

Previously, if a site had comments enabled but didn't use the comments_count helper on a particular page, the comments-count.min.js script would still be loaded and would send a POST request to Ghost with an empty array of post IDs. This unnecessary request has been eliminated, improving performance for pages that don't display comment counts.

Added handling for unsuccessful comments API requests

The comments system now properly handles cases where the API doesn't return a 200 OK response. Previously, the system would attempt to process error responses as if they were valid data, which could lead to unexpected behavior.

New Features

No new features were introduced in this maintenance release. This version focuses exclusively on bug fixes and performance improvements.

Security Updates

No security fixes were included in this release.

Performance Improvements

Reduced unnecessary API requests

This release eliminates unnecessary POST requests to the Ghost API when comment counts are enabled but not used on a page. The comments-count.js script now checks if there are post IDs to fetch before sending a request, reducing server load and improving page performance.

Fixed race condition in event handling

By addressing the race condition in the bookshelf-transaction-events plugin, this release improves the reliability and performance of tag collection pages, especially when working with newly created tags.

Impact Summary

Ghost v5.19.1 is a maintenance release that focuses on fixing bugs and improving performance. The most significant fix addresses an issue where newly created tags would sometimes result in 404 errors when accessed as collections. This was caused by a race condition in the event handling system.

Additionally, the release improves the comments system by eliminating unnecessary API requests when comment counts aren't being displayed and adding better error handling for API responses.

These changes enhance the reliability and performance of Ghost without introducing any breaking changes or requiring migration steps. The fixes are particularly beneficial for content creators who work extensively with tags and site owners who have comments enabled on their Ghost installation.

Full Release Notes

  • 🐛 Fixed 404 collection links for new tags - Naz

View the changelog for full details: v5.19.0...v5.19.1

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

Statistics:

File Changed4
Line Additions100
Line Deletions69
Line Changes169
Total Commits4

User Affected:

  • Tag collections now work correctly when adding new tags to posts
  • No more 404 errors when clicking on newly created tag links

Contributors:

daniellockyernazgithub-actions[bot]