Home

>

Tools

>

Ghost

>

Releases

>

4.7.0

Ghost Release: 4.7.0

Tag Name: v4.7.0

Release Date: 6/8/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 4.7.0 introduces multiple product support for memberships, enhanced newsletter customization options, and a revamped labs feature flag system. This release lays the groundwork for tiered memberships while fixing several critical bugs related to Stripe integration, email functionality, and the editor experience. The update also includes significant code refactoring of the update check service and improvements to the testing framework.

Highlight of the Release

    • Added foundation for multiple product/tier support in memberships
    • Enhanced newsletter email customization with new settings
    • Reintroduced labs feature flag system for experimental features
    • Fixed Stripe integration issues when switching accounts
    • Enabled Grammarly extension support in the editor

Migration Guide

Multiple Products/Tiers Support

If you're using custom themes or integrations that interact with membership data, you'll need to update your code to handle the new product structure:

  • The members_monthly_price_id and members_yearly_price_id settings have been migrated to columns on the products table
  • Products now have monthly_price and yearly_price properties
  • The Portal settings structure has been updated to use these new properties

Labs Feature Flag System

If you were previously using any custom code that interacted with the labs settings:

  • The labs setting is now back as an object type in the settings table
  • Only allowlisted feature flags will be accepted
  • Labs settings can only be edited through v4/canary API versions

No action is required for standard Ghost installations, as all migrations are handled automatically during the update process.

Upgrade Recommendations

This is a recommended upgrade for all Ghost users, especially those using memberships and Stripe integration.

The release includes important bug fixes for Stripe account switching and email functionality, along with the foundation for upcoming multiple tier support. The improvements to newsletter customization also provide immediate value for sites sending email newsletters.

Upgrade Steps:

  1. Back up your Ghost installation
  2. Follow the standard upgrade process for your installation method
  3. No additional configuration is required after upgrade

This release is backward compatible with existing themes and integrations, though developers should review the migration guide if they have custom code interacting with membership data or labs settings.

Bug Fixes

Email and Member-Related Fixes

  • Fixed logs showing errors when sending emails with no feature image
  • Fixed member count not showing correctly in send email confirmation modal
  • Fixed member count in publish menu not matching subscription status
  • Fixed links in email preview not being clickable
  • Fixed Enter key not working in send email confirmation modal
  • Fixed blank branding preview on split front-end/admin domain setups

Stripe Integration Fixes

  • Fixed inability to create new prices when switching Stripe accounts
  • Fixed handling of empty Stripe price objects in API
  • Improved handling of Stripe disconnection to properly clear old account data

Other Fixes

  • Fixed email header divider showing when title+icon are disabled but no publication icon is set
  • Fixed Product API serializer issues with included data
  • Fixed handling of empty prices for products in Portal settings

New Features

Multiple Product/Tier Support Foundation

Ghost now includes the foundation for supporting multiple membership products/tiers. This includes:

  • New database structure with monthly_price and yearly_price columns in products table
  • Updated API endpoints to handle multiple products
  • Portal integration for displaying multiple products
  • Theme middleware support for accessing product data

Enhanced Newsletter Email Customization

New settings have been added to customize newsletter emails:

  • newsletter_header_image - Add a custom header image to emails
  • newsletter_show_header_icon - Toggle publication icon visibility
  • newsletter_show_header_title - Toggle publication title visibility
  • newsletter_show_feature_image - Toggle post feature image visibility
  • newsletter_title_alignment - Choose between left or center alignment
  • newsletter_title_font_category - Choose between serif or sans-serif fonts

Labs Feature Flag System

The labs feature flag system has been reintroduced with improved safeguards:

  • Input validation with an allowlist approach to prevent misuse
  • API restrictions to only allow editing through v4/canary API versions
  • Support for enabling experimental features like the new match helper

Security Updates

No significant security fixes were included in this release.

Performance Improvements

Testing Framework Improvements

  • Reduced and improved subdirectory regression tests
  • Moved useful subdirectory and HTTPS tests to acceptance tests
  • Used consistent patterns in acceptance tests with async/await
  • Simplified tests using expect() for better readability
  • Switched test order so acceptance tests run last to highlight slowness

Code Refactoring

  • Refactored update check service to use async/await syntax
  • Refactored GhostMailer's send method to current code standards
  • Extracted update check code into a separate service
  • Limited API surface of the UpdateCheckService for better maintainability
  • Removed rewire dependency in update check tests

Impact Summary

Ghost 4.7.0 represents a significant step forward in the platform's membership capabilities, laying the groundwork for multiple membership tiers while improving the existing newsletter and editor experience.

The most impactful changes are the foundation for multiple product/tier support and enhanced newsletter customization options. Site owners can now better tailor their email newsletters with new settings for header images, alignment, and font choices. The fixed Stripe integration ensures smoother payment processing when switching accounts.

For content creators, the Grammarly extension support in the editor and fixes to the email preview and confirmation modal provide immediate quality-of-life improvements.

Developers will benefit from the refactored update check service, improved testing framework, and the experimental match helper for theme development.

While this release doesn't introduce any breaking changes, it sets the stage for significant membership enhancements in future versions. The reintroduction of the labs feature flag system with improved safeguards also provides a path for testing experimental features before they become generally available.

Full Release Notes

  • 🎨 Enabled use of Grammarly extension in the editor - Kevin Ansfield
  • 🏗️ Added "labs" setting enabling feature flags - Naz Gargol
  • 🐛 Fixed unable to create new prices on switching Stripe account (#13013) - Rishabh Garg
  • 🐛 Fixed member count not showing in send email confirmation modal - Kevin Ansfield
  • 🐛 Fixed member count in publish menu not matching subscription status - Kevin Ansfield
  • 🐛 Fixed links in email preview not being clickable - Kevin Ansfield
  • 🐛 Fixed logs showing an error when sending an email with no feature image - Kevin Ansfield
  • 🐛 Fixed Enter key not working in send email confirmation modal - Kevin Ansfield
  • 🐛 Fixed blank branding preview on split front-end/admin domain setups - Kevin Ansfield

View the changelogs for full details:

Statistics:

File Changed79
Line Additions3,963
Line Deletions2,783
Line Changes6,746
Total Commits89

User Affected:

  • Can now customize newsletter emails with more options including header image, alignment settings, and display toggles
  • Benefit from improved Stripe integration with fixed account switching functionality
  • Access to new labs feature flags for enabling experimental features

Contributors:

nazrshbhgrgErisDStpateldaniellockyerrenovate-botallouiskevinansfieldsam-lordsanne-san