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

AttributeError: 'TaxonomyBehavior' object has no attribute 'former_dotted_names' #23

Open
abl123 opened this issue Apr 21, 2022 · 0 comments

Comments

@abl123
Copy link

abl123 commented Apr 21, 2022

Plone = 5.2.6
plone.behavior = 1.4.0
collective.taxonomy = 2.2.1

I have a custom dexterity content type with an Image field (plone.namedfile.field.NamedBlobImage) and the versioning behavior enabled. I also installed collective.taxonomy, created a vocabulary, and added the vocabulary behavior to my content type. When I try to save the page, it throws the AttributeError.

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 266, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module Products.PDBDebugMode.wsgi_runcall, line 60, in pdb_runcall
  Module plone.z3cform.layout, line 63, in __call__
  Module plone.z3cform.layout, line 47, in update
  Module plone.dexterity.browser.edit, line 58, in update
  Module plone.z3cform.fieldsets.extensible, line 65, 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 22, 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 30, in handleApply
  Module z3c.form.group, line 124, in applyChanges
  Module zope.event, line 32, in notify
  Module zope.component.event, line 27, in dispatch
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 448, in subscribers
  Module zope.interface.adapter, line 899, in subscribers
  Module zope.component.event, line 36, in objectEventNotify
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 448, in subscribers
  Module zope.interface.adapter, line 899, in subscribers
  Module plone.app.versioningbehavior.subscribers, line 62, in create_version_on_save
  Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 332, in save
  Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 500, in _recursiveSave
  Module Products.CMFEditions.ArchivistTool, line 267, in prepare
  Module Products.CMFEditions.ModifierRegistryTool, line 135, in getReferencedAttributes
  Module plone.app.versioningbehavior.modifiers, line 119, in getReferencedAttributes
  Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 410, in retrieve
  Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 558, in _retrieve
  Module Products.CMFEditions.CopyModifyMergeRepositoryTool, line 634, in _recursiveRetrieve
  Module Products.CMFEditions.ArchivistTool, line 342, in retrieve
  Module Products.CMFEditions.ArchivistTool, line 510, in __getitem__
  Module Products.CMFEditions.ModifierRegistryTool, line 162, in reattachReferencedAttributes
  Module plone.app.versioningbehavior.modifiers, line 184, in reattachReferencedAttributes
  Module plone.behavior.registration, line 96, in lookup_behavior_registration
AttributeError: 'TaxonomyBehavior' object has no attribute 'former_dotted_names'

Perhaps lookup_behavior_registration should check if the behavior has the attribute former_dotted_names before executing:

if name in behavior.former_dotted_names:

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

1 participant