Payload CMS Release: 2.14.0

Tag Name: v2.14.0

Release Date: 4/24/2024

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

PayloadCMS v2.14.0 Release

What's New: This release introduces a new collection count operation and Vue support for Live Preview, while fixing several PostgreSQL database issues and UI improvements.

Why it Matters: Developers can now efficiently count collection documents without retrieving data, and Vue developers can now use Live Preview functionality. The PostgreSQL adapter has been stabilized with multiple bug fixes.

Who Should Care: PayloadCMS developers using PostgreSQL databases, Vue.js developers, and anyone working with collection filtering, bulk operations, or number fields in PayloadCMS.

Highlight of the Release

    • New collection count operation for efficient document counting
    • Vue Hook for Live Preview support
    • Multiple PostgreSQL database adapter fixes for nested structures
    • Fixed bulk publish functionality
    • Improved header filters in the admin interface
    • Added proper min/max attributes to number input fields

Migration Guide

No major migration steps are required for this release. However, if you're using the PostgreSQL adapter with nested groups inside nested blocks, you should test your application thoroughly after upgrading to ensure that the fixes work correctly with your specific data structures.

If you've implemented custom filtering logic that relies on equals or not_equals operators with hasMany relationship fields, you'll need to update your code as these operators have been removed for such fields.

Upgrade Recommendations

This release is recommended for all PayloadCMS users, especially those using PostgreSQL as their database or working with Vue.js applications.

PostgreSQL users will benefit from several critical fixes that improve stability and correctness when working with complex nested data structures.

Vue.js developers should upgrade to gain access to the new Live Preview functionality.

To upgrade, run:

npm install [email protected]
# or
yarn add [email protected]

If you're using specific PayloadCMS packages, make sure to update those as well:

  • db-mongodb to v1.5.0
  • db-postgres to v0.8.0
  • richtext-lexical to v0.9.0
  • plugin-seo to v2.3.1

Bug Fixes

PostgreSQL Database Fixes

Several critical issues with the PostgreSQL adapter have been resolved:

  • Fixed an issue where extra version suffixes were being added to table names
  • Resolved problems with nested groups inside nested blocks
  • Fixed row table names that were not being built properly

Admin UI and Functionality Fixes

  • Fixed bulk publish functionality, ensuring that multiple documents can be published simultaneously without errors
  • Improved header filters for better data filtering and navigation in the admin interface
  • Added missing min/max attributes to number input fields, ensuring proper validation and constraints
  • Removed equals and not_equals operators from fields with hasMany relationship to prevent incorrect filtering behavior

New Features

Collection Count Operation

A new count operation has been added to collections, allowing developers to efficiently count documents without retrieving the actual data. This is particularly useful for pagination, statistics, and performance optimization when you only need to know the number of documents matching certain criteria.

Vue Hook for Live Preview

PayloadCMS now provides Vue.js support for Live Preview functionality. This new hook allows Vue developers to implement real-time content previews in their applications, bringing the same powerful preview capabilities that were previously available to React developers.

Package Updates

Several PayloadCMS packages have been updated in this release:

  • db-mongodb: v1.5.0
  • db-postgres: v0.8.0
  • richtext-lexical: v0.9.0
  • plugin-seo: v2.3.1

Security Updates

No specific security fixes were included in this release.

Performance Improvements

Collection Count Performance

The new collection count operation provides significant performance improvements when only the count of documents is needed rather than the documents themselves. This reduces database load and network traffic by avoiding unnecessary data retrieval.

PostgreSQL Optimizations

The fixes to the PostgreSQL adapter improve the efficiency of operations involving nested data structures, particularly for complex content models using groups and blocks. These changes ensure that database operations are performed correctly without redundant processing or table name issues.

Impact Summary

PayloadCMS v2.14.0 brings important improvements to both developers and content editors. The new collection count operation enhances performance for applications that need to count documents without retrieving them. Vue.js developers now have access to Live Preview functionality, expanding the framework support of PayloadCMS.

The PostgreSQL adapter has received several critical fixes that improve stability when working with complex nested data structures, making it a more reliable option for production applications. These fixes address issues with table naming and nested groups inside blocks.

Admin interface improvements include fixed bulk publishing, better header filters, and proper min/max attributes for number inputs, all of which enhance the content management experience. The removal of inappropriate operators for hasMany fields ensures more accurate filtering behavior.

Overall, this release focuses on stability, performance, and expanding framework support, making PayloadCMS more versatile and reliable for various use cases.

Full Release Notes

2.14.0 (2024-04-24)

Features

Bug Fixes

  • bulk publish (#6006) (c11600a)
  • db-postgres: extra version suffix added to table names (#5939) (bd8b512)
  • db-postgres: Fixes nested groups inside nested blocks (#5882) (e258866)
  • db-postgres: row table names were not being built properly - v2 (#5961) (9152a23)
  • header filters (#5997) (ad01c67)
  • min/max attributes missing from number input (#5779) (985796b)
  • removes equals & not_equals operators from fields with hasMany (#5885) (a8c9625)

Statistics:

File Changed62
Line Additions2,079
Line Deletions1,194
Line Changes3,273
Total Commits19

User Affected:

  • Can now use the new count operation on collections for more efficient queries
  • PostgreSQL database users will experience more stable nested data structures
  • Better handling of table names in PostgreSQL adapter

Contributors:

denolfePatrikKozakChrisGV04r1tsuuDanRibbensrafalnawojczykrfdomingues98mike-keefe