collective / collective.logbook

Advanced exception logging for Plone
5 stars 2 forks source link

InvalidParameterError: Cannot find a record with name 'logbook.logbook_enabled' #11

Closed msom closed 7 years ago

msom commented 7 years ago

After upgrading to collective.logbook 0.8 from 0.6 the following error occurs when opening @@logbook-controlpanel

Site Error

An error was encountered while publishing this resource.

Sorry, a site error occurred.
Traceback (innermost last):

Module ZPublisher.Publish, line 249, in publish_module_standard
Module ZPublisher.Publish, line 177, in publish
Module plone.app.linkintegrity.monkey, line 21, in zpublisher_exception_hook_wrapper
Module Zope2.App.startup, line 212, in __call__
Module collective.logbook.monkey, line 35, in raising
Module collective.logbook.utils, line 54, in is_logbook_enabled
Module plone.api.portal, line 2, in get_registry_record
Module plone.api.validation, line 70, in wrapped
Module plone.api.portal, line 306, in get_registry_record
InvalidParameterError: Cannot find a record with name 'logbook.logbook_enabled'

Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your patience.

Is this a newly introduced parameter? Shouldn't be there an upgrade step?

ramonski commented 7 years ago

Hi @msom, did you reinstall collective.logbook?

msom commented 7 years ago

No, I upgraded an existing plone site which had collective.logbook 0.6 already installed.

ramonski commented 7 years ago

Could you please reinstall the addon via /portal_quickinstaller/manage_installProductsForm and see if the error still appears?

msom commented 7 years ago

The error disappears after reinstalling the addon.

ramonski commented 7 years ago

Cool, I'll close then this issue:) Thanks

msom commented 7 years ago

No, this does not fix the issue. There are a lot of older Plone sites with a previous version of the logbook which won't run when they update to the current version.

There should be an upgrade step which adds the missing definitions (I guess its the stuff in registry.xml) (this package contains already older upgrade steps, see configure.xml). This allows to simply upgrade the existing packages (e.g. using collective.upgrade).