Home

>

Tools

>

Payload CMS

>

Releases

>

Release v2.2.2

Payload CMS Release: Release v2.2.2

Tag Name: v2.2.2

Release Date: 11/27/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.2.2 Release

This release introduces Korean language support and fixes several critical bugs including number field validation, JSON data preservation when switching tabs, and transaction handling within document access controls. It also addresses issues with date filters, relationship handling in Live Preview, and improves the rich text editor experience with better slash menu hints and floating toolbar enhancements.

Highlight of the Release

    • Added Korean language translation support
    • Fixed critical bug with transactions in document access controls
    • Resolved JSON data loss when switching tabs
    • Improved number field validation
    • Enhanced rich text editor with better slash menu hints and floating toolbar improvements

Migration Guide

Breaking Changes in Rich Text Editor

  1. UnorderedListFeature Rename: The exported UnoderedListFeature has been renamed to UnorderedListFeature to fix a typo. If you're using this feature directly, update your imports:

    // Before
    import { UnoderedListFeature } from '@payloadcms/richtext-lexical'
    
    // After
    import { UnorderedListFeature } from '@payloadcms/richtext-lexical'
    
  2. SlashMenu Interface Changes: The SlashMenu section in the Feature interface has been simplified with improved CSS class names. The 'title' property has been changed to 'key' and 'displayName'. Update your custom slash menu implementations:

    // Before
    {
      title: 'My Custom Option'
      // other properties
    }
    
    // After
    {
      key: 'myCustomOption',
      displayName: 'My Custom Option'
      // other properties
    }
    

CSS Class Name Changes

If you have custom styling targeting rich text editor elements, be aware that several CSS class names have been improved for consistency. Review and update your custom CSS selectors accordingly.

Upgrade Recommendations

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

  • Use document access controls with transactions
  • Work with JSON fields across multiple tabs
  • Utilize number field validation
  • Need Korean language support
  • Use Live Preview with relationships

The bug fixes in this release address several critical issues that could affect data integrity and user experience. While there are two breaking changes in the rich text editor component, they are relatively minor and only affect users who directly reference the renamed components or interfaces.

To upgrade:

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

After upgrading, review the migration guide if you use the rich text editor with custom components or styling.

Bug Fixes

Critical Fixes

  • Transaction Handling: Fixed broken transactions within document access controls, which could lead to data integrity issues
  • JSON Data Preservation: Resolved an issue where JSON data would reset when switching tabs, preventing data loss
  • Number Field Validation: Fixed validation for number fields, ensuring proper data integrity
  • Date Filter Options: Now correctly passes date options to react-datepicker in filter UI and removes duplicate options from operators select
  • Live Preview Relationships: Fixed population of rich text relationships and clearing of hasMany relationships in Live Preview
  • PostgreSQL Pagination: Corrected incorrect pagination totalDocs count in PostgreSQL database adapter

Minor Fixes

  • Fixed a typo in Polish translations
  • Fixed GraphQL handling of deleted relationships
  • Corrected template issues to prevent infinite loops in populateArchiveBlock

New Features

Added Korean Language Support

The Payload CMS admin interface is now available in Korean, expanding the internationalization options for users. This addition makes the platform more accessible to Korean-speaking developers and content editors.

Rich Text Editor Improvements

  • Added a hint to show users that the slash menu exists, improving discoverability
  • Enhanced the floating select toolbar with configurable dropdown entry components
  • Added lists to the floating toolbar for easier formatting

Security Updates

No specific security fixes were included in this release.

Performance Improvements

Performance Optimizations

  • Improved Live Preview relationship handling, which should result in more efficient rendering
  • Fixed transaction handling within document access controls, potentially improving database operation performance
  • Enhanced template functionality to prevent infinite loops in populateArchiveBlock, avoiding unnecessary processing

Impact Summary

Payload CMS v2.2.2 is primarily a maintenance release that addresses several important bugs while adding Korean language support. The most significant fixes include resolving transaction handling within document access controls, preventing JSON data loss when switching tabs, and improving number field validation.

For developers, this release enhances stability and reliability, particularly for applications using document access controls with transactions or complex form interactions. Content editors will benefit from a more stable editing experience, especially when working with JSON fields and the rich text editor.

The addition of Korean language support expands Payload's accessibility to Korean-speaking users, continuing the CMS's commitment to internationalization.

While there are two breaking changes in the rich text editor component, they are minor and only affect users who directly reference the renamed components or interfaces. Most users can upgrade without any code changes.

Full Release Notes

2.2.2 (2023-11-27)

Features

Bug Fixes

  • number field validation (#4233) (19fcfc2)
  • passes date options to the react-datepicker in filter UI, removes duplicate options from operators select (#4225) (3d2b62b)
  • prevent json data getting reset when switching tabs (#4123) (1dcd3a2)
  • transactions broken within doc access (443847e)
  • typo in polish translations (#4234) (56a4692)

Statistics:

File Changed77
Line Additions1,904
Line Deletions400
Line Changes2,304
Total Commits37

User Affected:

  • Benefit from fixed transactions within document access controls
  • Can now properly validate number fields
  • No longer experience data loss when switching tabs in JSON fields
  • Have access to improved documentation with fixed links and examples

Contributors:

jacobsfletchJarrodMFleschdenolfeDanRibbensrklosjessrynkarstoddabrMarkAtOmniuxAlessioGrzakinadhifSimYunSupHaliaxtylandavisjmikrut