plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

Term lookup error: 't' ....logging too poor

Open zopyx opened this issue 2 years ago • 3 comments

The logging message

plone.restapi.serializer.dxfields Term lookup error: 't'

is too poor.

It should contain additional information about (self.context.absolute_url(1) and self.field.title`) and in order to make this logging message meaningful and helpful.

zopyx avatar Apr 14 '22 04:04 zopyx

@zopyx please provide steps to reproduce and the request that you send. With the current bug report it is impossible to take any action.

tisto avatar Apr 14 '22 05:04 tisto

Sorry, there is some context missing.

These kinds of errors occur frequently during export migrations with collective.exportimport (which uses plone.restapi under the hood). The error usually occurs when you export the value of a field with a vocabulary when the value is no longer part of the vocabulary. For finding the related content, having information about the context and the field is helpful.

I patched the latest release for Plone 2.7 for displaying a better log message like

2022-04-14 07:27:01 WARNING plone.restapi.serializer.dxfields Term lookup error: None label_test_report_supported_os (eteaching.policy.testreport:eteaching/technik/produkte/impresssteckbrief)

zopyx avatar Apr 14 '22 05:04 zopyx

@zopyx could you please create a PR with your patch so that we can merge this upstream?

tisto avatar Apr 14 '22 06:04 tisto