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

Migration to_registry fails if coming from collective.ckeditor < 4.10.0 #86

Open
gbastien opened this issue Mar 31, 2023 · 2 comments
Open
Assignees

Comments

@gbastien
Copy link
Member

gbastien commented Mar 31, 2023

Hi @gotcha

Property "disallowedContent" does not exist and locally, to properties "bodyClass" and "width" were set to None instead an empty string.

Suggested changes:

    # if coming from collective.ckeditor < 4.10.0, disallowedContent does not exist
    if hasattr(props, "disallowedContent"):
        api.portal.set_registry_record(
            "collective.ckeditor.browser.ckeditorsettings.ICKEditorSchema.disallowedContent",
            safe_unicode(props.disallowedContent)
        )
    # do not fail if bodyClass is None
    api.portal.set_registry_record(
        "collective.ckeditor.browser.ckeditorsettings.ICKEditorSchema.bodyClass",
        props.bodyClass or ''
    )
    # do not fail if width is None
    api.portal.set_registry_record(
        "collective.ckeditor.browser.ckeditorsettings.ICKEditorSchema.width",
        props.width or ''
    )

Thank you,
Gauthier

@gotcha
Copy link
Member

gotcha commented Mar 31, 2023

The failure to migrate disallowedContent is due to bad setup of the property to registry upgrade step.
It should be from 4350 instead of from *.

@gotcha
Copy link
Member

gotcha commented Mar 31, 2023

What do you mean by "locally, some properties were set to None" ?

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

2 participants