Home

>

Tools

>

Ghost

>

Releases

>

5.28.0

Ghost Release: 5.28.0

Tag Name: v5.28.0

Release Date: 1/6/2023

Ghost LogoGhost

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

TL;DR

Ghost 5.28.0 introduces visible theme errors in the admin interface, making it easier to identify and fix theme issues. This release also stops the creation of redundant Stripe customers for members, fixes duplicate member columns when filtering, and downgrades several fatal GScan errors to non-fatal, improving the overall developer experience. These changes enhance theme management, improve the Stripe integration, and make the admin interface more reliable.

Highlight of the Release

    • New theme error notification system in the admin interface
    • Improved Stripe integration to prevent redundant customer creation
    • Downgraded several GScan fatal errors to non-fatal for better developer experience
    • Fixed duplicate member columns when applying the same filter multiple times

Migration Guide

Migration Notes

  • The code property in the global error variable (accessible via {{error.*}}) has been removed. This property was long deprecated.
  • When {{code}} or {{error.code}} helpers are used in templates, they will now output an empty string. Use {{statusCode}} instead.
  • Resource mismatch errors now include the resource name for better debugging clarity.
  • If you're using the Stripe integration, note that the behavior for customer creation has changed to prevent redundant records.

Upgrade Recommendations

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

  • Develop or maintain custom themes
  • Use the Stripe integration for paid memberships
  • Frequently work with member filtering in the admin interface

The upgrade should be straightforward with no breaking changes for most users, though theme developers should note the changes to error handling and the removal of the deprecated error.code property.

Bug Fixes

  • Stopped creating redundant Stripe Customers for Members: Fixed an issue where Ghost created two Customer objects via the Stripe API when an existing subscriber upgraded to a paid subscription. This improves the owner's experience in the Stripe Dashboard by correcting new customer counts and making user searches more accurate.

  • Fixed duplicate member columns when filtering: Resolved an issue where applying the same filter multiple times would add duplicate columns to the members list view.

  • Fixed theme warnings not visible when uploading themes with fatal errors: Ensured that warnings are properly displayed alongside fatal errors when uploading themes in development mode.

  • Fixed theme warnings not passed when installing theme: Corrected an issue where warnings weren't passed when installing a theme in development mode, making them invisible alongside fatal errors.

  • Fixed missing awaits in publishing Playwright test: Added missing await statements in publishing tests.

  • Fixed offers playwright test for redemption count: Updated the check for redemption count using data test attributes to avoid unreliable member count checks.

New Features

Visible Theme Errors in Admin

Ghost now displays theme errors directly in the admin interface, making it easier to identify and fix issues with your theme. When the active theme has errors, an error notification will appear that can open a detailed error modal.

  • Added caching for GScan validation results during boot and theme loading
  • Created a new endpoint /ghost/api/admin/themes/active/ that returns the result of the last GScan validation
  • Added appropriate permissions for the new endpoint (author, editor, administrator)
  • Implemented a notification system for theme errors when the themeErrorsNotification feature flag is enabled

Security Updates

No specific security fixes were included in this release.

Performance Improvements

  • Added caching for GScan theme validation results, which should improve performance when loading themes
  • Improved error handling and reporting throughout the application
  • Enhanced Playwright tests for better reliability and performance

Impact Summary

Ghost 5.28.0 brings significant improvements to theme management by introducing visible theme errors directly in the admin interface. This makes it much easier for site administrators and theme developers to identify and fix issues with their themes without needing to dig through server logs.

The release also addresses several pain points, including the creation of redundant Stripe customers when subscribers upgrade to paid plans and duplicate columns appearing when filtering members. These fixes improve the overall user experience for both site administrators and developers.

For theme developers, several GScan fatal errors have been downgraded to non-fatal, providing more flexibility while still maintaining quality standards. Additionally, error messages have been made more specific, particularly for resource mismatch errors, which now include the resource name for better debugging.

The removal of the long-deprecated code property from the global error variable is a cleanup that shouldn't affect most users, but theme developers should ensure they're using {{statusCode}} instead of {{code}} or {{error.code}} in their templates.

Full Release Notes

  • ✨ Added visible theme errors in admin - Simon Backx
  • ℹ️ Downgraded several fatal GScan errors to non-fatal - Naz
  • 🐛 Fixed duplicate member columns when filtering - Simon Backx
  • 🐛 Fixed warnings not visible when uploading theme with fatal errors - Simon Backx
  • 🐛 Stopped creating redundant Stripe Customers for Members - Patrick McKenzie

View the changelog for full details: v5.27.0...v5.28.0

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

Statistics:

File Changed46
Line Additions437
Line Deletions178
Line Changes615
Total Commits18

User Affected:

  • Can now see theme errors directly in the admin interface
  • Several previously fatal GScan errors have been downgraded to non-fatal, allowing more flexibility
  • Theme warnings are now properly displayed when installing themes with fatal errors

Contributors:

renovate[bot]patio11ronaldlangeveldrshbhgrgsam-lordnazSimonBackxgithub-actions[bot]