-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceException: Invalid target UID #294
Comments
@hvelarde Because this issue came up first when I was searching for the exact same error I'm adding another note here for those who come after me. But in my case I am trying to reference to plone.app.contenttypes DX Document type in a Plone 4 site. The behaviour you added to the cover content type in 2013 (6fb4bff) adds the option to reference from covers to other objects in the site (plone.app.relationfield.behavior.IRelatedItems). This is still enabled on covers today, but the cover template doesn't expose the related items viewlet at all so I don't think anybody is actively using this. Maybe(*) that plone.app.relationfield.behavior.IRelatedItems would also fix the UID's, but the behavior that does support referencing from archetypes to Dexterity is plone.app.referenceablebehavior.referenceable.IReferenceable . Activating this on Dexterity items doesn't fix existing content though, only if you edit items the UID is stored. Clearing and rebuilding the portal_catalog doesn't work, because the uid_catalog is where the UID's are missing from for dexterity items. @mauritsvanrees documented this in 2010 in a mailinglist thread here, upgrade step listed at the end of this note: The weird thing is on the maybe(*): In my Plone 4 site with Covers and archetypes items I was able to reference to covers from Archetypes content But referencing to p.a.contenttypes DX Document CT that also has the same "plone.app.relationfield.behavior.IRelatedItems" behavior enabled by default still gave me the "ReferenceException: Invalid target UID" error. For collective.cover it seems that something else is fixing the UID reference probem, but I don't think it's the IRelatedItems behavior. Adding this upgrade step solved the problem: Upgrade step for updating the uid_catalog after adding the referenceablebehavior from Maurits's mailinglist post:
|
@fredvd do you think is a good idea to remove the dependency on plone.app.relationfield then? |
when trying to add a cover as a related item of an Archetypes-based item the following error is shown:
The text was updated successfully, but these errors were encountered: