collective / collective.z3cform.datagridfield

Datagrid Field for z3c.forms
https://pypi.org/project/collective.z3cform.datagridfield/
8 stars 28 forks source link

Error while installing on the Plone #193

Closed cihanandac closed 2 days ago

cihanandac commented 2 months ago

I was trying to include this package to a Plone project but it was giving the following error when I click "install" button on the " Add-ons" page (/prefs_install_products_form). On the Plone community forum, @yurj and @petschki suggested the solution and it worked.

Error:

2024-08-27 16:43:54,961 INFO    [Products.GenericSetup.tool:1421][waitress-0] Importing profile profile-collective.z3cform.datagridfield:default with dependency strategy upgrade.
2024-08-27 16:43:54,962 INFO    [Products.GenericSetup.tool:1462][waitress-0] Applying main profile profile-collective.z3cform.datagridfield:default
2024-08-27 16:43:55,022 INFO    [GenericSetup.browserlayer:98][waitress-0] Browser layers imported
2024-08-27 16:43:55,147 ERROR   [Zope.SiteErrorLog:238][waitress-0] 1724769835.14652590.08387969514362037 http://localhost:8080/Plone/install_products
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module Products.CMFPlone.controlpanel.browser.quickinstaller, line 544, in __call__
  Module Products.CMFPlone.controlpanel.browser.quickinstaller, line 310, in install_product
  Module Products.GenericSetup.tool, line 393, in runAllImportStepsFromProfile
   - __traceback_info__: profile-collective.z3cform.datagridfield:default
  Module Products.GenericSetup.tool, line 1504, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1316, in _doRunImportStep
   - __traceback_info__: plone.app.registry
  Module plone.app.registry.exportimport.handler, line 79, in importRegistry
   - __traceback_info__: registry.xml
  Module plone.app.registry.exportimport.handler, line 125, in importDocument
  Module plone.app.registry.exportimport.handler, line 393, in importRecords
   - __traceback_info__: records name: Products.CMFPlone.interfaces.IBundleRegistry
AttributeError: 'dict' object has no attribute '__identifier__'

Solution from the forum: "change the deprecated Products.CMFPlone.interfaces.IBundleRegistry into plone.base.interfaces.resources.IBundleRegistry in profiles/default/registry.xml"

petschki commented 2 months ago

As @yurj pointed out, it could be something else which caused this traceback. Never the less changeing the interface to the non deprecated source is always good. I will approve the PR.