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

Export creator information #38

Open
tlotze opened this issue Aug 19, 2021 · 5 comments
Open

Export creator information #38

tlotze opened this issue Aug 19, 2021 · 5 comments

Comments

@tlotze
Copy link
Member

tlotze commented Aug 19, 2021

Currently, content is exported without creator information. There are cases, however, when that information is needed and it is not sufficient to have imported objects created by the importing user. Maybe it would be useful to export creator information optionally, but if so, I'm not sure about whether it should be done by default.

@fredvd
Copy link
Member

fredvd commented Aug 29, 2021

I just checked one of my previous migrations because I can't remember having issues with the Creator field. In my migration so far with collective.exportimport the creator has been copied. Maybe this is done with the local roles import where the 'Owner' local role is applied to the new content?

@pbauer
Copy link
Member

pbauer commented Sep 1, 2021

I also checked and the creator-data is exported fine (AT and DX) . The probem you encounter is probably that there is a empty string in the list of creators.

To fix that simply use

item["creators"] = [i for i in item.get("creators", []) if i]

in your global_dict_hook.

@mauritsvanrees
Copy link
Member

I have the same problem. Creators is something like ['Joe', '', 'Jane'] it fails. Philip's suggestion helps.

This would be useful to add in the package. Where would we do this? Maybe do this cleanup during export, when "Modify exported data for migrations" is checked?

@Rudd-O
Copy link
Contributor

Rudd-O commented Dec 9, 2021

Yeah I think the package should just do this. An empty string for Creator is outright bad data.

@holdenhao
Copy link

holdenhao commented Jul 20, 2022

Currently, content is exported without creator information.

I have experienced this as well but only for DX content that does not implement plone.ownership behavior and does not have a creators field defined in its schema. I am using c.exportimport 1.4 on Plone 5.2.7.

If you add a creators entry in your json file, it will also not be imported without the behavior or field schema.

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

6 participants