Skip to content
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

Link integrity not working #578

Closed
hvelarde opened this issue Jan 14, 2016 · 3 comments · Fixed by #579
Closed

Link integrity not working #578

hvelarde opened this issue Jan 14, 2016 · 3 comments · Fixed by #579
Assignees

Comments

@hvelarde
Copy link
Member

Link integrity has been broken for some time now; we must re-implement it taking into account how this is going to work in Plone 5, where this feature was simplified to handle only deleting an item in the Plone UI.

According to first part of PLIP 125, the use cases could be something like this:

  • user adds 2 images, A and B
  • user adds a cover object with 2 tiles: one Basic and one RichText
  • user drops image A on the Basic tile and references image B inside the RichText tile
  • in Plone 4 those references must be saved on the reference_catalog in Products.Archetypes; on Plone 5 those references must be saved using zc.relation.
  • user tries to delete image A and B; in both cases she gets a warning saying: "The image X is used in the page ABC, are you sure you want to delete it?"

Current implementation registers an event handler to take care of IObjectClonedEvent (I don't know why or what for), IObjectAddedEvent and IObjectModifiedEvent; it also registers a different handler for IObjectRemovedEvent.

I propose to create a RF test and then fix the feature to do only what is proposed above.

We should get rid also of the hard dependency on Products.Archetypes.

@hvelarde
Copy link
Member Author

@runyaga please provide feedback as you were the one who asked for this first.

@alecpm @cewing @cguardia this is a little bit more difficult, as you can see.

@runyaga
Copy link

runyaga commented Jan 14, 2016

@hvelarde Maybe drop the feature? Prior cover would fail catastrophically if a referenced item was removed. If Cover no longer errors when a referring item is removed, do not see a reason to keep it.

Two thoughts:

  1. Drop the feature (rip out the dead code that is no longer working, e.g. "Link integrity feature has been broken for some time now"
  2. Make a new feature request. I would keep open the possibility of only supporting the feature on Plone 5 and not requiring it to support both 4 and 5 if that is a overwhelming burden.

Whats your thoughts?

@hvelarde
Copy link
Member Author

@runyaga IMO this feature is useful and I would like to maintain it; I think the new approach is easily achievable in both, Plone 4 and 5; we only need a RF test and refactor the feature.

I already started some work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants