Take the community feedback survey now.
AI OnAI Off
Take the community feedback survey now.
It sounds like a bug to me, I will file a bug to CG team. Thanks for bringing this into our attention.
P/S the bug is CMS-46157
The CG team got back to me and said they could not reproduce it


oplease reach out to support for further assistance
Our QA has now reported that they can reproduce the issue - so let's hope this will be fixed.
Thanks Quan Mai for the updates!
I suspect the CG team couldn’t reproduce the issue because they tested it using a Page with the RelatedPages property, while my case involves a Block with RelatedPages. I haven’t had a chance to verify the Page scenario yet, though.
Hi,

Today, I was investigating an issue related to expired content in Optimizely Graph.
What I found is that when the page expires and it's referenced in the block by drag & dropping it inside the list of references, it's still returned when queried in Graph. What I would expect in this case is that expired content is removed from the JSON representation of that list in the graph.
public virtual IList<ContentReference>? RelatedPages { get; set; }Instead of removing it, it just sets all fields in the expanded object to null. You can see it in the screenshot below. The first item is published, and the second one has expired:
I also checked how this works with content areas, and the expected behavior actually occurs there - expired items are removed from the JSON response. I'm wondering whether this is a bug or intentional by design. If it's by design, then the behavior is inconsistent between content areas and reference lists.
I investigated this using the following versions:
I also tried upgrading Optimizely.ContentGraph.Cms to v4.0.1 and settings ContentVersionSyncMode to ContentVersionSyncMode.PublishedOnly but it didn't make any difference.
Has anyone experienced this issue? Perhaps there's a configuration I'm missing or a workaround to handle this.
I would appreciate any hints or suggestions.