Home

>

Tools

>

Ghost

>

Releases

>

4.22.2

Ghost Release: 4.22.2

Tag Name: v4.22.2

Release Date: 11/12/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.22.2: Bug Fixes and Alpha Features

This release primarily addresses several bugs including issues with file extensions, theme installations, and Stripe account changes. It also introduces several alpha features behind feature flags, including a Files API for non-executable file uploads, new editor cards (Button, Callout, Accordion, NFT), and URL caching for improved performance. Note that this version has been deprecated due to a file permissions issue when booting.

Highlight of the Release

    • Fixed bug with free theme installation from the marketplace
    • Fixed issue with setting Tier prices after changing Stripe accounts
    • Fixed file extension validation for .mp4 files
    • Added Files API behind an alpha flag for non-executable file uploads
    • Added new editor cards (Button, Callout, Accordion, NFT) behind alpha flags
    • Added audio upload support (.mp3, .wav, .ogg) to Media API
    • Added URL caching for improved performance (alpha feature)

Migration Guide

⚠️ Important Note: This version (v4.22.2) has been deprecated due to an issue with file permissions when booting. It's recommended to upgrade to a newer version if available.

For those who still need to use this version:

  1. Alpha Features: All new features are behind alpha flags in the labs section. To enable them:

    • Go to Settings > Labs
    • Look for the following flags and enable as needed:
      • filesAPI
      • buttonCard
      • calloutCard
      • accordionCard
      • nftCard
      • gifsCard
      • urlCache
  2. Files API: If enabled, be aware that uploaded files will be stored under /files/ in your configured content path and accessible under /content/files/ URL.

  3. URL Caching: If enabled, URL data will be persisted to disk on shutdown and loaded on startup. This is experimental and should be tested thoroughly before using in production.

Upgrade Recommendations

⚠️ Not Recommended: This version (v4.22.2) has been deprecated due to an issue with file permissions when booting. It's recommended to skip this version and upgrade to a newer version if available.

If you're currently on v4.22.1 or earlier, consider waiting for the next stable release rather than upgrading to v4.22.2.

For those who must use this version:

  • The upgrade process follows the standard Ghost update procedure
  • Be aware of the file permissions issue that led to this version being deprecated
  • Test thoroughly in a non-production environment before deploying

Bug Fixes

  • Fixed installation of free themes from the marketplace that aren't in the built-in list.
  • Fixed setting Tier prices after changing Stripe accounts. The event is now emitted when the service is reconfigured rather than when the reconfigure command is issued, preventing database inconsistencies.
  • Fixed file extension validation that incorrectly marked .mp4 as invalid. This fix allows for duplicate file detection when uploading valid files with extensions containing numbers.
  • Fixed offers remaining after subscription change. When a subscription is changed by a Member, the Offer is now properly removed.
  • Fixed UrlService initialization by adding missing await for the "fetchResources" call, ensuring the queue picks up all necessary information.

New Features

New Alpha Features

  • Files API: Added behind an alpha flag for non-executable file uploads of all sorts. Files are stored under /files/ in the configured content path and accessible under /content/files/ URL.

  • New Editor Cards:

    • Button Card: Added rendering, parsing, and styling support for button cards with alignment options and accent color backgrounds.
    • Callout Card: Added rendering and styling support with optional emoji and background color.
    • Accordion Card: Added alpha flag for editor accordion card development.
    • NFT Card: Added support for displaying NFTs with custom OpenSea OEmbed provider.
    • GIFs Card: Added labs flag for adding a GIF selector similar to the Unsplash image selector.
  • Media API Enhancements:

    • Added thumbnail upload endpoint to Media API for updating and uploading new thumbnail images.
    • Added audio upload support (.mp3, .wav, .ogg) for media content.
  • URL Caching: Added experimental URL caching feature behind "urlCache" labs flag for improved performance.

  • Custom OEmbed Providers: Added support for custom OEmbed providers, initially used for OpenSea NFT embeds.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

  • URL Caching System: Added experimental URL caching behind the "urlCache" labs flag. This feature persists URL objects in the content folder and loads them on startup, reducing the need for database queries.

  • Server Reload Optimization: Added server reload for injected CSS file changes when running yarn dev, eliminating the need to manually trigger theme activation during development.

  • UrlService Refactoring: Improved the URL service by separating event listeners from resource fetching, allowing for more efficient resource loading and potential caching strategies.

  • Dependency Updates: Updated multiple dependencies to newer versions, including:

    • @sentry/node to v6.14.3
    • luxon to v2.1.1
    • nock to v13.2.1
    • cssnano to v5.0.10
    • Various @tryghost packages

Impact Summary

Ghost v4.22.2 is primarily a bug fix release that addresses several important issues, including problems with theme installation, Stripe account changes, and file extension validation. However, it also introduces several significant alpha features behind feature flags.

The most notable bug fixes resolve issues with installing free themes from the marketplace, setting Tier prices after changing Stripe accounts, and correctly validating file extensions for media uploads. These fixes improve the reliability of core Ghost functionality.

The alpha features introduce exciting new capabilities including a Files API for non-executable file uploads, new editor cards (Button, Callout, Accordion, NFT, GIFs), audio upload support, and URL caching for improved performance. These features enhance content creation options and system performance but require enabling specific labs flags.

Despite these improvements, this version has been deprecated due to a file permissions issue when booting. Users should be cautious about deploying this version and consider waiting for a more stable release.

The code changes in this release also include significant refactoring and modernization, particularly in the URL service and storage adapters, which will benefit future development and maintenance.

Full Release Notes

⚠️ This version has been deprecated due to an issue with file permissions when booting.

  • 🐛 Fixed install of free themes from the marketplace that aren't in the built-in list - Kevin Ansfield
  • 🐛 Fixed setting Tier prices after changing Stripe accounts - Fabien 'egg' O'Carroll
  • 🐛 Fixed extension mismatching .mp4 as invalid - Naz

View the changelogs for full details:

Statistics:

File Changed62
Line Additions1,898
Line Deletions461
Line Changes2,359
Total Commits82

User Affected:

  • Can now successfully install free themes from the marketplace that aren't in the built-in list
  • Will experience proper Tier price settings after changing Stripe accounts
  • Can access new alpha features by enabling the appropriate labs flags

Contributors:

renovate-botnazrenovate[bot]kevinansfieldtpatelallouispeterzimonrshbhgrgdaniellockyersam-lordErisDSmatthanley