Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.0.21

Payload CMS Release: Release 1.0.21

Tag Name: v1.0.21

Release Date: 8/11/2022

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

Payload CMS v1.0.21 fixes critical issues with version control and querying capabilities. This maintenance release resolves problems with saving multiple versions when using unique fields and ensures proper querying on nested block fields. These fixes improve data integrity and query flexibility for Payload CMS users.

Highlight of the Release

    • Fixed issue with saving multiple versions when using unique fields
    • Resolved querying problems on nested block fields
    • Improved schema building to properly respect disableUnique option

Migration Guide

No migration steps are required for this release. The fixes are backward compatible and will automatically apply when you upgrade to v1.0.21.

Upgrade Recommendations

This release is recommended for all Payload CMS users, especially those who:

  1. Use version control with collections that have unique fields
  2. Query data based on nested block fields

Upgrade as soon as possible to avoid potential data integrity issues and to ensure proper query functionality.

Bug Fixes

Fixed Version Control with Unique Fields

Fixed a critical issue where saving multiple versions of content with unique fields would fail. The problem occurred because version schemas were being produced with uniqueness constraints, causing updates to fail when successive versions reused unchanged unique key-values (particularly identifier keys like slugs) from previous versions.

The root cause was that mongoose.buildSchema was not respecting the buildSchemaOptions.disableUnique setting. This regression was introduced with a previous fix in commit c175476e.

Fixed Querying on Nested Block Fields

Resolved an issue that prevented proper querying on nested block fields. This fix ensures that developers can now properly filter and search for content based on values within nested block structures.

New Features

No new features were added in this release.

Security Updates

No security fixes were included in this release.

Performance Improvements

While not explicitly labeled as performance improvements, both fixes contribute to more reliable system behavior:

  • The version control fix prevents unnecessary database errors and conflicts when saving multiple versions
  • The nested block query fix ensures more efficient and accurate data retrieval operations

Impact Summary

This maintenance release addresses two significant bugs that could impact data integrity and query capabilities in Payload CMS:

  1. Version Control Fix: Resolves a regression that prevented saving multiple versions of content with unique fields. This issue could lead to failed updates and potential data loss when working with versioned content.

  2. Nested Block Query Fix: Ensures that queries targeting data within nested block fields work correctly, improving the reliability of data retrieval operations.

Both fixes are non-breaking changes that improve system stability without requiring any migration steps.

Full Release Notes

1.0.21 (2022-08-11)

Bug Fixes

  • ensures you can query on nested block fields (ca852e8)
  • saving multiple versions (#918) (d0da3d7)

Statistics:

File Changed6
Line Additions43
Line Deletions4
Line Changes47
Total Commits4

User Affected:

  • Can now save multiple versions of content with unique fields without errors
  • Benefit from more reliable version history tracking

Contributors:

KGZMjmikrut