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

WorkflowException when validating content types with no workflow associated #142

Closed
hvelarde opened this issue Sep 26, 2017 · 0 comments · Fixed by #143
Closed

WorkflowException when validating content types with no workflow associated #142

hvelarde opened this issue Sep 26, 2017 · 0 comments · Fixed by #143
Assignees
Labels

Comments

@hvelarde
Copy link
Member

Images and files have no workflow associated, this leads to the following exception on editing:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module plone.dexterity.browser.edit, line 64, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 145, in update
  Module plone.app.z3cform.csrf, line 21, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.edit, line 33, in handleApply
  Module zope.event, line 31, in notify
  Module zope.component.event, line 24, in dispatch
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module zope.component.event, line 32, in objectEventNotify
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module sc.social.like.subscribers, line 148, in check_sharing_best_practices_on_editing
  Module plone.api.content, line 2, in get_state
  Module plone.api.validation, line 77, in wrapped
  Module plone.api.content, line 349, in get_state
  Module Products.CMFCore.WorkflowTool, line 263, in getInfoFor
WorkflowException: No workflow provides '${name}' information.

there's no workaround as the code that checks if the validator must be run is after the line that causes this error: https://github.com/collective/sc.social.like/blob/master/sc/social/like/subscribers.py#L120-L123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant