elliot-sawyer / silverstripe-linkfield

Adds a Linkfield for gorriecoe/silverstripe-link
BSD 3-Clause "New" or "Revised" License
9 stars 25 forks source link

Support Versioned: Publishing relations with LinkField #22

Open rasmniel opened 3 years ago

rasmniel commented 3 years ago

This issue is somewhat of an appendix to #20, however a slightly different topic, since that issue is related more closely with the Link object rather than the field.

I am experiencing problematic behaviour with the LinkField, causing it to relate the Link object to an Element's incorrect stage version (from dnadesign/silverstripe-elemental)

I have a derived block that I am using with extensions that add extra fields. When saving the Link in the LinkField, these fields are emptied (or rather reset to their initial version when the Element was created)

My procedure is as follows:

  1. Create the Element in question (and publish it for good measure)
  2. Update the values added by the extension
  3. Create a Link object and save this object
  4. Return to the Element, which is now in draft mode
  5. Proceed to discover the values added by the extension are not reset

For this reason we regrettably have agreed to revert to sheadawson's linkable module which does not have this problem. Unfortunately I haven't had the time to look closer into the differences of these two modules, but if someone does, take this post as a hint on where to start.

Apologies for being unable to provide more detailed information at the time of writing. Let me know if I can help anyone to understand the problem better — I don't entirely understand it myself yet.