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

whitespaces in ids cannot be reimported #252

Open
jackahl opened this issue Feb 13, 2025 · 1 comment
Open

whitespaces in ids cannot be reimported #252

jackahl opened this issue Feb 13, 2025 · 1 comment
Labels
question Further information is requested

Comments

@jackahl
Copy link
Member

jackahl commented Feb 13, 2025

I am in a Plone 4 -> 6 migration and the source site contains a lot of objects that have blanks in there ids (no idea, if that is usually possible in Plone 4). In the export file they are encoded as %20. E.g. "@id": "https://mysite.com/my%20object".

When reimporting in 6 I run into:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module collective.exportimport.import_content, line 215, in __call__
  Module collective.exportimport.import_content, line 301, in do_import
  Module collective.exportimport.import_content, line 472, in import_new_content
  Module plone.dexterity.content, line 776, in manage_delObjects
  Module plone.folder.ordered, line 68, in _getOb
AttributeError: 'my%20object'

could it be a good idea to replace the whitespaces with "-" on export?

@jackahl jackahl added the question Further information is requested label Feb 13, 2025
@pbauer
Copy link
Member

pbauer commented Feb 13, 2025

Who creates content-ids with whitespaces? I would keep that in my global_dict_hook but you can create a PR with a fix. Keep in mind that @id and id of the parent would need to be updated as well. And maybe old links that do not use resolveuid would break...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants