Home

>

Tools

>

Ghost

>

Releases

>

5.22.0

Ghost Release: 5.22.0

Tag Name: v5.22.0

Release Date: 10/31/2022

Ghost LogoGhost

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

TL;DR

Ghost v5.22.0 fixes critical data import issues with paid tiers

This release addresses a significant bug in the content importer that affected paid products/tiers when importing JSON files. Previously, when importing products without price information, the system would store null values instead of defaults, causing downstream issues for paid products. The fix ensures proper mapping of price data during imports, maintaining data integrity for membership tiers.

Highlight of the Release

    • Fixed critical bug in the content importer that affected paid products/tiers
    • Added database migration to repair existing affected data
    • Improved compatibility between the importer and the Ghost API

Migration Guide

Automatic Migration

This release includes an automatic database migration that will:

  1. Identify products in your database that have null values for currency but are marked as paid products
  2. Backfill these products with appropriate default values

No manual intervention is required. The migration will run automatically when you upgrade to v5.22.0.

If you've previously experienced issues with imported tiers missing price data, this upgrade should resolve those problems automatically.

Upgrade Recommendations

Priority: Medium

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

  • Use the content importer to migrate between Ghost instances
  • Have experienced issues with paid tiers after importing content
  • Manage multiple Ghost sites and frequently transfer content between them

The upgrade process is standard with no special considerations required. The included migration will automatically fix any affected data in your database.

Bug Fixes

Content Importer Fixes

  • Fixed a critical bug in the content importer where importing JSON files with products/tiers that lacked price information would store null values in the database instead of using default values
  • Added proper mapping of stripe_prices data onto the products table during imports to ensure valid data in the database
  • Implemented a database migration that backfills missing columns in the products table for existing affected data
  • The migration specifically targets rows where t.currency is null and t.type === 'paid' to identify and fix problematic entries

New Features

No new features were added in this release. This is a focused bug fix release addressing issues with the content importer and tier data.

Security Updates

No security fixes were included in this release.

Performance Improvements

No specific performance improvements were included in this release. The focus was on fixing data integrity issues with the content importer.

Impact Summary

This release fixes a specific but important bug in Ghost's content import functionality that affected paid tiers/products. When importing JSON files where products didn't contain complete price information, the importer would incorrectly store null values in the database instead of using defaults. This caused downstream issues because the products table wasn't properly populated for paid products.

The fix addresses this issue in two ways:

  1. A corrected importer that properly maps price data during imports
  2. A database migration that repairs existing affected data

This ensures that all paid products/tiers maintain proper data integrity, even when imported from JSON files that lack complete price information. The fix is particularly important for Ghost users who frequently migrate content between instances or manage multiple Ghost sites.

Full Release Notes

  • 🐛 Fixed Tiers importer not correctly mapping price data

View the changelog for full details: v5.21.0...v5.22.0

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

Statistics:

File Changed5
Line Additions148
Line Deletions2
Line Changes150
Total Commits3

User Affected:

  • Can now successfully import content with paid tiers without data corruption
  • No longer need to manually fix tier data after imports
  • Existing sites with corrupted tier data from previous imports will be automatically fixed

Contributors:

daniellockyerallouisgithub-actions[bot]