All Versions
244
Latest Version
Avg Release Cycle
17 days
Latest Release
8 days ago

Changelog History
Page 12

  • v2.65.0 Changes

    September 04, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Important fix for MongoDB replica sets: previously we used the autoReconnect option of the MongoDB driver by default. From now on, we use it only if the MongoDB URI does not refer to a replica set. The use of autoReconnect is inappropriate with a replica set because it will keep trying to connect to the node that went down. Leaving this option out results in automatic use of nodes that are up. Also see the apostrophe-db-mongo-3-driver module for a way to use the newer mongodb+srv URIs. Thanks to Matt Broadstone of MongoDB for his advice.

    • πŸ”§ An apostrophe-file now has a default URL. The default _url property of an apostrophe-file piece is simply the URL of the file itself. This allows apostrophe-file to be included in your configuration for apostrophe-permalinks; picking a PDF in this way generates a direct link to the PDF, which is what the user expects. Note that if the developer elects to set up an apostrophe-files-pages module that extends apostrophe-pieces-pages, that will still take precedence, so there is no bc break.

    • πŸ›  Clicking directly from one rich text widget into another did not work properly; the toolbar did not appear in this situation. This bug has been fixed. The bug only occurred when clicking in a second rich text widget without any intervening clicks outside of all rich text widgets.

    • πŸ‘€ Also see expanded notes on version 2.64.1, below, which contained several features missed in the original changelog.

  • v2.64.1 Changes

    August 31, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ‘Œ Improved Apostrophe's ability to redisplay the appropriate widget, array element, and field and call the user's attention to it when a schema field error is not detected until server-side validation takes place. This addresses problems that come up when fields become required at a later time, and/or data was originally created with an earlier release of Apostrophe that did not enforce required in all situations. Browser-side validation is still preferred for ease of use but server-side validation no longer creates situations the user cannot easily resolve.

    • Introduced the apos.global.whileBusy method. This method accepts a function to be run while no one is permitted to access the site. The provided function may return a promise, and that promise resolves before the site becomes accessible again. In the presence of apostrophe-workflow it is possible to mark only one locale as busy.

    • πŸ”’ By default, the apos.locks.lock method waits until the lock is available before proceeding. However there is now a wait option which can be set to false to avoid waiting at all, or to any number of milliseconds. If the method fails because of wait, the error is the string locked.

    • πŸ”’ The apos.locks.lock method also now accepts a waitForSelf option. By default, if the same process invokes apos.locks.lock for the same lock in two requests simultaneously, one of the two will receive an error. With waitForSelf, the second invocation will wait for the first to resolve and then obtain the lock.

  • v2.64.0 Changes

    August 29, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Apostrophe's "search suggestions" feature for notFound.html templates is now fully baked. It only takes two steps:
    1. Include an element like this in your notFound.html template:
    <div data-apos-notfound-search-results></div>
    
    1. Set the suggestions option to true for the apostrophe-search module.

    πŸ“š With suggestions: true, this feature no longer requires that you have a /search page, it uses a dedicated route. See the documentation of the apostrophe-search module for more information.

    • The showFields option is now available for checkboxes. The syntax is as follows:
    {
      "name": "awesomeBoolean",
      "label": "Awesome Boolean",
      "type": "boolean",
      "choices": [
        {
          "value": true,
          "showFields": ["otherField1"]
        },
        {
          "value": false,
          "showFields": ["otherField2"]
        }
      ]
    }
    

    Thanks to falkodev.

    • A useful error message appears if you try to use a mongodb+srv URL. These are meant for newer versions of the MongoDB driver. You can use them, but you must install the apostrophe-db-mongo-3-driver module first. The error message now explains this, addressing a common question on stackoverflow.
    • πŸ’… Basic styles added for the most common rich text markup tags when within the bounds of an Apostrophe modal. Thanks to Lars Houmark.
    • πŸ›  Fixed UI overlap issue when joining with apostrophe-page.
    • apos.images.all, apos.images.first, etc. now include _description, _credit and _creditUrl when they can be inferred from an apostrophe-image containing the attachment.
    • apos.images.srcset helper improved. It is now smart enough to limit the image sizes it offers based on what it knows about the size of the original. Thanks to Fredrik Ekelund.
    • πŸ›  Fixes to CSS asset URL generation to pass validation.
    • 🐎 Performance: eliminated use of $or MongoDB queries with regard to pages in the trash. MongoDB tests demonstrate that $ne: true is faster than $or for our purposes.
  • v2.63.0 Changes

    August 15, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • β€œPromise events” have arrived. This is a major feature. Promise events will completely replace callAll in Apostrophe 3.x. For 2.x, all existing invocations of callAll in the core Apostrophe module now also emit a promise event. For instance, when the docBeforeInsert callAll method is invoked, Apostrophe also emits the beforeInsert promise event on the πŸ“„ apostrophe-docs` module.

    Other modules may listen for this event by writing code like this:

    `self.on('apostrophe-docs:beforeInsert', 'chooseASpecialist', function(req, doc, options) {
      // Modify `doc` here. You may return a promise, and it will resolve before
      // any more handlers run. Then the doc is inserted
    });
    

    The above code adds a new chooseASpecialist method to your module. This way, the method can be overridden by assigning a new function to self.chooseASpecialist in a module that extends it, or its behavior can be extended in the usual way following the super pattern.

    But, since it does not have the same name as the event (attempting to register a method of the same name will throw an error), it is unlikely that parent class modules and subclass modules will have unintentional conflicts.

    πŸ‘€ See the original github issue for a more complete description of the feature and the reasoning behind it.

    Your existing callAll methods will still work. But, we recommend you start migrating to be 🚚 ready to move to 3.x in the future... and because returning promises is just a heck of a lot nicer. You will have fewer problems.

    • πŸ‘ Optional SVG support for apostrophe-attachments. To enable it, set the svgImages option to πŸ”§ true when configuring the apostrophe-attachments module. SVG files can be uploaded just like other image types. Manual cropping is not available. However, since most SVG files play very well with backgrounds, the SVG file is displayed in its entirety without distortion at the largest size that fits within the aspect ratio of the widget in question, if any (background-size: contain is used). If you have overridden widget.html for apostrophe-images-widgets, you will want βœ… to refer to the latest version of widgetBase.html for the technique we used here to ensure SVG files do not break the slideshow’s overall height.
    • πŸ†• New apos.templates.prepend and apos.templates.append methods. Call apos.templates.prepend('head', function(req) { ... }) to register a function to be called just after the head tag is opened each time a page is rendered. The output of your function is inserted into the markup. The standard named locations are head, body, contextMenu and main. This is πŸ‘€ convenient when writing modules that add new features to Apostrophe. For project level work also see the named Nunjucks blocks already provided in outerLayoutBase.html.
    • apos.singleton now accepts an areaOptions option, which can receive any option that can be passed to apos.area. Thanks to Manoj Krishnan.
    • πŸ”Œ Apostrophe’s β€œprojector” jQuery plugin now respects the outerHeight of the tallest slideshow item, not just the inner height.
    • apos.area now accepts an addLabel option for each widget type in the area. Thanks to Fredrik Ekelund.
    • πŸ’» UI improvements to versioning. Thanks to Lars Houmark.
    • βͺ Button to revert to the current version has been replaced with a label indicating it is current, βͺ since reverting to the current version has no effect.
    • β€œPage settings” can now be accessed for any page in the trash via β€œreorganize.” When working with apostrophe-workflow, this is often required to commit the fact that a page is in the trash.
    • The uploadfs module now has a prefix option. If present, the prefix is prepended to all uploadfs paths before they reach the storage layer, and is also prepended to URLs. In practice, this means that a single S3 bucket can be used to host multiple sites without all of the uploaded media jumbling together in /attachments. The apostrophe-multisite module now leverages this.
  • v2.62.0 Changes

    August 09, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Introduced a findWithProjection() method that is added to all MongoDB collection objects. All Apostrophe core modules are migrating towards using this method rather than find() when working directly with MongoDB collections. If you are using the standard MongoDB 2.x driver that is included with Apostrophe, this just calls regular find(). When using the forthcoming apostrophe-db-mongo-3-driver module to replace that with a newer driver that supports the full features of MongoDB 3.6, 4.0 and beyond, this method will provide backwards compatibility by accepting a projection as the second argument like find() did until the 3.x driver was released. Developers wishing to be compatible with both drivers will want to start using this method. Again, this only concerns you if you are querying MongoDB directly and passing a projection to find() as the second argument. And if you don't care about using the 3.x driver, you do not have to change anything.
    • πŸ›  Various UX improvements and bug fixes to the page versions dialog box. Thanks to Lars Houmark.
    • ⚑️ The widget wrapper is updated on the fly with new classes if they change due to edits. Thanks to Fredrik Ekelund.
    • πŸ”§ When configuring a date field, you may pass a pikadayOptions property. This object is passed on to the pikaday library. Thanks to Lars Houmark.
    • The counts: true option for piecesFilters now works properly with joins.
  • v2.61.0 Changes

    August 01, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ†• New "secrets" feature in apostrophe-users makes it easy to hash other "secrets" similar in spirit to passwords.
    • This feature is now used for password reset tokens, making them more secure.
    • βž• Additional joins can now be added to the schema of a widget that extends apostrophe-pieces-widgets.
    • Brute force password attacks against an Apostrophe server are now more difficult. Thanks to Lars Houmark.
    • Tolerant sanitization of array items while they are still in the editor. This avoids confusion caused by required fields in the array editor.
    • Error messages now behave sensibly when multiple label elements appear in a field. Thanks to Lars Houmark.
    • πŸ›  Fix background color on notification on uploads when file extension is not accepted. Thanks to Lars Houmark.
    • 🚚 If you can't move a widget out of an area, you can no longer move widgets into that area either (movable: false is fully enforced). Thanks to Fredrik Ekelund.
    • πŸ†• New browser-side events are emitted during the attachment upload process, and the built-in facility that delays the saving of a form until attachment uploads are complete has been fixed. Thanks to Lars Houmark.
    • πŸ›  Fixes to the active state display of array items. Thanks to Lars Houmark.
    • Contributor Guide expanded with lots of new information about practical ways to contribute to Apostrophe.
    • Contributor Covenant Code of Conduct added to the project. The Apostrophe community is a welcoming place, and now is a great time to lock that in for the future.
  • v2.60.4 Changes

    July 13, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ‘― Shallowly clone the required definition in defineRelatedType to prevent yet more crosstalk between instances of apos when apostrophe-multisite is used. No other changes.
  • v2.60.3 Changes

    July 13, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ‘Œ Improved support for nested areas and widgets. Apostrophe now pushes the correct doc id and dot path all the way to the page in various situations where this could previously have led to errors at save time.
    • πŸ”’ The new apos.locks.withLock(lockName, fn) method can be used to execute a function while the process has the named lock. This ensures that other processes cannot run that function simultaneously. You may optionally pass a callback, otherwise a promise is returned. Similarly fn may take a callback, or no arguments at all, in which case it is expected to return a promise.
    • Cleanup: don't call server.close unless we've succeeded in listening for connections.
  • v2.60.2 Changes

    July 12, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ”– Version 2.60.1 broke validation of schema fields which were required, but blank because they were hidden by showFields. This is of course permitted, required applies only if the field is active according to showFields or not addressed by any βœ… showFields possibilities at all. Comprehensive unit testing was βž• added for this issue to prevent a recurrence.
    • πŸ”– Version 2.60.1 also introduced a more subtle issue: if constraints like required or min, or general improvements to validation such as NaN detection for integers and floats, were added to a widget schema later after content already existed then it became impossible to open a widget editor and correct the issues. Validation tolerance was added for this situation.
    • When a user edits an area "in context" on the page, the server now reports errors using a path that can be used to identify the widget responsible and open its editing dialog box. A more relevant notification is also displayed. This remains a secondary mechanism. Server-side πŸ’» validation is mostly about preventing intentional abuse. Browser-side validation is still the best way to provide feedback during data entry.
  • v2.60.1 Changes

    July 11, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Fields of type checkboxes now play nicely with the live/draft toggle of apostrophe-workflow.
    • πŸ‘Œ Improved validation of integers and floats. Thanks to Lars Houmark.
    • The "Global" dialog box now follows the same pattern as that for other piece types, which means that the workflow dropdown menu is available if workflow is present.
    • Options may be passed to the express.static middleware that serves the public folder, via the static option of the apostrophe-express module. Thanks to Leonhard Melzer.
    • apostrophe now depends on bluebird properly and there are no lingering references to the wrong version fo lodash. Formerly we got away with this because some of our dependencies did depend on these, and npm flattens dependencies. Thanks to Leonhard Melzer.
    • πŸ‘• The new eslint-config-punkave ruleset is in place, and includes a check for "unofficial dependencies" in require calls that could go away suddenly.
    • fieldClasses and fieldAttributes may be set on form fields themselves, similar to the existing classes and attributes properties that are applied to the fieldset. Thanks to Lars Houmark.
    • πŸ’» The "Pages" admin UI now includes a "New Page" button, in addition to the usual "reorganize" functionality. Thanks to Lars Houmark.
    • πŸ›  Fixed a crash when an apostrophe-pieces-widget is configured to always show all pieces via by: 'all'. Thanks to AurΓ©lien Wolz.
    • πŸ’» General UI styling improvements and fixes.