Connectors: RightContentVersionId not updating?

Apr 9, 2012 at 6:30 PM

I'm having problems with Orchard's versioning system and the Connector parts. I'm adding a Flexible Messaging Area to a page using connectors. When I first link the FMA item up to the page, it displays properly. However, if I try editing the FMA, my edits never show up regardless of what I publish or how many times I publish. It always displays the original version from the time the connector was hooked up.

From what I can tell, when I update a content item that is on the right side of the connector (in my case, the FMA), the version ID never gets updated on the ConnectorPartRecord. Am I doing something wrong, or is this a bug? 

Jul 17, 2012 at 3:59 PM

This sounds similar to an issue I'm seeing.

I updated the item on the right hand side and it seems to create a draft of the (draftable) item on the left. If I view the item on the left it shows the old version of the right hand side, and publishing doesn't fix it either. In fact, when the left hand side is a new draft it shows a later version of the right (but not the latest version), and after publishing the draft it reverts back to the original content.

Jul 17, 2012 at 4:09 PM
Edited Jul 17, 2012 at 4:28 PM

I figured out a workaround to this, but it's not really ideal.

In [Modules]/Downplay.Mechanics/Handlers/MechanicsContentHandler.cs  I changed line 324 to:

part.RightContentField.Loader(knownRight ?? (() => LoadContent(part.Record.RightContentItem_id, null)));

in order to just get the latest right-hand item instead of a specific version, and then commented out lines 261-263 to stop auto-publishing the wrong version of right-hand item.

Jul 17, 2012 at 4:58 PM

Cheers. Unfortunately that doesn't seem to work for me. Are the types on both sides of your relationship draftable, and are the relationship types draftable?? I tried with draftable and non-draftable but it doesn't make a difference for me.

Jul 17, 2012 at 5:15 PM

I have a Draftable but not Creatable Connector type. Both left and right side types are Creatable and Draftable. Another thing to note is that I am using the Sequence Part on the connector type as well. Not sure if you noticed, but I edited my previous post to add something I forgot. Hope this helps.