apostrophe
Advanced tools
Changelog
3.0.0-beta.3.1 - 2021-06-07
bullet_list
-> bulletList
-- ordered_list
-> orderedList
-- code_block
-> codeBlock
-- horizontal_rule
-> horizontalRule
Changelog
3.0.0-beta.3 - 2021-06-03
The nlbr
and nlp
Nunjucks filters marked their output as safe to preserve the tags that they added, without first escaping their input, creating a CSRF risk. These filters have been updated to escape their input unless it has already been marked safe. No code changes are required to templates whose input to the filter is intended as plaintext, however if you were intentionally leveraging this bug to output unescaped HTML markup you will need to make sure your input is free of CSRF risks and then use the | safe
filter before the | nlbr
or | nlp
filter.
ignoreUnusedFolderWarning
option for modules that intentionally might not be activated or inherited from in a particular startup.{% render fragmentName(args) %}
.Temporarily pinned to Vue 2.6.12 to fix an issue where the "New" button in the piece manager modals disappeared. We think this is a bug in the newly released Vue 2.6.13 but we are continuing to research it.
Updated dependencies on sanitize-html
and nodemailer
to new major versions, causing no bc breaks at the ApostropheCMS level. This resolved two critical vulnerabilities according to npm audit
.
Removed many unused dependencies.
The data retained for "Undo Publish" no longer causes slug conflicts in certain situations.
Custom piece types using localized: false
or autopublish: true,
as well as singleton types, now display the correct options on the "Save" dropdown.
The "Save and View," "Publish and View" and/or "Save Draft and Preview" options now appear only if an appropriate piece page actually exists for the piece type.
Duplicating a widget now properly assigns new IDs to all copied sub-widgets, sub-areas and array items as well.
Added the ignoreUnusedFolderWarning
option for modules that intentionally might not be activated or inherited from in a particular startup.
If you refresh the page while previewing or editing, you will be returned to that same state.
npm audit
vulnerability warnings relating to postcss
7.x were examined, however it was determined that these are based on the idea of a malicious SASS coder attempting to cause a denial of service. Apostrophe developers would in any case be able to contribute JavaScript as well and so are already expected to be trusted parties. This issue must be resolved upstream in packages including both stylelint
and vue-loader
which have considerable work to do before supporting postcss
8.x, and in any case public access to write SASS is not part of the attack surface of Apostrophe.When logging out on a page that only exists in draft form, or a page with access controls, you are redirected to the home page rather than seeing a 404 message.
Rich text editor upgraded to tiptap 2.x beta :tada:. On the surface not a lot has changed with the upgrade, but tiptap 2 has big improvements in terms of speed, composability, and extension support. See the technical differences of tiptap 1 and 2 here
Changelog
3.0.0-beta.2 - 2021-05-21
updateModified: false
option, formerly supported only by apos.doc.update
, has been renamed to setModified: false
and is now supported by apos.doc.insert
as well. If explicitly set to false, the insert and update methods will leave the modified
property alone, rather than trying to detect or infer whether a change has been made to the draft relative to the published version.permission
module no longer takes an interestingTypes
option. Instead, doc type managers may set their showPermissions
option to true
to always be broken out separately in the permissions explorer, or explicitly set it to false
to never be mentioned at all, even on a list of typical piece types that have the same permissions. This allows module creators to ship the right options with their modules rather than requiring the developer to hand-configure interestingTypes
.apos.adminBar.group
method, which is unlikely to be needed in 3.x. One can group admin bar items into dropdowns via the groups
option.apos.notify
message parameter. Instead, options.buttons
is available. If present, it must be an array of objects with type
and label
properties. If type
is 'event'
then that button object must have name
and data
properties, and when clicked the button will trigger an apos bus event of the given name
with the provided data
object. Currently 'event'
is the only supported value for type
.@apostrophecms/any-page-type
is now accepted for relationships that should match any page. With this change, the doc type manager module name and the type name are now identical for all types in 3.x. However, for backwards compatibility @apostrophecms/page
is still accepted. apos.doc.getManager
will accept either name.views
directory as the default fallback views directory. This is no longer a necessary configuration in projects unless they want to change it on the @apostrophecms/template
option viewsFolderFallback
.afterAposScripts
nunjucks block allows for pushing markup after Apostrophe's asset bundle script tag, at the end of the body. This is a useful way to add a script tag for Webpack's hot reload capabilities in development while still ensuring that Apostrophe's utility methods are available first, like they are in production.uploadfs
option may be passed to the @apostrophecms/asset
module, in order to pass options configuring a separate instance of uploadfs
specifically for the static assets. The @apostrophecms/uploadfs
module now exports a method to instantiate an uploadfs instance. The default behavior, in which user-uploaded attachments and static assets share a single instance of uploadfs, is unchanged. Note that asset builds never use uploadfs unless APOS_UPLOADFS_ASSETS=1
is set in the environment.AposButtonSplit
is a new UI component that combines a button with a context menu. Users can act on a primary action or change the button's function via menu button to the right of the button itself.color
schema field by passing a pickerOptions
object through your field. This allows for modifying/removing the default color palette, changing the resulting color format, and disabling various UI. For full set of options see this exampleAposModal
now emits a ready
event when it is fully painted and can be interacted with by users or code.minimumPark
from the source code. Specifically, you will not lose the root archive page if you park the home page without explicitly parking the archive page as well. This makes it easier to choose your own type for the home page, in lieu of @apostrophecms/home-page
.name
option to widget modules, which never worked in 3.x, has been officially removed. The name of the widget type is always the name of the module, with the -widget
suffix removed.#
), enabling the use of the hash for project-specific work. Thanks to [https://stepanjakl.com/](Štěpán Jákl) for reporting the issue.apos.http.addQueryToUrl
method preserves the hash of the URL intact.apos.http.parseQuery
function now handles objects and arrays properly again.styles
array with no p
tags properly. A newly added rich text widget initially contains an element with the first style, rather than always a paragraph. If no styles are configured, a p
tag is assumed. Thanks to Stepan Jakl for reporting the issue.AposSplitButton
component. Editors can choose from several follow-up actions that occur after save, including creating another piece of content of the same type, being taken to the in-context version of the document, or being returned to the manager. Editor's selection is saved in localstorage, creating a remembered preference per content type.Changelog
3.0.0-beta.1.1 - 2021-05-07
Changelog
3.0.0-beta.1 - 2021-05-06
firstName
and lastName
fields in user pieces.apos-refresh
, apos-edit
, apos-mode
and apos-locale
are now aposRefresh
, aposEdit
, aposMode
and aposLocale
. Going forward all query parameters will be camelCase for consistency with query builders.rendercall
, just like a macro call can have a body using call
. In addition, fragments can now have named arguments, just like macros. Many thanks to Miro Yovchev for contributing this implementation.nestedModuleSubdirs
option.httpsFix
option in launder's url()
method.before
syntax, allowing routes that are added to Express prior to the routes or middleware of another module. The syntax before: 'middleware:moduleName'
must be used to add the route prior to the middleware of moduleName
. If middleware:
is not used, the route is added before the routes of moduleName
. Note that normally all middleware is added before all routes.url
property can now optionally be specified when adding middleware. By default all middleware is global.?count=1
query parameter.AposButton
.username
fields to follow the user title
field to remove an extra step in user creation.outerLayoutBase.html
<title>
tag: data.piece.title or data.page.title
.NODE_ENV
is not 'production' and when:
CORE_DEV=1
._ids(_idOrArrayOfIds)
query builder replaces explicitOrder
and accepts an array of document _id
s or a single one. _id
can be used as a multivalued query parameter. Documents are returned in the order you specify, and just like with single-document REST GET requests, the locale of the _id
s is overridden by the aposMode
query parameter if present..withPublished(true)
query builder adds a _publishedDoc
property to each returned draft document that has a published equivalent. withPublished=1
can be used as a query parameter. Note this is not the way to fetch only published documents. For that, use .locale('en:published')
or similar.apos.http.post
now supports passing a FormData
object created with the [form-data](https://www.npmjs.com/package/form-data)
npm module. This keeps the API parallel with the browser-side implementation and allows for unit testing the attachments feature, as well as uploading files to internal and external APIs from the server.manuallyPublished
computed property moved to the AposPublishMixin
for the use cases where that mixin is otherwise warranted.columns
specified for a piece type's manage view can have a name that uses "dot notation" to access a subproperty. Also, for types that are localized, the column name can begin with draft:
or published:
to specifically display a property of the draft or published version of the document rather than the best available. When a prefix is not used, the property comes from the published version of the document if available, otherwise from the draft.children
query builder is now supported in query strings, including the depth
subproperty. For instance you could fetch /api/v1/@apostrophecms/page/id-of-page?children=1
or /api/v1/@apostrophecms/page/id-of-page?children[depth]=3
.APOS_LOG_ALL_QUERIES=1
now logs the projection, skip, limit and sort in addition to the criteria, which were previously logged._defaults
feature of parked pages.aposRefresh=1
when in edit mode. Also removed superfluous append
query parameter from these.EADDRINUSE
errors during nodemon restarts./
as only one page can have that slug at a time.is-active
class if, like palette, they opt in with toggle: true
@apostrophecms/migrate:after
event handler, which runs only after migrations, whether that is at startup (in dev) or at the end of the migration task (in production).