Apostrophe 2 v2.102.0 Release Notes

Release Date: 2020-01-30 // about 4 years ago
    • Apostrophe now displays "Saving... Saved" indicators near the context โœ… menu in the lower left indicator. In our UX tests, users often did not realize Apostrophe automatically saved their work and were concerned by the lack of an explicit save button. In addition, Apostrophe no longer ๐Ÿ”€ attempts to save your remaining changes via a synchronous HTTP request when you ๐Ÿ—„ close the page, because this is deprecated in all browsers and disabled in many. Instead, Apostrophe uses the standard "you have unsaved changes, are you sure you wish to leave this page?" dialog. Together with the "saving... saved" indicator, this provides a mechanism for preventing ๐Ÿ’ป lost work that is robust in modern browsers.

    This does impact Apostrophe's "advisory locking" mechanism that warns users ๐Ÿ”€ if another user is already editing. Since we cannot guarantee a synchronous request to unlock the page will ever be received, we have instead shortened the expiration time for document locks to 30 seconds. Since these are refreshed every 5 seconds there should be no negative impacts in typical use.

    ๐Ÿ‘ Thanks to Freshworks for making this improvement possible via Apostrophe Enterprise Support.

    • ๐Ÿ†• New disableInactiveAccounts option, which can be set like so: javascript 'apostrophe-users': { disableInactiveAccounts: true }

    0๏ธโƒฃ By default, users from the "admin" group are whitelisted and the inactivity period is 90 days. This can be changed:

    {
      // in your project level lib/modules/apostrophe-users/index.js file
      disableInactiveAccounts: {
        neverDisabledGroups: [ 'test', 'otherGroup' ],
        // After 30 days without logging in, the account is marked disabled
        // on next login attempt, until an admin explicitly enables it again
        inactivityDuration: 30
      }
    }
    
    • โšก๏ธ A longstanding bug relating to schemas has been fixed. Previously, if you attempted to clear a string field that had a def property, that field would be repopulated with the def value. This was never intended; def is only for the initial population of a newly created object. If you were relying on this bug, update your code to use apos.schemas.newInstance(schema) from the start so that you begin with an object that has the right defaults for each field. Note that pieces, pages, etc. already do this.

    • โž• Added a bodyAttributes block to outerLayoutBase.html. You may override this block to add new attributes to body without overriding the entire outerLayoutBase.html template. It is a best practice to not override this template, use the provided blocks.

    • Fields of type attachment with required not set to true now work properly.

    • You may now set the loginUrl option of the apostrophe-login module to change the login URL from /login to something else. Thanks to Giuseppe Monteleone for this contribution.

    • ๐Ÿ‘ help property is now supported for array fields.

    • Uploads with a capitalized file extension are now accepted where appropriate. Thanks to Fernando Figaroli for this contribution.

    • When editing a join with pages, a nonfunctional edit pencil icon is no longer displayed. Actual inline editing of page settings from another page may be a 3.0 feature.