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 adding and moving fields between fieldsets. #92

Merged
merged 6 commits into from
Aug 9, 2022

Conversation

frapell
Copy link
Member

@frapell frapell commented Jul 27, 2022

fixes gh-86 and gh-65

@mister-roboto
Copy link

@frapell 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!

@frapell
Copy link
Member Author

frapell commented Jul 27, 2022

@jenkins-plone-org please run jobs

@frapell
Copy link
Member Author

frapell commented Jul 27, 2022

This needs plone/mockup#1203

@frapell
Copy link
Member Author

frapell commented Jul 28, 2022

@jenkins-plone-org please run jobs

@mauritsvanrees
Copy link
Member

Jenkins tests fail. Some probably random, but some real ones in plone.restapi as well. Sample error when I go in with a pdb:

(Pdb) pp response.json()
{'message': "'NoneType' object has no attribute 'get'",
 'traceback': ['File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/Zope/src/ZPublisher/WSGIPublisher.py", '
               'line 167, in transaction_pubevents',
               '    yield',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/Zope/src/ZPublisher/WSGIPublisher.py", '
               'line 376, in publish_module',
               '    response = _publish(request, new_mod_info)',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/Zope/src/ZPublisher/WSGIPublisher.py", '
               'line 279, in publish',
               '    bind=1)',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/Zope/src/ZPublisher/mapply.py", '
               'line 85, in mapply',
               '    return debug(object, args, context)',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/Zope/src/ZPublisher/WSGIPublisher.py", '
               'line 68, in call_object',
               '    return obj(*args)',
               '',
               '  File '
               '"/Users/maurits/shared-eggs/cp37m/plone.rest-2.0.0a5-py3.7.egg/plone/rest/service.py", '
               'line 22, in __call__',
               '    return self.render()',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/plone.restapi/src/plone/restapi/services/__init__.py", '
               'line 19, in render',
               '    content = self.reply()',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/plone.restapi/src/plone/restapi/services/types/add.py", '
               'line 55, in reply',
               '    res = add_field(context, self.request, data)',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/plone.restapi/src/plone/restapi/types/utils.py", '
               'line 457, in add_field',
               '    add.form_instance.add(field)',
               '',
               '  File '
               '"/Users/maurits/community/plone-coredev/6.0-37/src/plone.schemaeditor/plone/schemaeditor/browser/schema/add_field.py", '
               'line 74, in add',
               "    fieldset_widget = self.widgets.get('fieldset_id')"],
 'type': 'AttributeError'}

Apparently, in add_field.py self.widgets is None.

@petschki
Copy link
Member

petschki commented Aug 9, 2022

thanks @mauritsvanrees ... I've added a check for self.widgets and my local tests are now green again. Let's see what Jenkins says.

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

This in combination with the plone.staticresource PR works for me when I try it locally. Thanks!

Jenkins 3.8 is green. I have restarted 3.7 and 3.9 again. We should probably merge anyway. Afterwards see if we can somehow make these robot tests more stable.

@mauritsvanrees
Copy link
Member

3.7 has failed, but both 3.8 and 3.9 are green. I merge

@mauritsvanrees mauritsvanrees merged commit 28b92cf into master Aug 9, 2022
@mauritsvanrees mauritsvanrees deleted the frapell-schemaeditor branch August 9, 2022 15:18
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.

moving field to other fieldset is broken
4 participants