ApostropheCMS v3.7.0 Release Notes
Release Date: 2021-10-26 // over 2 years ago-
โ Adds
- Schema select field choices can now be populated by a server side function, like an API call. Set the
choices
property to a method name of the calling module. That function should take a single argument ofreq
, and return an array of objects withlabel
andvalue
properties. The function can be async and will be awaited. - Apostrophe now has built-in support for the Node.js cluster module. If the
APOS_CLUSTER_PROCESSES
environment variable is set to a number, that number of child processes are forked, sharing the same listening port. If the variable is set to0
, one process is forked for each CPU core, with a minimum of2
to provide availability during restarts. If the variable is set to a negative number, that number is added to the number of CPU cores, e.g.-1
is a good way to reserve one core for MongoDB if it is running on the same server. This is for production use only (NODE_ENV=production
). If a child process fails it is restarted automatically.
๐ Fixes
- ๐ป Prevents double-escaping interpolated localization strings in the UI.
- ๐ Rich text editor style labels are now run through a localization method to get the translated strings from their l10n keys.
- ๐ Fixes README Node version requirement (Node 12+).
- ๐ The text alignment buttons now work immediately in a new rich text widget. Previously they worked only after manually setting a style or refreshing the page. Thanks to Michelin for their support of this fix.
- ๐ป Users can now activate the built-in date and time editing popups of modern browsers when using the
date
andtime
schema field types. - Developers can now
require
their projectapp.js
file in the Node.js REPL for debugging and inspection. Thanks to Matthew Francis Brunetti. - 0๏ธโฃ If a static text phrase is unavailable in both the current locale and the default locale, Apostrophe will always fall back to the
en
locale as a last resort, which ensures the admin UI works if it has not been translated. - Developers can now
require
their projectapp.js
in the Node.js REPL for debugging and inspection - Ensure array field items have valid _id prop before storing. Thanks to Thanks to Matthew Francis Brunetti.
๐ Changes
- ๐ In 3.x,
relationship
fields have an optionalbuilders
property, which replacesfilters
from 2.x, and within that an optionalproject
property, which replacesprojection
from 2.x (to match MongoDB'scursor.project
). Prior to this release leaving the old syntax in place could lead to severe performance problems due to a lack of projections. Starting with this release the 2.x syntax results in an error at startup to help the developer correct their code. - The
className
option from the widget options in a rich text area field is now also applied to the rich text editor itself, for a consistently WYSIWYG appearance when editing and when viewing. Thanks to Max Mulatz for this contribution. - โ Adds deprecation notes to doc module
afterLoad
events, which are deprecated. - โ Removes unused
afterLogin
method in the login module.
- Schema select field choices can now be populated by a server side function, like an API call. Set the