Payload CMS Release: Release 1.1.11
Tag Name: v1.1.11
Release Date: 10/12/2022
Payload CMSPayload 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.1.11 brings important fixes for array and block field handling along with a new admin hook for duplicating content. This release addresses form data handling issues and enhances the admin UI's duplication capabilities, making it more reliable for content editors working with complex field structures.
Highlight of the Release
- Fixed form data handling for arrays and blocks
- Added new beforeDuplicate admin hook for customizing duplication behavior
Migration Guide
No migration is required for this release. The changes are non-breaking and should work seamlessly with existing Payload CMS implementations.
Upgrade Recommendations
This release is recommended for all users, especially those who:
- Use array and block fields extensively in their content models
- Need to customize the document duplication process in the admin panel
The upgrade should be straightforward with no breaking changes. Simply update your Payload CMS dependency to version 1.1.11:
npm install [email protected]
# or
yarn add [email protected]
Bug Fixes
Array and Block Field Form Data Handling
Fixed an issue where array and block fields were not properly mounting with disableFormData: true. This bug, reported in issue #1242, was causing unexpected behavior when working with these field types.
The fix ensures that arrays and blocks are properly initialized with form data disabled, preventing potential issues with data handling and submission. This improves reliability when working with complex nested structures in the Payload admin interface.
New Features
beforeDuplicate Admin Hook
A new beforeDuplicate admin hook has been added to Payload CMS, allowing developers to customize the duplication process in the admin panel. This hook is triggered before a document is duplicated, giving developers the opportunity to modify the data or perform additional actions during duplication.
This feature addresses the need for more control over the duplication process, as requested in issue #1243. Developers can now intercept and modify content before it's duplicated, enabling use cases such as:
- Clearing specific fields during duplication
- Setting default values for the duplicated document
- Adding custom logic to handle relationships or complex data structures
- Implementing validation or permission checks before duplication occurs
Security Updates
No security fixes were mentioned in this release.
Performance Improvements
No specific performance improvements were mentioned in this release.
Impact Summary
This release focuses on improving the reliability of Payload CMS by fixing form data handling for array and block fields, which are commonly used components in content modeling. The addition of the beforeDuplicate admin hook enhances the flexibility of the admin interface by allowing developers to customize the duplication process.
While the changes are relatively small in scope, they address specific pain points reported by the community. The form data handling fix resolves potential issues when working with complex nested structures, while the new hook provides developers with more control over content workflows in the admin panel.
These improvements contribute to a more stable and customizable CMS experience, particularly for projects with complex content structures that rely heavily on arrays and blocks.
