Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create a new distribution export from existing content, chicken and egg #91

Open
fredvd opened this issue Jun 26, 2024 · 3 comments

Comments

@fredvd
Copy link
Member

fredvd commented Jun 26, 2024

I have a project where I want to add my local configuration as demo/default content for the distribution. I just found out this is not possible (yet). in

distribution = get_current_distribution(site)

the distribution with which the site was created is being requested. But this is in my use case not known since I'm starting a new distribution. So I should first manually recreate my site example content. Meh.

I assume it is possible to add an extra parameter to the export-distribution command line tool where you can specify the distribution. I'll see if I have time to contribute a PR.

@fredvd
Copy link
Member Author

fredvd commented Jun 27, 2024

I've checked the cli and exporting code a bit more. An annotation is stored on the site root of any Plone site that has been created 'from' a distribution and that annotation is restored to a Distribution object and required as soon as en export is needed. I'm not sure what exactly is needed from the Distribution object.

@petschki
Copy link
Member

I also wanted to export some example content from a "default" Classic-UI Plone Site into my (not yet installed) customer distribution. As a solution, I would add a --path parameter to the export script to define the output path manually in cli instead of automatically get it from an installed distribution.

@davisagli
Copy link
Member

@petschki The plone.distribution export is based on plone.exportimport. If you want to export content to a path instead of in the context of an installed distribution, there is an export script provided by plone.exportimport: https://github.com/plone/plone.exportimport/blob/main/setup.py#L93

(This issue is still valid, I'm just pointing to a workaround)

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

No branches or pull requests

3 participants