I saw the KeyError topics relating to migration from Plone 4.3 to 5. However, I got something similar that did not involve a migration. In this case, when I link to a file using the link button in a RichText edit area (on a Page object), I get the following KeyError.
The link is correct (and the File object exists with that URL and filename), so I'm at a loss to know why a KeyError is thrown.
Here is the traceback...
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 66, in call
Module plone.z3cform.layout, line 50, in update
Module plone.dexterity.browser.edit, line 58, in update
Module plone.z3cform.fieldsets.extensible, line 59, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 145, in update
Module plone.app.z3cform.csrf, line 21, 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.dexterity.browser.edit, line 30, in handleApply
Module z3c.form.group, line 126, in applyChanges
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.linkintegrity.handlers, line 100, in modifiedContent
Module plone.app.linkintegrity.handlers, line 87, in getObjectsFromLinks
Module five.intid.intid, line 41, in getId
Module zope.intid, line 89, in getId
KeyError: <File at /texasbusinesslaw/research-resources/texas-business-law-journal/volume-46/2015business-law-journal_finalpdf.pdf>