All Versions
309
Latest Version
Avg Release Cycle
12 days
Latest Release
657 days ago

Changelog History
Page 18

  • v2.69.0 Changes

    October 03, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Promisified all of the apis for migrations, including the option of iterators that return promises, and implemented migrations for old piece and page slugs that have not been deduplicated and thus can block new pages or pieces from taking a slug even though we have logic for this for new pages and pieces.
    • πŸ‘ In-context editing support for areas and singletons that are schema fields of arrays. Leaves other, noncontextual data alone. Creating and editing entire array items contextually is outside the scope of this change; use an area rather than an array for that. Directly nested arrays are not supported, but you may use an area in an array in a widget in an array, etc.
    • .jpeg files were slipping through with that extension. All new uploads will be correctly converted to .jpg and go through the proper sizing process.
    • The enableShowFields option was missing some of its logic for fields of type checkboxes. Thanks to Anthony Tarlao.
    • A _title property is now included in attachments returned by apos.images.all and apos.images.first.
    • πŸ‘€ When apostrophe cannot fix a unique key error, it is helpful to be able to see the last error, as well as the original one. This helps you figure it out if both a unique slug error and an unrelated unique key error are part of the puzzle. We still throw the original error, but we also attach the last error as a property of it, so you can see both.
    • The apos.areas.fromPlaintext method now takes an options parameter. You may set the el property to an element name, in which case the markup is wrapped in that HTML element. options may be omitted.
  • v2.68.1 Changes

    September 27, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ›  When we introduced allowedSubpageTypes and allowedHomepageTypes in 2.67.0, we broke support for different schemas in different page types. Those regressions are fixed here.
    • 0️⃣ The default page type choice offered for a new page is the first type permitted by its parent page.
  • v2.68.0 Changes

    September 26, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • πŸ”€ The lateCriteria cursor filter now works properly, allowing special mongodb criteria that are not allowed inside $and to be merged into the criteria object at the last minute.
    • βœ… A noisy warning produced on every page send by the latest version of Bluebird has been silenced.
    • 🐎 Performance: explicitly shut off sort() for certain cases where we know only one document will be returned. This allows MongoDB to select a more efficient index more often.
    • nlbr Nunjucks filter no longer results in double-escaped markup. Thanks to Ulf Seltmann.
    • πŸ”’ The apostrophe-global module now supports the separateWhileBusyMiddleware option. Iby separate middleware that checks for the lock flag in apostrophe-global even if the regular middleware of this method has been disabled and/or overridden to cache in such a way as to make it unsuitable for this purpose. For normal use this option is not necessary.
    • πŸ›  Fixes made to further reduce conflicts between sites with apostrophe-multisite. For instance, the apostrophe-workflow module no longer breaks the dashboard.
    • The home page can now be copied. If you copy the home page, you get a new child of the home page with the same content. Thanks to Tim Otlik.
  • v2.67.0 Changes

    September 14, 2018

    βœ… Unit tests passing.

    βœ… Regression tests passing.

    • Pages can now be locked down with the allowedHomepageTypes and allowedSubpageTypes options, like this:
    // Only one type allowed for the home page
    allowedHomepageTypes: [ 'home' ],
    
    allowedSubpageTypes: {
      // Two subpage types allowed for the home page
      'home': [ 'default', 'apostrophe-blog-page' ],
      // No subpages for the blog page ("show pages" don't count)
      'apostrophe-blog-page': [],
      // default page type can only have another default page as a subpage
      'default': [ 'default' ]
    }
    

    These options make it easy to prevent users from creating unintended scenarios, like nesting pages too deeply for your navigation design.

    • βͺ Pages now support batch operations, just like pieces do. The initial set includes trash, rescue, publish, unpublish, tag and untag. You can only rescue pages in this way if you are using the trashInSchema option of the docs module, which is always the case with apostrophe-workflow. With the conventional trash can, it is unclear what should happen because you have not indicated where you want each page to be restored. New batch operations for pages can be added in the same way that they are added for pieces.

    • 🐎 Important performance fix needed for those using the apostrophe-pieces-orderings-bundle module to create custom sort orders for pieces. Without this fix it is also possible to get a loader error and stop fetching content prematurely.

    • βͺ The "revert" button for versions is now labeled "Revert to" to emphasize that it reverts to what you had at the end of that operation, not its beginning. Thanks to Fredrik Ekelund.

  • v2.66.0 Changes

    September 07, 2018
    • ⚑️ Updated to CKEditor version 4.10.0. The CKEditor build now includes the CKEditor "widgets" feature (not to be confused with Apostrophe widgets). These are essential for modules like the forthcoming apostrophe-rich-text-merge-tags.
    • πŸ“„ apos.areas.richText and apos.areas.plaintext no longer produce duplicate text. To achieve this, the apos.docs.walk method no longer walks through the _originalWidgets property. This property is only used to preserve the previous versions of widgets that the user lacks permission to edit due to schema field permissions. Exploration of this property by apos.docs.walk led to the observed bug.
    • πŸ’» The browser-side implementation of apos.utils.escapeHtml now works properly.
  • 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.