Home

>

Tools

>

Ghost

>

Releases

>

3.4.0

Ghost Release: 3.4.0

Tag Name: 3.4.0

Release Date: 1/28/2020

Ghost LogoGhost

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

TL;DR

Ghost 3.4.0: Complimentary Subscriptions & Improved Membership Features

Ghost 3.4.0 introduces significant enhancements to the membership system, including the ability to offer complimentary premium subscriptions without requiring payment. This release also optimizes performance by loading Stripe scripts only when necessary and adds a new {{price}} helper for formatting currency values. Several bug fixes improve the editor experience, newsletter image alignment, and image URL handling. This update is particularly valuable for publishers who offer premium content and want more flexibility in their membership offerings.

Highlight of the Release

    • Added ability to give members complimentary premium subscriptions without requiring payment
    • Optimized Stripe script loading to improve performance when Stripe isn't needed
    • Added new {{price}} helper for formatting currency values in templates
    • Fixed several UI issues including newsletter image alignment and dark mode link inputs
    • Improved error handling for image URLs and long filenames

Migration Guide

No specific migration steps are required for this release. The new features are additive and don't break existing functionality.

If you're using the Members API programmatically, note that member responses now include a comped flag that indicates whether a member has a complimentary subscription.

For developers working with the codebase:

  • The member controller now uses the model layer directly instead of external services
  • The isPaymentConfigured method has been removed as it was based on outdated logic
  • The @tryghost/members-api dependency has been updated to version 0.12.0

Upgrade Recommendations

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

  • Use the membership/subscription features
  • Want to offer premium content to selected users without requiring payment
  • Have experienced issues with the editor's "unsaved changes" warnings
  • Send newsletters with small images that need proper alignment

The upgrade process follows the standard Ghost update procedure and doesn't require any special steps or migrations. As always, it's recommended to backup your database before upgrading.

Bug Fixes

Editor Improvements

  • Fixed an issue where the HR (horizontal rule) card was triggering unnecessary "unsaved changes" warnings when no actual changes were made
  • The problem was caused by incorrect transformer function arguments that were modifying the card's payload during save operations

Newsletter and Image Handling

  • Fixed image alignment in newsletters to properly center images that are smaller than the newsletter content width
  • Added proper handling for trailing slashes in resized image URLs, which previously caused EISDIR errors
  • Implemented error handling for overly long filenames in content requests, now returning a 400 Bad Request response instead of a 500 error

UI Fixes

  • Fixed dark mode link input bug that affected visibility and usability
  • Improved button styling for staff creation to ensure consistent appearance
  • Fixed incorrect stripe subscriptions structure in user CRUD operations

New Features

Complimentary Member Subscriptions

Ghost now supports offering premium memberships without requiring payment. This feature allows site administrators to grant selected members access to premium content through a new "Complimentary" plan. The implementation includes:

  • A new comped flag on member records that can be set via the PUT /members/:id endpoint
  • Support for setting and canceling complimentary subscriptions through the admin interface
  • Automatic inclusion of the comped flag in member API responses

Price Helper for Currency Formatting

The new {{price}} Handlebars helper simplifies the formatting of currency values in templates. This is particularly useful for displaying Stripe amounts, which are typically stored as integers (e.g., "1935" for $19.35). The helper automatically applies the appropriate decimal formatting based on the currency.

Refactored Member Controller

The member controller has been refactored to use the model layer directly instead of calling external services, bringing it in line with other controllers in Ghost. This change improves code consistency and maintainability as the members module has become a core part of Ghost.

Security Updates

No significant security fixes were included in this release.

Performance Improvements

Optimized Stripe Script Loading

A significant performance improvement has been implemented for sites with memberships enabled:

  • Previously, Ghost would load stripe.js on all pages when memberships were enabled, regardless of whether Stripe was configured
  • Now, stripe.js is only loaded when both Stripe API tokens are present and not empty
  • This optimization reduces unnecessary script loading and improves page load performance for sites that offer free memberships or haven't configured Stripe

Build Process Improvements

  • Updated Gruntfile to handle the new ember-cli logging format, ensuring proper output of build progress
  • This change maintains the periodic "building admin client..." notifications while ignoring certain error outputs from the updated ember-cli build process

Impact Summary

Ghost 3.4.0 significantly enhances the membership and subscription capabilities of the platform, with the standout feature being the ability to offer complimentary premium subscriptions. This provides publishers with more flexibility in their business models, allowing them to grant premium access to selected users without requiring payment processing.

Performance improvements come in the form of optimized Stripe script loading, which will benefit all sites with memberships enabled but particularly those that don't use Stripe for payments. The new {{price}} helper streamlines the display of currency values in templates, making it easier to show consistent pricing information.

Several quality-of-life improvements for content creators include fixes for the editor's "unsaved changes" warnings when using horizontal rule cards and better image alignment in newsletters. The release also includes improved error handling for image URLs and long filenames, resulting in more user-friendly error messages instead of server errors.

For developers, the refactored member controller that now uses the model layer directly improves code consistency and maintainability. The removal of the confusing isPaymentConfigured method also helps clean up the codebase.

Overall, this release enhances Ghost's capabilities as a professional publishing platform with membership features, making it more flexible, performant, and user-friendly.

Full Release Notes

  • ✨ Added ability to give members complimentary subscriptions (#11537) - Naz Gargol
  • ✨ Added {{price}} helper for formatting stripe amounts (ie. "1935" to "19.35") (#11473) - Naz Gargol
  • 🎨 Optimised stripe scripts to only load when needed (#11499) - Sven Ewers
  • 🐛 Fixed unnecessary "unsaved changes" modal when using HR cards - Kevin Ansfield
  • 🐛 Fixed small image alignment for newsletters - Peter Zimon
  • 🐛 Fixed dark mode link input bug - Peter Zimon
  • 🐛 Fixed button style for staff creation - Peter Zimon
  • 🐛 Handled trailing slashes in resized image URLs - Daniel Lockyer

You can see the full change log for the details of every change included in this release.

Statistics:

File Changed29
Line Additions374
Line Deletions72
Line Changes446
Total Commits23

User Affected:

  • Can now offer complimentary premium subscriptions to selected members without requiring payment
  • Will experience improved performance with Stripe scripts only loading when actually needed
  • Can format currency values more easily with the new `{{price}}` helper

Contributors:

nazdaniellockyerrenovate[bot]renovate-botrshbhgrgkevinansfieldpeterzimonJohnONolan