ApostropheCMS v3.5.0 Release Notes

Release Date: 2021-09-23 // over 2 years ago
    • 🏗 Pinned dependency on vue-material-design-icons to fix apos-build.js build error in production.
    • The file size of uploaded media is visible again when selected in the editor, and media information such as upload date, dimensions and file size is now properly localized.
    • 🛠 Fixes moog error messages to reflect the recommended pattern of customization functions only taking self as an argument.
    • 💅 Rich Text widgets now instantiate with a valid element from the styles option rather than always starting with an unclassed <p> tag.
    • 🚀 Since version 3.2.0, apostrophe modules to be loaded via npm must appear as explicit npm dependencies of the project. This is a necessary security and stability improvement, but it was slightly too strict. Starting with this release, if the project has no package.json in its root directory, the package.json in the closest ancestor directory is consulted.
    • 🛠 Fixes a bug where having no project modules directory would throw an error. This is primarily a concern for module unit tests where there are no additional modules involved.
    • 🍱 css-loader now ignores url() in css files inside assets so that paths are left intact, i.e. url(/images/file.svg) will now find a static file at /public/images/file.svg (static assets in /public are served by express.static). Thanks to Matic Tersek.
    • ⏪ Restored support for clicking on a "foreign" area, i.e. an area displayed on the page whose content comes from a piece, in order to edit it in an appropriate way.
    • 🔧 Apostrophe module aliases and the data attached to them are now visible immediately to ui/src/index.js JavaScript code, i.e. you can write apos.alias where alias matches the alias option configured for that module. Previously one had to write apos.modules['module-name'] or wait until next tick. However, note that most modules do not push any data to the browser when a user is not logged in. You can do so in a custom module by calling self.enableBrowserData('public') from init and implementing or extending the getBrowserData(req) method (note that page, piece and widget types already have one, so it is important to extend in those cases).
    • options.testModule works properly when implementing unit tests for an npm module that is namespaced.

    🔄 Changes

    • 0️⃣ Cascade grouping (e.g., grouping fields) will now concatenate a group's field name array with the field name array of an existing group of the same name. Put simply, if a new piece module adds their custom fields to a basics group, that field will be added to the default basics group fields. Previously the new group would have replaced the old, leaving inherited fields in the "Ungrouped" section.
    • AposButton's block modifier now less login-specific

    ➕ Adds

    • 💅 Rich Text widget's styles support a def property for specifying the default style the editor should instantiate with.
    • A more helpful error message if a field of type area is missing its options property.