Important fix for MongoDB replica sets: previously we used the
autoReconnectoption 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
autoReconnectis 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+srvURIs. Thanks to Matt Broadstone of MongoDB for his advice.
apostrophe-filenow has a default URL. The default
_urlproperty of an
apostrophe-filepiece is simply the URL of the file itself. This allows
apostrophe-fileto 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-pagesmodule 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 announcement.
apos.global.whileBusymethod. 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-workflowit is possible to mark only one locale as busy.
By default, the
apos.locks.lockmethod waits until the lock is available before proceeding. However there is now a
waitoption which can be set to
falseto avoid waiting at all, or to any number of milliseconds. If the method fails because of
wait, the error is the string
apos.locks.lockmethod also now accepts a
waitForSelfoption. By default, if the same process invokes
apos.locks.lockfor 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.
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
requiredat a later time, and/or data was originally created with an earlier release of Apostrophe that did not enforce
requiredin 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.