Apostrophe 3.38.0 New module events, a host of useful modules, and general fixes #4010
BoDonkey
announced in
Release Notes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello JavaScript Aficionados!
This release sees several changes to core module emit events. While these events were added to aid the MongoDB Atlas global sharding module that comes out next cycle, feel free to use them in your custom handlers!
Previously, any URL that was capitalized, while the slug was lowercase, would fail. Now, unless the
@apostrophecms/pagemodule is passed an option ofredirectFailedUpperCaseUrls: false, uppercase URLs that would return a 404 are converted to lowercase and tried again.On the topic of fixes, editors will appreciate that attempting to upload an image that is too small will now trigger a clear notification rather than an error. Additionally, the minimum size will be listed in the
Edit Imagemodal. Other fixes include updating theaposModeproperty of previous document versions to prevent problems with localization. Note: this fix will run a migration on first start-up.In addition, we reviewed a whole bunch of existing A3 modules that were released as beta and never officially marked stable. Since no fixes have been needed, here’s a big roundup of useful A3 modules that are officially stable as of… now! Maybe you missed ‘em:
@apostrophecms/anchors@apostrophecms/cache-redis@apostrophecms/passport-bridge@apostrophecms/security-headers@apostrophecms/login-recaptcha@apostrophecms/login-totp@apostrophecms/piece-type-exporterScroll down to read more!
Moving into our next cycle, as mentioned, global sharding will be released and we are currently deep in the weeds of designing another enterprise module to set per document permissions.
Until next time, what is your favorite Apostrophe schema field, and why is it the inline array?
Apostrophe 3.38.0
Adds
beforeSaveevent from the@apostrophecms:notificationmodule, withreqand thenotificationas arguments, in order to give the possibility to override the notification.beforeInsertevent from the@apostrophecms:attachmentmodule, withreqand thedocas arguments, in order to give the possibility to override the attachment.beforeSaveSafeevent from the@apostrophecms:usermodule, withreq,safeUseranduseras arguments, in order to give the possibility to override properties of thesafeUserobject which contains password hashes and other information too sensitive to be stored in the aposDocs collection.redirectFailedUpperCaseUrls: falsein@apostrophecms/page/index.jsoptions. This only comes into play if a 404 is about to happen.xx-yytoxx-YYbefore passing them toi18next, which is strict about uppercase country codes.Fixes
previousversion for undo purposes were not properly marked as such, breaking the public language switcher in some cases. This was fixed and a migration was added for existing data.minSizerequirements will not trigger an unexpected error anymore. If the image is too small, a notification will be displayed with the minimum size requirements. TheEdit Imagemodal will now display the minimum size requirements, if any, above theBrowse Imagesfield.POSTresponse for new notifications as invalid XML. It will now return an empty JSON object with theContent-Typeset toapplication/json.Apostrophe 3.x modules
@apostrophecms/login-hcaptcha1.1.0This module causes the login page to display an hCaptcha prompt, requiring the user to prove they are human before logging in.
Fixes
@apostrophecms/anchorsv1.0.0This Anchors module adds a wrapping element with an anchor linking target around all widgets. Developers may customize or opt-out individual widget types.
Adds
@apostrophecms/cache-redisv1.0.0This module enhances the core caching module,
@apostrophecms/cache, to use Redis rather than MongoDB. This module does not set up the actual Redis store, but instead allows Apostrophe to access an existing Redis store through the standard Apostrophe caching API and an internal Redis client.Adds
@apostrophecms/passport-bridgev1.0.0apostrophe-passportworks together withpassport-google-oauth20,passport-gitlab2and similar passport strategy modules to let users log in to Apostrophe CMS sites via Google, Gitlab and other identity providers. This feature is often called federation or single sign-on.Adds
@apostrophecms/security-headersv1.0.0This module sends the modern HTTP security headers that are expected by various security scanners. The default settings are strict in most regards, so see below for adjustments you may wish to make.
Adds
@apostrophecms/login-recaptchav1.0.0This login verification module adds a reCAPTCHA check when any user logs into the site. It uses reCAPTCHA v3, which means that the test is invisible aside from a reCAPTCHA logo at the bottom of the screen.
Adds
@apostrophecms/login-totpv1.0.0This login verification module adds a TOTP (Time-based One-Time Password) check when any user logs into the site, compatible with Google Authenticator or any TOTP app.
When activated, it will ask unregistered users to add a token to their app through a QR code. Once done, it will ask users to enter the code provided by their app after the initial login step.
Adds
@apostrophecms/piece-type-exporterv1.0.0This module adds an optional export feature to all piece type modules in an Apostrophe project. This feature enables exporting published pieces of piece types where it is configured. Requires Apostrophe 3.
Adds
@apostrophecms/formv1.1.0Allow ApostropheCMS editors to build their own forms. They can then place any form in one or more content areas across the website.
Adds
beforeSaveSubmission. The event receivesreq, { form, data, submission }allowing an opportunity to modifysubmissionjust before it is saved to the MongoDB collection. For most purposes thesubmissionevent is more useful.Fixes
classPrefixoption is set.Enterprise modules
@apostrophecms-pro/cypress-toolsv1.0.0-beta.4Automated functional browser tests are an important part of quality assurance for enterprise websites and web applications. Cypress is an industry-standard, open-source library for carrying out automated functional browser tests. This module provides a collection of conveniences for testing ApostropheCMS sites and applications within Cypress. Contact us or visit our new pricing page to learn more.
Adds
dangertype tofindNotificationUtilities
alpha-beta-scannerv1.0.0Scans your github organization or personal account for projects whose current
package.jsonfile declares them to be ofalphaorbetaquality. Version numbers starting with0.are also reported.Adds
First release
Beta Was this translation helpful? Give feedback.
All reactions