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 of req, and return an array of objects with label and value 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 to 0, one process is forked for each CPU core, with a minimum of 2 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 and time schema field types.
    • Developers can now require their project app.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 project app.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 optional builders property, which replaces filters from 2.x, and within that an optional project property, which replaces projection from 2.x (to match MongoDB's cursor.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.