plone/plone.outputfilters — comment on commit 878eef9b0acc1dcdd68057ae51eb94964e1fbdbf
File:  line 0
By davisagli:

Some objects may have a UID but not be in the reference_catalog (such as Dexterity items). So I would recommend instead doing this:

catalog = getToolByName(getSite(), 'portal_catalog')
res = catalog.unrestrictedSearchResults(UID=uuid)
if res:
return res[0]._unrestrictedGetObject()

I also don't like changing BBB_uuidToURL to use BBB_uuidToObject. We should avoid calling getObject there where we don't have to.