Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.13.1

Payload CMS Release: Release 1.13.1

Tag Name: v1.13.1

Release Date: 8/8/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.13.1 fixes a critical bug in array field manipulation functions. This patch release addresses issues with row insertion in addFieldRow and replaceFieldRow functions, ensuring proper index handling when manipulating array fields in the CMS.

Highlight of the Release

    • Fixed bug in array field row insertion logic
    • Improved reliability of addFieldRow and replaceFieldRow functions
    • Patch release with minimal changes focused on stability

Migration Guide

No migration is required for this patch release. The fix for array field manipulation is backward compatible and should work seamlessly with existing code.

If you were experiencing issues with array field manipulation using addFieldRow or replaceFieldRow, upgrading to v1.13.1 should resolve these problems without requiring any changes to your implementation.

Upgrade Recommendations

This is a recommended upgrade for all users of PayloadCMS v1.13.0, especially if you:

  • Use array fields in your content models
  • Programmatically manipulate array fields using the Payload API
  • Have experienced issues with row insertion in array fields

The upgrade process should be straightforward:

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

No configuration changes or migrations are required for this update.

Bug Fixes

Array Field Manipulation Fix

Fixed a bug in the addFieldRow and replaceFieldRow functions that was causing incorrect row index insertion. This issue affected how new rows were being added to array fields, potentially causing data to be inserted at incorrect positions.

The fix ensures that row indices are properly calculated and respected when manipulating array fields, preventing potential data corruption or unexpected behavior when working with array-based content structures.

PR: #3145 Commit: f5cf546

New Features

No new features were introduced in this patch release. This is a bug fix release focused on addressing issues with array field manipulation.

Security Updates

No security fixes were included in this release.

Performance Improvements

No specific performance improvements were included in this release. The focus was on fixing the array field manipulation bug.

Impact Summary

This patch release addresses a specific bug in PayloadCMS's array field manipulation functionality. The fix ensures that when using addFieldRow and replaceFieldRow functions, rows are inserted at the correct position within array fields.

While this is a targeted fix, it's important for maintaining data integrity when working with array-based content structures. Incorrect row insertion could potentially lead to data being stored in unexpected positions within arrays, causing confusion for content editors and potentially breaking frontend implementations that rely on specific array structures.

The impact is primarily on developers who interact with the Payload API programmatically and content editors who work with complex array-based content models. The fix improves stability and reliability without introducing any breaking changes or requiring migrations.

Full Release Notes

1.13.1 (2023-08-08)

Bug Fixes

  • updates addFieldRow and replaceFieldRow rowIndex insertion (#3145) (f5cf546)

Statistics:

File Changed14
Line Additions174
Line Deletions19
Line Changes193
Total Commits3

User Affected:

  • Fixed issues when programmatically manipulating array fields using `addFieldRow` and `replaceFieldRow` functions
  • More reliable array manipulation when working with the Payload API
  • Reduced risk of data corruption when inserting or replacing rows in array fields

Contributors:

DanRibbensJarrodMFlesch