Skip to content

Customize content export - #101

Open
gforcada wants to merge 3 commits into
mainfrom
86-add-adapter
Open

Customize content export#101
gforcada wants to merge 3 commits into
mainfrom
86-add-adapter

Conversation

@gforcada

@gforcada gforcada commented Jul 21, 2026

Copy link
Copy Markdown
Member

Part of #86

This changes are actually a no-op for regular users of plone-exporter and plone-importer cli tools.

What this change allows is to customize on you own add-ons or policy products what should be exported when calling plone-exporter.

@mister-roboto

Copy link
Copy Markdown

@gforcada thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@gforcada

Copy link
Copy Markdown
Member Author

@jenkins-plone-org please run jobs

@gforcada gforcada mentioned this pull request Jul 30, 2026

@davisagli davisagli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here looks ok but:

  • needs a test
  • needs docs
  • what happens if there are other export steps that refer to content which was not included by this adapter?

@gforcada

Copy link
Copy Markdown
Member Author

The idea here looks ok but:

* needs a test

✅ added

* needs docs

✅ added, see plone/documentation#2101

* what happens if there are other export steps that refer to content which was not included by this adapter?

I added a warning on the docs, that as soon as you customize the export, it might be that you need to further fine tune the other exporters.

Given that this is not the default and you have to create the adapter and override it etc. I would expect that if you know how to do that, you can deal with a maybe(?) broken export, but that's what you coded, so it's up to you to deal with it.

@gforcada
gforcada requested a review from davisagli August 21, 2026 08:03
@davisagli

Copy link
Copy Markdown
Member

Given that this is not the default and you have to create the adapter and override it etc. I would expect that if you know how to do that, you can deal with a maybe(?) broken export, but that's what you coded, so it's up to you to deal with it.

@gforcada Have you tried to use this already with your own IObjectsExporter adapter override? I guess I'm okay being a little hand-wavy about this, but I'd like to make sure that it at least serves your needs before we lock in the interface.

@gforcada

Copy link
Copy Markdown
Member Author

@davisagli yes, we are using it already. Our idea is to export on a daily/weekly basis a subset of the production website, so that within a ~1Gb worth of data we have a good enough website to develop/debug locally 🌟

In our use case, we ignore comments, so there is no problem of a comment being from a non-existing object and relations that do not exist only log an error rather than fail the import process.

Same goes, though I haven't double checked, with redirects (which we might remove from the subset as well).

So yes, it works for us, and being an import/export system, not something that it runs while your editors work on the website, if it's a little brittle because you modified it, then I'm expecting that you can also be responsible of fixing/adjusting things.

That's what I tried to emphasize on the docs

@davisagli

Copy link
Copy Markdown
Member

@gforcada Ok, +1 from me then. I just wanted to avoid the situation where we release it and then discover it needs to be something different.

@gforcada

Copy link
Copy Markdown
Member Author

@jenkins-plone-org please run jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants