Home

>

Tools

>

Payload CMS

>

Releases

>

Release v2.1.1

Payload CMS Release: Release v2.1.1

Tag Name: v2.1.1

Release Date: 11/10/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

Payload CMS v2.1.1 Release

What's New: This release focuses on bug fixes across multiple areas including rich text editing, live preview functionality, document controls, and MongoDB integration. It addresses issues with unnecessary re-renders, improves field validation, and enhances the user experience with better handling of SVG images and document relationships.

Why It Matters: These fixes improve stability and performance, particularly for users working with rich text editing, live previews, and document relationships. The MongoDB improvements are especially important for users deploying on AWS DocumentDB.

Who Should Care: Developers using Payload CMS, especially those working with rich text content, live preview features, or MongoDB/AWS DocumentDB as their database.

Highlight of the Release

    • Fixed rich text editor issues including unnecessary node value saving and floating toolbar positioning
    • Improved live preview functionality with better field recursion and relationship population
    • Added option to disable MongoDB index hints for AWS DocumentDB compatibility
    • Enhanced image handling with proper SVG support and improved preview drawer

Migration Guide

No migration is required for this release as it contains only bug fixes and performance improvements without introducing breaking changes. Users can upgrade directly from v2.1.0 to v2.1.1 without any additional steps.

Upgrade Recommendations

This is a recommended upgrade for all users of Payload CMS v2.1.0, especially for:

  • Users experiencing issues with the Lexical rich text editor
  • Developers using the live preview functionality
  • Teams working with MongoDB, particularly on AWS DocumentDB
  • Anyone encountering problems with document relationships or image handling

The upgrade process should be straightforward as this is a patch release with no breaking changes:

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

Bug Fixes

Rich Text Editor Fixes

  • Fixed unnecessary saving of node values when initially opening a document in the Lexical rich text editor
  • Corrected positioning of the floating select toolbar caret when the first line is selected
  • Added new integration tests for the Lexical editor to improve stability

Live Preview Improvements

  • Fixed field recursion and relationship population in live preview
  • Ensured field schema exists before traversing fields to prevent errors
  • Properly handled apiRoute parameter in useLivePreview

Document and Image Handling

  • Conditionally hide dot menu in DocumentControls when not needed
  • Disabled editing option for SVG image types to prevent compatibility issues
  • Hidden empty image sizes from the preview drawer for cleaner UI
  • Fixed creation of related documents within a transaction when filterOptions is used

Access Control and Performance

  • Fixed potential issue with access control not using request object
  • Prevented field validation from triggering unnecessary re-renders
  • Fixed test suites that use clearAndSeedEverything for more reliable testing

New Features

No significant new features were introduced in this release as it primarily focuses on bug fixes and performance improvements.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Performance Enhancements

  • Reduced Unnecessary Re-renders: Field validation has been optimized to prevent triggering unnecessary re-renders, which improves overall application performance and responsiveness.

  • MongoDB Query Optimization: Added a new disableIndexHints option for MongoDB adapter, allowing users to disable index hint optimization. This is particularly beneficial for AWS DocumentDB users where this optimization can cause performance issues.

  • Improved Document Relationship Handling: Fixed issues with the creation of related documents within transactions when using filterOptions, which improves performance and reliability when working with complex document relationships.

Impact Summary

Payload CMS v2.1.1 is a maintenance release that addresses several important bugs and performance issues across the platform. The fixes to the rich text editor improve the content editing experience, while the live preview enhancements make the preview functionality more reliable.

The addition of the disableIndexHints option for MongoDB is particularly significant for users deploying on AWS DocumentDB, as it resolves compatibility issues that could affect query performance.

Other improvements include better handling of SVG images, more efficient document relationship management, and reduced unnecessary re-renders during field validation. These changes collectively enhance the stability, performance, and user experience of the CMS.

While this release doesn't introduce new features, the bug fixes and performance improvements make it a worthwhile upgrade for all Payload CMS users, especially those affected by the specific issues addressed.

Full Release Notes

2.1.1 (2023-11-10)

Bug Fixes

  • conditionally hide dot menu in DocumentControls (#4075) (cef4cbb)
  • disable editing option for svg image types (#4071) (949e265)
  • fixes creation of related documents within a transaction if filterOptions is used (#4087) (acad288)
  • hide empty image sizes from the preview drawer (#3946) (687f485)
  • live-preview: ensures field schema exists before traversing fields (#4074) (7059a71)
  • live-preview: field recursion and relationship population (#4045) (2ad7340)
  • live-preview: properly handles apiRoute (#4076) (1f851f2)
  • possible issue with access control not using req (#4086) (348a70c)
  • richtext-lexical: Blocks: unnecessary saving node value when initially opening a document & new lexical tests (#4059) (fff377a)
  • richtext-lexical: floating select toolbar caret not positioned correctly if first line is selected (#4062) (c462df3)

Statistics:

File Changed112
Line Additions2,901
Line Deletions2,546
Line Changes5,447
Total Commits24

User Affected:

  • Improved rich text editing experience with fixes to the Lexical editor
  • Better document controls with conditional dot menu visibility
  • Enhanced image handling with proper SVG support and improved image size preview

Contributors:

denolfeAlessioGrjacobsfletchOmikorinPatrikKozakJarrodMFleschjessrynkarDanRibbensdiesieben07