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

Fix error in site syndication settings when upgrading. #318

Merged
merged 2 commits into from Sep 19, 2023

Conversation

mauritsvanrees
Copy link
Sponsor Member

Fixes #315

@mister-roboto
Copy link

@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

Copy link
Member

@petschki petschki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and works.

I ran `black` as well.  The real change is on this line:

    items = list(record.value) if record.value else ()

Traceback:

```
Traceback (most recent call last):
  File "/Users/maurits/shared-eggs/cp310/Products.CMFPlone-6.0.7rc1-py3.10.egg/Products/CMFPlone/MigrationTool.py", line 289, in upgrade
    step["step"].doStep(setup)
  File "/Users/maurits/shared-eggs/cp310/Products.GenericSetup-3.0.1-py3.10.egg/Products/GenericSetup/upgrade.py", line 193, in doStep
    self.handler(tool)
  File "/Users/maurits/shared-eggs/cp310/plone.app.upgrade-3.0.7-py3.10.egg/plone/app/upgrade/v60/final.py", line 183, in fix_syndication_settings
    items = list(record.value)
TypeError: 'NoneType' object is not iterable
```
@mauritsvanrees
Copy link
Sponsor Member Author

I ran into a traceback, both with and without this PR:

Traceback (most recent call last):
  File "/Users/maurits/shared-eggs/cp310/Products.CMFPlone-6.0.7rc1-py3.10.egg/Products/CMFPlone/MigrationTool.py", line 289, in upgrade
    step["step"].doStep(setup)
  File "/Users/maurits/shared-eggs/cp310/Products.GenericSetup-3.0.1-py3.10.egg/Products/GenericSetup/upgrade.py", line 193, in doStep
    self.handler(tool)
  File "/Users/maurits/shared-eggs/cp310/plone.app.upgrade-3.0.7-py3.10.egg/plone/app/upgrade/v60/final.py", line 183, in fix_syndication_settings
    items = list(record.value)
TypeError: 'NoneType' object is not iterable

Fixed in latest commit.

@mauritsvanrees mauritsvanrees merged commit bbdc8d7 into master Sep 19, 2023
5 checks passed
@mauritsvanrees mauritsvanrees deleted the maurits-syndication branch September 19, 2023 15:28
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

Successfully merging this pull request may close these issues.

problem with plone.base.interfaces.syndication.ISiteSyndicationSettings when upgrading from 5.x to 6
3 participants