plone / plone.app.multilingual

Plone Multilingual Content Add-on
https://pypi.org/project/plone.app.multilingual
19 stars 47 forks source link

fix deleting items with broken relation in languageindependent field #390

Closed pbauer closed 3 years ago

pbauer commented 3 years ago

Fixes this traceback:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 376, in publish_module
  Module ZPublisher.WSGIPublisher, line 271, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module Products.PDBDebugMode.wsgi_runcall, line 60, in pdb_runcall
  Module z3c.form.form, line 233, in __call__
  Module z3c.form.form, line 228, 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.app.content.browser.actions, line 78, in handle_delete
  Module plone.dexterity.content, line 798, in manage_delObjects
  Module OFS.ObjectManager, line 558, in manage_delObjects
  Module Products.BTreeFolder2.BTreeFolder2, line 485, in _delObject
  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 619, 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 619, in subscribers
  Module five.intid.intid, line 127, in removeIntIdSubscriber
  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 619, in subscribers
  Module z3c.relationfield.event, line 113, in breakRelations
  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 619, 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 619, in subscribers
  Module plone.app.multilingual.dx.subscriber, line 49, in __call__
  Module plone.app.multilingual.dx.subscriber, line 87, in handle_modified
  Module plone.app.multilingual.dx.cloner, line 85, in copy_fields
  Module plone.app.multilingual.dx.cloner, line 58, in copy_relation
TypeError: ('Could not adapt', None, <InterfaceClass plone.app.multilingual.interfaces.ITranslationManager>)
mister-roboto commented 3 years ago

@pbauer thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

pbauer commented 3 years ago

@jenkins-plone-org please run jobs