Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.7.3

Payload CMS Release: Release 1.7.3

Tag Name: v1.7.3

Release Date: 5/1/2023

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 v1.7.3 brings several important enhancements including support for collection compound indexes, customizable link fields, and new language translations (Persian and Romanian). This release also fixes critical issues with query handling, hidden fields in access constraints, and bulk operations. The update improves developer experience with better error stack traces and fixes several bugs that were causing 500 errors.

Highlight of the Release

    • Support for collection compound indexes to improve database query performance
    • Customizable link fields for more flexible relationship management
    • Added Persian (Farsi) and Romanian language translations
    • Fixed critical query issues with timestamps and IDs
    • Improved error stack traces for better debugging

Migration Guide

No breaking changes were introduced in this release, so migration from v1.7.2 to v1.7.3 should be straightforward.

If you're using compound indexes:

export const YourCollection = {
  slug: 'your-collection',
  // Add compound indexes
  indexes: [
    {
      fields: { field1: 1, field2: 1 },
      options: { unique: true } // optional
    }
  ],
  fields: [
    // your fields
  ]
}

If you want to customize link fields:

{
  name: 'relationship',
  type: 'relationship',
  relationTo: 'collection',
  // Customize which fields appear in relationship options
  linkFields: ['title', 'customField']
}

Upgrade Recommendations

This release contains important bug fixes and useful new features without introducing breaking changes. It's recommended that all users upgrade to v1.7.3, especially if you:

  1. Use queries with timestamps or document IDs
  2. Perform bulk operations
  3. Need to use hidden fields in access control constraints
  4. Would benefit from compound indexes for performance
  5. Need Persian or Romanian language support

To upgrade, run:

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

Bug Fixes

Query Handling Fixes

  • Fixed an issue where queries on document IDs were throwing 500 errors
  • Resolved timestamp query problems that were causing incorrect results
  • Fixed bulk operations result type issues

Rich Text Editor Fixes

  • Added a workaround for Slate editor's isBlock function issue that was causing problems with rich text editing

Access Control Fixes

  • Fixed issue #2592 that prevented the use of hidden fields within access query constraints
  • This allows for more flexible access control patterns while maintaining field visibility rules

New Features

Collection Compound Indexes

PayloadCMS now supports compound indexes for collections, allowing developers to optimize query performance for frequently accessed field combinations. This feature is particularly useful for complex applications with large datasets.

Customizable Link Fields

Developers can now customize the fields used in relationship links, providing more flexibility in how related content is referenced and displayed.

New Language Translations

  • Added Persian (Farsi) language support
  • Added Romanian language support

Improved Error Handling

Enhanced API error stack traces to provide more useful debugging information when errors occur.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Database Query Optimization

The addition of compound indexes support allows for significant performance improvements when querying collections with multiple filter conditions. This can dramatically speed up complex queries that previously required scanning large portions of the database.

Build Process Improvements

Updated SWC minify webpack plugin for potentially faster builds.

Impact Summary

PayloadCMS v1.7.3 is a maintenance and feature enhancement release that improves developer experience and fixes several critical bugs. The addition of compound indexes provides significant performance benefits for complex applications, while the customizable link fields feature offers more flexibility in content relationships.

The bug fixes address several important issues that were causing 500 errors and incorrect query results, making this update important for production applications. The internationalization improvements with Persian and Romanian language support continue PayloadCMS's commitment to serving a global user base.

This release doesn't introduce breaking changes, making it a safe and recommended upgrade for all users. The improvements to error stack traces and fixes for hidden fields in access constraints will be particularly valuable for developers working on complex implementations.

Full Release Notes

1.7.3 (2023-05-01)

Bug Fixes

Features

Statistics:

File Changed92
Line Additions4,462
Line Deletions3,788
Line Changes8,250
Total Commits17

User Affected:

  • Can now create compound indexes on collections for improved query performance
  • Can customize link fields for more flexible relationship management
  • Benefit from fixed query issues when using IDs and timestamps
  • Can use hidden fields within access query constraints

Contributors:

JarrodMFleschmvarendorff2yuanpliDasMergopaulpopusdenolfeDanRibbensHarrison-Blairjmikrut