Payload CMS Release: 3.16.0

Tag Name: v3.16.0

Release Date: 1/10/2025

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 v3.16.0 brings significant improvements to performance, developer experience, and user interface. Key highlights include scheduled publishing/unpublishing, automated job execution via cron jobs, decoupled REST API handling from Next.js, and numerous bug fixes across the UI and rich text editor. This release also adds Estonian language support and improves existing translations.

Highlight of the Release

    • Scheduled publishing/unpublishing feature allows content to be automatically published or unpublished at specific times
    • Automated job execution via cron jobs for recurring tasks
    • REST API handling decoupled from Next.js for more flexibility
    • Improved performance in MongoDB operations (up to 50% faster)
    • Added support for Estonian, Catalan languages and improved existing translations

Migration Guide

Breaking Changes

None reported in this release.

Deprecations

  • The admin.disable property is now deprecated. To opt-out of serving the Admin Panel, REST API, or GraphQL API, you must delete their corresponding directories within your Next.js app.
  • Adapters in plugin-cloud-storage that were marked for deprecation in v2 are now actually deprecated. Use standalone @payloadcms/storage-* packages instead.

Migration Steps

  1. If you're using admin.disable, update your code to remove the corresponding directories instead.
  2. If you're using adapters from plugin-cloud-storage, migrate to the standalone packages.
  3. If you're using custom auth strategies that rely on JWT, you can now import and use the default JWT authentication strategy.
  4. If you're deploying to Vercel with upload collections, ensure you're using a proper storage adapter rather than local disk storage.

Upgrade Recommendations

This release brings significant improvements to performance, developer experience, and user interface with no breaking changes. The upgrade is recommended for all users, especially those who:

  1. Need scheduled publishing/unpublishing functionality
  2. Want to benefit from improved MongoDB performance
  3. Need to run automated tasks on a schedule
  4. Are using Payload with frameworks other than Next.js and want more flexibility with the REST API
  5. Have experienced any of the bugs fixed in this release

The upgrade process should be straightforward as there are no breaking changes reported. However, be aware of the deprecations mentioned in the migration guide.

Bug Fixes

UI Fixes

  • Fixed stale document status indicators when publishing, reverting, and unpublishing
  • Fixed form being editable during locale changes, which could lead to lost changes
  • Fixed relationship edit drawers not respecting current locale
  • Fixed pagination resetting perPage value when navigating
  • Fixed checkboxes as first field crashing WhereBuilder
  • Fixed inability to log out for public users
  • Fixed autosave not firing on first change
  • Fixed bulk upload issues with multiple upload fields

Rich Text Editor Fixes

  • Fixed handling of blocks or inline blocks that are not found in the config
  • Fixed formatted link markdown conversion
  • Fixed inline block drawers opening when document mounts
  • Fixed empty lines being incorrectly stripped from MDX blocks
  • Fixed incorrect string interpolation in upload converter

Database and API Fixes

  • Fixed MongoDB optimizations that caused issues in certain scenarios
  • Fixed querying by localized polymorphic relationships using objects
  • Fixed unique error message regression
  • Fixed handling of withoutEnlargement for undefined height or width
  • Fixed issues with copy to locale with localized arrays and blocks

New Features

Major Features

  • Scheduled Publishing/Unpublishing: Content can now be scheduled to automatically publish or unpublish at specific times, giving content teams more flexibility in content planning.
  • Automated Job Execution: New cron job functionality allows tasks to be automatically run on a schedule, improving workflow automation.
  • Decoupled REST API Handling: REST API handling has been decoupled from Next.js, making it possible to use Payload's REST API with any backend framework that uses the Fetch API.
  • Default JWT Authentication Strategy Export: The default JWT authentication strategy is now exported, making it easier to implement custom auth strategies.

Additional Features

  • Added support for Estonian, Catalan languages and improved existing translations
  • Added ability to run sub-tasks from within task handlers
  • Added more control over disabling GraphQL for collections and globals
  • Added warning when deploying to Vercel with upload collections missing storage adapters
  • Added support for browser-based caching via etags in storage adapters
  • Added ability to customize mongoose schema options with collectionsSchemaOptions
  • Added support for idType: 'uuid' in SQLite adapter

Security Updates

  • Fixed an issue where the payload secret was being logged via console.log in templates, creating a security risk
  • Improved handling of user permissions for scheduled publishing, ensuring users without publish permissions cannot schedule publishes
  • Fixed an issue where commit transactions weren't being properly handled in forgotPassword operations

Performance Improvements

MongoDB Performance Improvements

  • Significantly improved speed and memory efficiency across all MongoDB operations, with up to 50% faster performance
  • Removed Mongoose layer from database calls, using MongoDB directly
  • Replaced deep copying of read results with more efficient transform functions
  • Optimized traverseFields to accept flattenedFields for fewer recursive calls

Other Performance Improvements

  • Added support for browser-based caching via etags in storage adapters
  • Optimized database schema generation bin script to avoid additional file system writes
  • Prevented Drizzle schema push if schema hasn't changed, reducing overhead on reloads in development

Impact Summary

Payload CMS v3.16.0 is a feature-rich release that significantly enhances both developer and content editor experiences. The introduction of scheduled publishing/unpublishing gives content teams more flexibility in planning their content strategy. Developers will appreciate the decoupled REST API handling from Next.js, allowing Payload to be used with any backend framework that uses the Fetch API.

Performance improvements are substantial, particularly for MongoDB users who can expect up to 50% faster operations. The addition of automated job execution via cron jobs enables more sophisticated workflow automation.

The release also addresses numerous bugs across the UI, rich text editor, and database operations, resulting in a more stable and reliable experience. International users benefit from new language support for Estonian and Catalan, along with improvements to existing translations.

Overall, this release represents a significant step forward in Payload's capabilities, performance, and user experience without introducing breaking changes.

Full Release Notes

v3.16.0 (2025-01-10)

🚀 Features

🐛 Bug Fixes

  • collection access endpoint optional ID and use 404 for not found response (#10487) (225c24d)
  • do not autorun jobs during next build process (#10483) (d8f4f06)
  • properly validates preferences json (#10465) (6a262ab)
  • schedule publish allowed before saving draft (#10461) (3349a4c)
  • next: properly instantiates locale context (#10451) (a78bc6c)
  • payload-cloud: infinite recursion on init (#10467) (34a0d00)
  • richtext-lexical: respect defaultValue config of link feature url and linkType fields (#10498) (4fc6956)
  • richtext-lexical: properly handle error if blocks or inline blocks are not found (#10497) (e0df0d6)
  • richtext-lexical: update Thai translations for blockquote and horizontal rule (#10469) (8d5d2d1)
  • richtext-lexical: allow external state mutation of block node from outside the form (#10486) (4c96028)
  • richtext-lexical: inline Block drawers opened when document mounts (#10480) (bdb96dd)
  • ui: disables form during locale change (#8705) (f4596fc)
  • ui: stale doc status when publishing, reverting and unpublishing (#10405) (17e7ee2)
  • ui: removes edit drawer button from uploads collection edit view (#10426) (9701fc6)

📚 Documentation

📝 Templates

  • adjusted the cron job schedule so its compatible with hobby tiers as well (#10457) (d9ff2e0)
  • add support for scheduled publish to the website template [no lint] (#10455) (7321f9f)

🏡 Chores

🤝 Contributors

Statistics:

File Changed300
Line Additions94,329
Line Deletions8,879
Line Changes103,208
Total Commits250

User Affected:

  • Can now decouple REST API handling from Next.js for more flexibility
  • Can export and use the default JWTAuthentication strategy for custom auth implementations
  • Benefit from improved error handling in rich text editor and form validations
  • Can generate database schema with better type safety for Drizzle
  • Can run sub-tasks from within task handlers for more complex workflows

Contributors:

denolfejacobsfletchr1tsuuakhrarovsaidhkn-wturquicoJarrodMFleschDanRibbensPatrikKozakAlessioGrjavierlinkedpaulpopusGermanJabloklapecmasonyektajmikrutshrinidhi4uzuccsdamnsamnmarcusforsbergkethan11b0ts-en-oandershermansen6TELOIVJesperWeGerardPolloRebozadobratvanovgkennedy87sondreorlandtristankrassalexander-catoPlagueFPSDanil0v3snachomglzZhousiruamiraryan1996AdrianMajstevekuznetsovTidalCare