Home

>

Tools

>

Ghost

>

Releases

>

4.42.0

Ghost Release: 4.42.0

Tag Name: v4.42.0

Release Date: 4/1/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 4.42.0 introduces significant backend improvements with a focus on code cleanup, database optimizations, and bug fixes. Key updates include the addition of a newsletters table and API endpoints, a new stats service for member count history, and fixes for URL transformations in video and product cards. This release lays groundwork for future features while improving existing functionality.

This update is primarily focused on internal improvements that set the stage for Ghost v5, with several bug fixes that enhance the user experience for content creators and administrators.

Highlight of the Release

    • Added newsletters table and API endpoints for managing newsletters
    • Created new stats service and API for member count history tracking
    • Fixed URL transformations in video and product cards
    • Improved email template typography
    • Significant code cleanup with removal of unnecessary serializers

Migration Guide

No migration steps are required for this release. The changes are primarily internal improvements and bug fixes that don't require user intervention.

For theme developers:

  • Note that the {{products}}, {{@product}}, and {{@products}} helpers have been marked as deprecated with warning messages
  • The {{id}} helper deprecation notice has been removed
  • Be aware that in Ghost v5, errors with codes GS001-DEPR-ESC and GS001-DEPR-CURR-SYM will become fatal errors

Upgrade Recommendations

This release is recommended for all Ghost users as it includes important bug fixes and lays groundwork for future features. The update is particularly valuable for:

  1. Administrators who want access to improved member statistics
  2. Content creators who use video and product cards in their content
  3. Developers working on Ghost themes or extensions

There are no breaking changes in this release, making it a safe upgrade for all installations. As always, it's recommended to backup your database before upgrading.

Bug Fixes

UI and Content Fixes

  • Fixed non-functioning "Leave" button on unsaved-changes confirmation modals
  • Fixed scheduled send-only post switching to publish+send when rescheduling
  • Fixed __GHOST_URL__ transformations in video cards ensuring proper URL handling across Ghost instances
  • Fixed unquoted src and href attributes in product cards that were missing URL transformations
  • Fixed broken links in theme error messages

System Fixes

  • Fixed environment-specific default configuration files missing from build
  • Fixed symlinked themes missing from theme list
  • Fixed logging level when adding permissions to roles
  • Improved readability of log messages during migrations

New Features

Newsletters Management

  • Added a new newsletters table with properties for default status, recipient filtering, subscription preferences, and sorting
  • Created API endpoints for listing, creating, and editing newsletters with appropriate admin permissions

Enhanced Statistics

  • Implemented a new stats service divided into categories (currently only 'members')
  • Added /stats/member-count API endpoint that provides member count history
  • Improved accuracy of member statistics by counting in reverse order when data is missing or corrupt
  • Added paid member deltas to track subscribed and canceled paid members per day

Testing Improvements

  • Added event mocking to e2e framework allowing tests to check for fired events without side effects
  • Added expectEmptyBody assertions to e2e framework
  • Updated snippets e2e tests to use the new framework
  • Increased minimum coverage percentages to maintain code quality

Security Updates

No significant security fixes were mentioned in this release.

Performance Improvements

Database Optimizations

  • Refactored database check to use utility functions, removing hardcoded string checks
  • Split apart database initialization queries in tests to prepare for SQLite client switch
  • Updated knex dependency and switched to @vscode/sqlite3 for better compatibility

Code Efficiency

  • Removed unnecessary serializers for emails, identities, member-signin-urls, webhooks, and users
  • Updated passthrough serializers to be consistent and easier to understand
  • Improved behavior of default and all handlers in the serialization process
  • Removed unused members/stats endpoints to reduce codebase size

Impact Summary

Ghost 4.42.0 is primarily a foundation-building release that improves internal systems while fixing several user-facing bugs. The addition of newsletters management capabilities and enhanced member statistics provides administrators with better tools for audience management. Content creators benefit from fixes to video and product cards, ensuring proper URL handling across Ghost instances.

The significant code cleanup and removal of unnecessary serializers improves the maintainability of the codebase, while database optimizations prepare for future enhancements. This release also includes important updates to the testing framework, making it easier to develop and test new features.

While many of the changes are behind-the-scenes, they collectively improve the stability and performance of Ghost while setting the stage for more significant features in upcoming releases. The bug fixes address specific pain points reported by users, enhancing the overall user experience.

Full Release Notes

  • 🐛 Fixed non-functioning "Leave" button on unsaved-changes confirmation modals - Kevin Ansfield
  • 🐛 Fixed scheduled send-only post switching to publish+send when rescheduling - Kevin Ansfield
  • 🐛 Fixed __GHOST_URL__ tranformations in video cards - Naz
  • 🐛 Fixed broken links in some of theme errors - Naz

View the changelogs for full details:

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

Statistics:

File Changed79
Line Additions2,641
Line Deletions1,438
Line Changes4,079
Total Commits58

User Affected:

  • Access to new newsletter management features through the API
  • Improved member statistics with the new stats service and API endpoints
  • Better error messages when uploading themes with issues
  • Fixed broken links in theme error messages

Contributors:

renovate-botrshbhgrgdaniellockyerpeterzimonErisDSnaztpatelSimonBackxrenovate[bot]