Home

>

Tools

>

Ghost

>

Releases

>

4.20.1

Ghost Release: 4.20.1

Tag Name: v4.20.1

Release Date: 10/22/2021

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.20.1 brings a critical fix for GA labs flags visibility in the settings API

This patch release addresses an issue where General Availability (GA) labs flags were not appearing as enabled in the settings API, even though they were actually active. The fix ensures that the Admin UI correctly displays the status of these feature flags, providing a more consistent experience for administrators managing Ghost features.

Highlight of the Release

    • Fixed a discrepancy between actual labs feature flag states and what was displayed in the Admin UI
    • Updated the settings bread service to use labs.getAll() as the source of truth for feature flags
    • Improved code organization by extracting browse() behavior to an internal _formatBrowse() method
    • Updated dependency oembed-parser to v1.4.9

Migration Guide

No migration steps are required for this patch release. The fix is automatically applied when updating to v4.20.1.

Upgrade Recommendations

This patch release is recommended for all Ghost installations, especially for those using the Admin UI to manage labs features. The update ensures that administrators can correctly see the enabled status of General Availability labs flags in the settings interface.

To upgrade:

  1. Back up your Ghost installation
  2. Follow the standard Ghost update procedure for your installation method
  3. No additional configuration changes are required after updating

Bug Fixes

Fixed GA Labs Flags Display in Settings API

This release fixes an issue with how General Availability (GA) labs flags were being handled in the settings API. Previously, GA flags would not appear as enabled in the Admin UI settings panel, even though they were actually active in the system.

The issue occurred because:

  • GA flags were implemented to always return true when checked via the labs service
  • However, these flags were not being stored in the 'labs' setting in the database
  • The Admin UI fetches these flags via the /settings/ API endpoint, which was only returning the raw database value
  • This resulted in GA flags appearing disabled in the UI unless they had been previously enabled and no settings save had occurred since

The fix:

  • Updated the settings bread service to replace the labs setting value with the JSON stringified output of labs.getAll()
  • This ensures that the settings API returns the actual state of all labs features, including GA flags
  • Extracted browse() behavior to an internal _formatBrowse() method to apply consistent filtering and modification for both browse() and edit() outputs

New Features

No new features were introduced in this patch release.

Security Updates

No security fixes were included in this patch release.

Performance Improvements

No specific performance improvements were included in this patch release.

Impact Summary

This patch release fixes a UI/API consistency issue where General Availability labs flags were not appearing as enabled in the settings API, causing confusion for administrators. The fix ensures that the Admin UI correctly reflects the actual state of feature flags, providing a more reliable administrative experience. The update is straightforward with no breaking changes or migration requirements, making it a recommended update for all Ghost installations.

Full Release Notes

Statistics:

File Changed9
Line Additions61
Line Deletions38
Line Changes99
Total Commits4

User Affected:

  • Can now correctly see the enabled status of GA labs flags in the Admin UI settings
  • Will experience more consistent behavior between actual feature availability and what's displayed in settings

Contributors:

renovate-botkevinansfielddaniellockyer