Payload CMS Release: 3.12.0

Tag Name: v3.12.0

Release Date: 12/28/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 v3.12.0 introduces scheduled publishing, enhanced MDX support in the rich text editor, improved plugin development tools, and fixes for UI issues. This release focuses on developer experience with better tooling, performance optimizations for PostgreSQL, and numerous bug fixes that improve stability and usability.

Highlight of the Release

    • Scheduled publishing and unpublishing of content
    • Enhanced MDX support in rich text editor with more lenient parsing
    • New plugin template with integration testing setup
    • Create projects from examples using --example CLI argument
    • Performance improvements for PostgreSQL database operations
    • Fixed UI issues with pagination, uploads, and infinite loading states

Migration Guide

No breaking changes were introduced in this release that would require migration steps. The new features like scheduled publishing are opt-in and can be enabled as needed in your collection or global configurations by setting versions.drafts.schedulePublish: true.

Upgrade Recommendations

This release is recommended for all users as it introduces valuable new features and fixes several important bugs without introducing breaking changes. The performance improvements for PostgreSQL users are particularly beneficial for development workflows.

To upgrade:

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

If you're using Docker, consider updating your Dockerfile to use the LTS Node.js version (22.12.0) as recommended in the updated templates.

Bug Fixes

UI Improvements

  • Fixed infinite loading states when adding blocks or array rows
  • Prevented multiple upload fields from overwriting each other's bulkUpload success handlers
  • Fixed pagination issues where perPage settings would reset when navigating
  • Public users can now properly log out from the admin panel

Rich Text Editor

  • Fixed selection restoration in the Lexical editor
  • Properly handled newlines in MDX props

Database Operations

  • Fixed deep querying and proper handling of getLocalizedPaths for blocks
  • Prevented indexes from changing names during Hot Module Replacement in PostgreSQL
  • Fixed joins to self-referencing collections in PostgreSQL
  • Fixed type generation when no en language is defined in i18n configuration

Other Fixes

  • Ensured tab labels and descriptions are properly serializable
  • Fixed various documentation issues including broken links and code examples

New Features

Scheduled Publishing

Content editors can now schedule when content should be published or unpublished in the future. This feature is enabled by setting versions.drafts.schedulePublish: true in Collection or Global configurations.

Enhanced Plugin Development

A new plugin template has been added to the monorepo, making it easier to create custom plugins with:

  • Integration testing setup
  • Custom client/server components
  • The same build setup used for official plugins

Create Projects from Examples

The create-payload-app CLI now supports creating projects from existing examples using the --example argument:

pnpx create-payload-app --example custom-server

Enhanced MDX Support

The rich text editor now has more lenient MDX JSON object parsing that:

  • Allows unquoted property keys in MDX components
  • Supports multiline strings in MDX props
  • Preserves newlines in MDX props

Additional Developer Utilities

  • req object is now available in filterOptions arguments
  • defaultLoggerOptions are now exported for easier logger customization
  • parseSearchParams utility is exported from the UI package

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

PostgreSQL Optimizations

  • Database schema is no longer pushed if not changed, significantly reducing overhead on reloads in development mode, especially when using remote databases
  • Added option to force Drizzle push with PAYLOAD_FORCE_DRIZZLE_PUSH=true environment flag if needed

Rich Text Editor Performance

  • Optimized the performance of selection handling in the Lexical editor
  • Improved MDX parsing efficiency

Impact Summary

Payload CMS v3.12.0 delivers significant improvements for both content editors and developers. The headline feature is scheduled publishing, allowing teams to plan content releases in advance. Developers benefit from enhanced tooling with a new plugin template, better MDX support in the rich text editor, and the ability to quickly create projects from examples.

The release also addresses several pain points in the UI, fixing issues with pagination, upload fields, and infinite loading states. PostgreSQL users will appreciate the performance optimizations that reduce development overhead by skipping unnecessary schema updates.

Overall, this is a quality-of-life update that improves the developer experience and adds a highly requested content management feature without introducing breaking changes.

Full Release Notes

v3.12.0 (2024-12-28)

🚀 Features

🐛 Bug Fixes

  • deep querying, handle getLocalizedPaths for blocks (#10187) (eff75f9)
  • generate types when no en language is defined in i18n (#10181) (8debb68)
  • ensure tab label and description are serializable (#10115) (68b5f61)
  • db-postgres: prevent indexes from changing name on HMR (#10154) (374b79d)
  • db-postgres: joins to self collection (#10182) (a0d8131)
  • richtext-lexical: newlines in mdx props were stripped, even though objects inside props may expect there to be newlines (#10215) (67db04c)
  • richtext-lexical: restore selection (#10129) (154ad9d)
  • ui: pagination resets perPage (#10199) (fad4ee6)
  • ui: prevent many upload fields overwriting bulkUpload onSuccess (#10189) (ebf3cee)
  • ui: public users unable to log out (#10188) (f3aebe3)
  • ui: infinite loading states when adding blocks or array rows (#10175) (b33f4b0)

⚡ Performance

  • db-postgres: do not push database schema if not changed (#10155) (98666eb)

📚 Documentation

🧪 Tests

📝 Templates

  • use publishConfig for the plugin template (#10196) (a5b9adc)
  • update Dockerfile for the website template, use the LTS version for Node.js image (#10184) (5613a7e)
  • bump for v3.11.0 (#10121) (235eade)

⚙️ CI

  • only label stale issues/prs, disable closing (1372f24)

🏡 Chores

  • bump next to 15.1.3 in the monorepo (#10211) (7a4d53a)
  • update rimraf and fix windows compatible clean script (#10152) (326b720)
  • UnauthorizedError file misspelled as UnathorizedError (#10157) (6b45b2d)
  • examples: localization example (#10134) (3bbc5bf)
  • live-preview: strongly types message events (#10148) (466f109)
  • richtext-lexical: export $createServerBlockNode, $isServerBlockNode and ServerBlockNode for the server (#10192) (1dc4b2c)
  • ui: exports parseSearchParams (#10185) (5d3b816)

🤝 Contributors

Statistics:

File Changed300
Line Additions24,004
Line Deletions511
Line Changes24,515
Total Commits42

User Affected:

  • Can now schedule content to be published or unpublished at a future date
  • Experience improved UI with fixed pagination and upload field handling
  • Better handling of public users who need to log out

Contributors:

denolfeakhrarovsaidr1tsuuGermanJablomarcusforsbergjacobsfletchkethan1AlessioGrDanRibbens1b0tjmikruts-en-o