- 🐛 Fixed member CSV import setting subscribed to
trueas default - Nazar Gargol - 🐛 Fixed "Unable to update nested relation" error when adding labels to members - Kevin Ansfield
Ghost Release: 3.7.0
Tag Name: 3.7.0
Release Date: 2/18/2020
GhostOpen-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.
TL;DR
Ghost 3.7.0 Release
What's New: Ghost 3.7.0 brings important fixes for the Members feature, including resolving issues with CSV imports and label management. The update also improves error reporting to Sentry and fixes a middleware issue with serving public images.
Why It Matters: This release addresses critical bugs that were affecting member management workflows and improves the overall stability of the platform.
Who Should Care: Ghost site owners who use the Members feature, particularly those who import members via CSV or organize members with labels.
Highlight of the Release
- Fixed member CSV import subscription settings
- Resolved the 'Unable to update nested relation' error when adding labels to members
- Improved error reporting to Sentry
- Fixed middleware issues when serving public images
- Removed limitations for canceling/renewing 'Complimentary' plan subscriptions
Migration Guide
This release includes a migration to fix the member labels functionality. The migration will:
- Drop the existing
members_labeltable - Recreate it with the correct foreign key constraints
No manual intervention is required as Knex handles the removal and addition of foreign keys during the table drop/create process.
If you've been experiencing issues with adding labels to members, this update should resolve those problems automatically upon installation.
Upgrade Recommendations
We recommend all Ghost users upgrade to version 3.7.0, especially those who:
- Use the Members feature
- Import members via CSV
- Organize members with labels
- Have experienced errors with public image serving
This release contains important bug fixes that improve the stability and functionality of core features. The upgrade process should be straightforward with no breaking changes reported.
Bug Fixes
-
Member CSV Import: Fixed an issue where the CSV import was setting the 'subscribed' field to
trueas default. The import now properly respects explicitfalseorFALSEvalues from spreadsheets while maintaining the default for unspecified values. -
Member Labels: Resolved the "Unable to update nested relation" error when adding labels to members. This was caused by incorrect references in the
schema.jsfile for themembers_labeltable added in version 3.6.0. The fix includes a migration to drop and recreate the table with proper foreign key constraints. -
Public Image Serving: Fixed "Cannot set headers after they are sent to the client" error in the
servePublicFilemiddleware. The middleware was erroneously callingnext()for successful requests, which triggered theprettyUrlsmiddleware to attempt a redirect. Nownext()is only called when an error is present. -
Error Reporting: Fixed issues with error reporting to Sentry where some errors weren't being reported because they were being passed to Sentry before middleware could populate the error information. The Sentry middleware has been repositioned in the processing chain to ensure proper error capture.
New Features
- CODEOWNERS Protection: Added CODEOWNERS file to protect database migrations, requiring review from the devops team before merging these potentially risky changes.
- Enhanced Subscription Management: Removed limitations to cancel/renew "Complimentary" plan subscriptions through the @tryghost/members-api update.
Security Updates
No specific security fixes were included in this release.
Performance Improvements
-
Middleware Optimization: The
servePublicFilemiddleware has been optimized to properly handle request completion, preventing unnecessary processing by subsequent middleware for successful requests. -
Error Handling: Improved error handling flow ensures that errors are properly captured and reported, which can lead to faster identification and resolution of issues.
Impact Summary
Ghost 3.7.0 focuses on stabilizing the Members feature with important bug fixes for CSV imports and label management. The release also improves error reporting and fixes middleware issues with serving public images.
For site administrators, this update resolves frustrating issues when managing members, particularly when importing via CSV or organizing with labels. The fixes to the 'Complimentary' plan subscription management also provide more flexibility in handling special member subscriptions.
Developers will benefit from the improved middleware behavior and error reporting, while the new CODEOWNERS protection adds an extra layer of safety for database migrations.
Overall, this is primarily a maintenance release that addresses specific bugs rather than introducing major new features, making it a recommended update for all Ghost users to ensure stable operation of their sites.
Full Release Notes
Statistics:
User Affected:
- Can now successfully import members via CSV with proper subscription settings
- Can add labels to members without encountering relation errors
- Will benefit from improved error reporting to Sentry for better troubleshooting
