Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.106

Payload CMS Release: 3.0.0-beta.106

Pre Release

Tag Name: v3.0.0-beta.106

Release Date: 9/15/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 v3.0.0-beta.106 fixes a critical bug related to document duplication with localized nested arrays and blocks. This update resolves crashes caused by foreign key constraints and unique ID issues in Postgres and SQLite databases when duplicating documents with complex nested structures inside localized fields. The fix ensures proper hook execution order across all locales and addresses additional issues with localized groups and named tabs containing arrays or blocks.

Highlight of the Release

    • Fixed document duplication crashes with localized nested arrays in Postgres/SQLite
    • Improved hook execution order for proper handling of localized content duplication
    • Resolved issues with arrays/blocks inside localized groups and named tabs

Migration Guide

No migration is required for this release. The fix is implemented in a way that maintains backward compatibility with existing data structures and configurations.

If you were previously using custom workarounds to handle duplication of localized nested arrays or blocks, you can now remove those workarounds as the core functionality has been fixed.

Upgrade Recommendations

Recommended for All Users Working with Localized Content

This upgrade is strongly recommended for all PayloadCMS users who:

  • Use Postgres or SQLite as their database
  • Work with localized content that contains nested arrays or blocks
  • Use the document duplication feature

The fix resolves a critical issue that could cause application crashes during document duplication operations with complex localized content structures.

Since this is a bug fix release with no breaking changes, upgrading should be straightforward and low-risk.

Bug Fixes

Fixed Document Duplication with Localized Nested Arrays

This release fixes a critical issue where duplicating documents in Postgres or SQLite databases would crash due to foreign key constraints and unique ID conflicts. The problem specifically occurred when documents contained nested arrays or blocks within localized arrays or blocks.

Improved Hook Execution Order

The fix implements a revised hook execution order where beforeDuplicate hooks now run against all locales prior to the beforeValidate and beforeChange hooks. This ensures proper ID generation and constraint handling across all localized content.

Resolved Issues with Localized Groups and Named Tabs

Additional fixes address problems in Postgres and SQLite databases when working with:

  • Arrays or blocks nested within localized groups
  • Arrays or blocks nested within localized named tabs

These structures now properly maintain their relationships during duplication operations without triggering database constraints.

New Features

No new features were introduced in this release. This is a bug fix release focused on resolving issues with document duplication in localized nested content structures.

Security Updates

No security fixes were included in this release.

Performance Improvements

No specific performance improvements were mentioned in this release. The focus was on fixing functionality related to document duplication with localized nested content.

Impact Summary

This release addresses a significant pain point for PayloadCMS users working with localized content in Postgres and SQLite databases. The fix prevents crashes during document duplication when dealing with nested arrays and blocks within localized fields, which was a critical issue affecting content management workflows.

The impact is particularly important for multilingual sites and applications that rely on complex content structures with localization. By fixing the foreign key constraint and unique ID issues, this release ensures that content editors can reliably duplicate documents without encountering database errors.

The improved hook execution order (beforeDuplicate running against all locales before beforeValidate and beforeChange) provides a more robust foundation for handling complex document operations across localized content.

Additionally, the fixes for localized groups and named tabs containing arrays or blocks resolve edge cases that were causing problems in real-world content management scenarios.

Full Release Notes

Statistics:

File Changed52
Line Additions625
Line Deletions117
Line Changes742
Total Commits2

User Affected:

  • Can now safely duplicate documents with localized nested arrays without experiencing crashes
  • Will experience improved stability when working with complex nested field structures in localized content
  • No longer need to implement workarounds for duplication issues with localized nested content

Contributors:

jmikrutdenolfe