Home

>

Tools

>

Payload CMS

>

Releases

>

Release v2.8.0

Payload CMS Release: Release v2.8.0

Tag Name: v2.8.0

Release Date: 1/12/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

Payload CMS v2.8.0 brings significant improvements to database handling, plugin functionality, and developer experience. Key updates include fixing pagination issues with limit=0, enhancing relationship handling, adding custom config properties in blocks, and improving the SEO plugin with breaking changes. This release focuses on stability and feature enhancements that benefit both developers and content managers.

Highlight of the Release

    • Fixed pagination to return all documents when limit=0 is specified
    • Added support for custom configuration properties in blocks
    • Improved relationship handling with prioritized value key and draft content support
    • Enhanced developer experience with local timestamps in logs
    • Updated SEO plugin with breaking changes and French translations

Migration Guide

SEO Plugin Breaking Changes

If you're using the SEO plugin, note that it no longer supports Payload versions below 2.7.0. To upgrade:

  1. Ensure you're running Payload v2.7.0 or newer
  2. Update the SEO plugin to the latest version
  3. Review your SEO field configurations for any compatibility issues

Database Migration Regression Fix

If you experienced issues with migrations in previous versions, this release includes a fix for migration regressions. No specific migration steps are required, but testing your existing migrations after upgrading is recommended.

Upgrade Recommendations

Recommended Upgrade Path

This release contains important bug fixes and feature enhancements that benefit most Payload users. The upgrade is particularly important if you:

  • Use limit=0 in your queries and expect to receive all documents
  • Work with relationship fields and draft content
  • Use the SEO plugin
  • Have custom ID fields nested in tabs or rows

For most users, this is a straightforward upgrade with minimal breaking changes. The only major breaking change affects users of the SEO plugin with Payload versions below 2.7.0.

To upgrade:

  1. Update your Payload dependencies to v2.8.0
  2. Update any plugins to their latest compatible versions
  3. If using the SEO plugin, ensure you're on Payload v2.7.0 or newer
  4. Test your application thoroughly, especially database queries and relationship fields

Bug Fixes

Database Fixes

  • Fixed a critical issue where specifying limit=0 in queries now correctly returns all documents without pagination in both MongoDB and PostgreSQL adapters
  • Resolved a migration regression affecting both MongoDB and PostgreSQL database adapters

Relationship Handling Improvements

  • Fixed relationship queries to prioritize the value key when filtering, ensuring more consistent query results
  • Added support for passing draft=true when fetching relationships, allowing access to draft content in relationship fields
  • Resolved text field validation issues with hasMany relationships

UI and Structure Fixes

  • Fixed support for custom ID fields nested inside unnamed tabs and rows
  • Improved the Form Builder plugin to properly handle template variables with the Lexical editor
  • Fixed an issue that prevented building Payload without initializing it

New Features

Custom Configuration Properties in Blocks

Blocks can now accept custom configuration properties, allowing for greater flexibility and customization in your content models. This feature enables developers to extend block functionality with additional metadata or configuration options.

Local Timestamps in Logs

The logger now displays timestamps in local time rather than UTC, making it easier to correlate logs with local events and improving the debugging experience.

SEO Plugin Enhancements

  • Added French translations to the SEO plugin, expanding its internationalization support
  • The plugin-cloud now uses Resend SMTP instead of a custom transport for improved email delivery

Form Builder Improvements

The Form Builder plugin now uses the Lexical editor instead of curly brackets for template variables, providing a more robust and user-friendly editing experience.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Query Optimization

The fix for relationship queries that prioritizes the value key not only improves consistency but can also enhance query performance by reducing unnecessary lookups.

Build Process Improvements

The ability to build Payload without initializing it allows for more efficient deployment workflows and can reduce resource usage during the build process.

Impact Summary

Payload CMS v2.8.0 delivers significant improvements to core functionality while maintaining backward compatibility for most users. The release addresses several important bugs in database handling, particularly fixing pagination issues when limit=0 is specified and resolving migration regressions.

Developer experience is enhanced with the ability to add custom configuration properties to blocks, local timestamps in logs, and the ability to build Payload without initialization. Content managers benefit from improved relationship handling, better form validation, and support for custom ID fields in more locations.

The SEO plugin receives notable updates including French translations, but drops support for Payload versions below 2.7.0, which is the only breaking change in this release.

Overall, this update strengthens Payload's reliability and flexibility while expanding its feature set in targeted areas that benefit both developers and content managers. The improvements to relationship handling and pagination are particularly valuable for applications with complex data models and large datasets.

Full Release Notes

2.8.0 (2024-01-12)

Features

Bug Fixes

  • allow a custom ID field to be nested inside unnamed tabs and rows (#4701) (6d5ac1d)
  • build payload without initializing (#4028) (1115387)
  • db-mongodb: limit=0 returns unpaginated (63e5c43)
  • db-postgres: totalPages value when limit=0 (5702b83)
  • migration regression (#4777) (fa3b3dd)
  • db-mongodb: migration regression (#4777) (fa3b3dd)
  • **db-postgres:**migration regression (#4777) (fa3b3dd)
  • passes draft=true in fetch for relationships (#4784) (0a259d2)
  • plugin-form-builder: replaces curly brackets with lexical editor (#4753) (8481846)
  • prioritizes value key when filtering / querying for relationships (#4727) (d0f7677)
  • text hasMany validation (#4789) (e2e56a4)

⚠ BREAKING CHANGES

@payloadcms/plugin-seo

  • remove support for payload <2.7.0 (#4765)

Statistics:

File Changed133
Line Additions8,492
Line Deletions4,244
Line Changes12,736
Total Commits39

User Affected:

  • Can now build Payload without initializing it, enabling more flexible deployment patterns
  • Can add custom configuration properties to blocks for enhanced customization
  • Need to update SEO plugin implementations if using with Payload v2.7.0 or newer
  • Benefit from improved relationship querying with prioritized `value` key
  • Can leverage local timestamps in logs for better debugging

Contributors:

denolfeAlessioGrSimYunSuptaismassaroPatrikKozakkiwagumaximeMDJarrodMFleschDanRibbenspaulpopusDavidOliverMarvinXutyteen4a03yurikoshiishinicobohne