- Adds a checkbox to the import modal that, when selected, imports published versions of documents from an export file as drafts. If a document doesn’t have a published version, it will still be imported. Setting the
importDraftsOnlyDefault: true
option selects this checkbox by default.
- Adds AI-generated missing translations.
- Fixes SASS warnings.
- Fixes a bug where related documents were not exported if they were only in one (draft or published) mode.
- Fixes a bug where additional crops of an image were not imported properly when the image was already present on the receiving site.
- Clean up timers on instance destroy.
- Update devDependencies.
- Singletons can now be imported through
contextOperations
since they have no manager modal and thus noutilityOperation
available. - Pages can be exported via an Export batch operation.
- Exported related documents now contain the entire document and not only the projected fields.
- The
related
route also returns the related types of the exported documents related documents. - Greatly improved performance when imports involve attachments that already exist on the target site.
- Cropped images are imported properly.
- Page tree relationships are maintained.
- In general: many fixes to bring this module up to speed for use cases that involve selecting multiple documents.
- Add a scrollbar to the duplicate import modal to handle too many duplicates, and fixed the "Type" column to display the correct document type. Thanks to (Borel Kuomo)(https://github.com/borelkoumo) for this contribution.
- Adds a method
checkDuplicates
to pre check for duplicates before importing, allows to insert attachments before documents to avoid them being stripped. - Uses the new method
simulateRelationshipsFromStorage
from core to simulate relationships on data from DB to be able to pass the convert, also uses the new optionfetchRelationships: false
on the convert to avoid fetching relationships from the DB. It prevents issues when a relationship has not been inserted yet. - Requires a duplicate confirmation for existing singleton documents (including parked pages), keeping their original ID's while importing (if the user chooses to do so).
- Adds a
preventUpdateAssets
to the module that will not try to update already existing assets on import.
- Fix export relationship when an area has grouped widgets. Thanks to Michelin for contributing this fix.
- Add the possibility to set a key column in your import CSV file in order to update existing pieces and pages.
Thanks to this, this module reaches parity with the deprecated@apostrophecms/piece-type-importer
module.
- We can now import pieces or pages with an import file that contains just the required fields.
- Corrects documentation of required permissions.
- Add CSV format.
- This is a new major version, 2.0.0. To update to this version you must edit your
package.json
file and change the dependency to^2.0.0
or similar. - The signature of the
output
function from the gzip format has changed. It no longer takes theapos
instance and now requires aprocessAttachments
callback. import
andoverrideDuplicates
functions now requireformatLabel
to be passed inreq
.
- Documentation updates.
- Fixes imported data with the wrong mode because
req.mode
was alwayspublished
, even for draft documents.
- Compatible with both Apostrophe 3.x and Apostrophe 4.x (both Vue 2 and Vue 3).
- Bug fix. When a piece or a page is created, published, then unpublished, and subsequently exported and re-imported, the manager modal incorrectly showed no published version. This occurs because the
lastPublishedAt
property of the draft document was set to null upon import, misleading the representation of the document's published state. Now it retains the original document'slastPublishedAt
value.
- Requires the create and edit permissions to use the import utility operation
- Fixed a security issue that allowed a correctly crafted
HTTP request to delete arbitrary files and folders, subject to the permissions with which the Node.js
process was run. No user account was required to exploit this issue. All users of this module should immediately run
npm update @apostrophecms/import-export
and deploy the latest version of this module. The module has been carefully audited for similar issues and best practices have been put in place to prevent any similar issue in future.
- Prefix routes and events to avoid conflicts with the old
@apostrophecms/piece-type-importer
and@apostrophecms/piece-type-exporter
modules.
- Import now detects if the locale found in the exported docs is different from the current site one.
If the site has only one locale configured, then the docs are automatically re-written with the site locale.
If the site has multiple locales configured, the user is given the possibility to abort the import or re-write the docs with the site locale.
Please note that this change is dependent on core changes found in 3.60.0.
- Hide "Duplicates Detected." notification.
- Display more information about duplicated documents.
- Export file name more meaningful, containing project name, module name and current date and time.
- Fix progress bar going over
100%
when importing docs that are archived after being exported. - Adds missing dependency.
- Use
uploadfs.copyOut
to ensure success in more attachment export situations, such as debugging a multisite Assembly project on a local machine where Chrome considers subdomains oflocalhost
to be your machine but Node.js does not. - Minor refactoring for maintainability and performance.
- Error and warning notifications stay in place until dismissed.
Move documentation images to our own hosting.
Initial release.