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

Various fixes #35

Merged
merged 10 commits into from
Sep 12, 2024
Merged

Various fixes #35

merged 10 commits into from
Sep 12, 2024

Commits on Sep 11, 2024

  1. Fix error when importings translations.json and plone.app.multilingua…

    …l is not installed.
    
    The distribution may have a `translations.json` with only an empty string.  That should not break like this:
    
    ```
    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 plone.rest.service, line 21, in __call__
      Module plone.restapi.services, line 19, in render
      Module plone.distribution.services.sites.add, line 49, in reply
      Module plone.distribution.api.site, line 165, in create
      Module plone.distribution.api.site, line 104, in _create_site
      Module plone.distribution.handler, line 44, in default_handler
      Module plone.exportimport.importers, line 57, in import_site
      Module plone.exportimport.importers.base, line 70, in import_data
      Module plone.exportimport.importers.translations, line 17, in do_import
    TypeError: object of type 'NoneType' has no len()
    ```
    mauritsvanrees committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    ea13576 View commit details
    Browse the repository at this point in the history
  2. Register translations and discussions importers and exporters conditi…

    …onally.
    
    Only register them when `plone.app.multilingual` and `plone.app.discussion` are installed.
    Prevent error when an exporter does not actually export any paths, but returns None, like before I made these two conditional:
    
    ```
    $ bin/export-distribution parts/zeoclient-classic/etc/zope.conf Plone
    Exporting Plone site at /Plone
     Target path: /Users/maurits/community/plone-coredev/6.1/src/plone.classicui/src/plone/classicui/distributions/classic/content
    Traceback (most recent call last):
      File "/Users/maurits/community/plone-coredev/6.1/bin/export-distribution", line 250, in <module>
        sys.exit(plone.distribution.cli.export())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/maurits/community/plone-coredev/6.1/src/plone.distribution/src/plone/distribution/cli/__init__.py", line 44, in export
        results = get_exporter(site).export_site(path)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/maurits/community/plone-coredev/6.1/src/plone.exportimport/src/plone/exportimport/exporters/__init__.py", line 72, in export_site
        paths.extend(exporter.export_data(path))
    TypeError: 'NoneType' object is not iterable
    ```
    mauritsvanrees committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    93da922 View commit details
    Browse the repository at this point in the history
  3. Fix the allow_discussion key.

    Set it to neutral None, unless it is explicitly set.
    mauritsvanrees committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    acb72cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8916588 View commit details
    Browse the repository at this point in the history
  5. Export: add newline at end of all files.

    `json.dump` does not add this, so we explicitly do it.
    Otherwise when you manually edit a file and you use an editor that respects the standard `.editorconfig` that we have in most Plone packages, you always get a diff because there is a newline at the end.
    mauritsvanrees committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    9d5996c View commit details
    Browse the repository at this point in the history
  6. Fix portlet export tests.

    We now have some data with a blacklist_status, and this gave an error.
    mauritsvanrees committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f804610 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Portlets: deprecate blacklist_status in favor of disallowlist_status.

    We still read the old key for backwards compatibility.
    mauritsvanrees committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    441f6c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11e2bab View commit details
    Browse the repository at this point in the history
  3. Add news snippets.

    mauritsvanrees committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    b07483c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cbeeb9b View commit details
    Browse the repository at this point in the history