Changes to inline blocks not getting reflected in preview

Vote:
 

We have a Ratings Page in CMS, in which we have a block A. Inside block A, we have another block B.  After making changes to block B, and saving it, and saving block A, when we preview the page, the changes made to the block are not getting reflected. This is happening for inline blocks.

The CMS version we are using is - 

Episerver.CMS - 12.31.2

Episerver.CMS.Core - 12.22.0

#334123
Edited, Dec 10, 2024 8:21
Vote:
 

Do the changes show after publish?

How are the controllers set up?

Have you implemented any cache? 

Will changes to the page hosting the blocks be visible if published?

#334124
Dec 10, 2024 9:08
Vote:
 

Yes, the changes are showing after publish.

We don't have any caching setup for preview.

When published, any changes made to the page hosting the blocks are reflected.

Even after publishing, if we preview the the changes, then it is not showing the updated changes.

 

#334129
Dec 10, 2024 10:06
Vote:
 

Just to confirm my understanding - You have a page with a content area. In that content area you've created a block and inside that block is another content area where you've created another block. Is that correct?

Can I also check whether you've enabled inline blocks (either programmatically using uiOptions.InlineBlocksInContentAreaEnabled = true; or through config by setting "InlineBlocksInContentAreaEnabled": true in appsettings.json)?

Where I've seen this kind of behaviour before, it was due to a mismatch in content lifecycles between the blocks and the pages. If you update a block which is used on a page but you don't publish that block, you won't see the updated version on the page (because the page pulls in the published version of the block). A way around that is to use projects. If you're editing in the context of a project, you should see the latest updates to all content in that project.

The more official way around it (which also offers a nicer editing experience) would be to use inline blocks. Inline blocks are created within the context of the content hosting the content area so share that content's publish lifecycle. That means that you can't publish the block independently but, as a result, you see the changes you made to the block when you're editing the "parent" content. There are a few limitations of inline blocks though so, if you're not using them right now, think through the consequences before enabling that feature.

#334131
Dec 10, 2024 11:16
Priyanka - Dec 10, 2024 11:25
Hi Paul,
yes, we have a page with a content area. In that content area we've created a block and inside that block there is another content area where we've created another block. We have used uiOptions.InlineBlocksInContentAreaEnabled = true; to enable inline blocks.
We are using inline blocks, and there facing the issue that once we have updated the block, it does not get reflected in preview. These pages are not added to a project right now.
Vote:
 

I'm suspecting your nested block strategy wont make the response cache to release as supposed. While nested blocks in that manner is not recommended its probably solvable anyway.

What happens if you disable the response and version cache? 

E.g

  "EPiServer": {
    "CMS": {
      "Content": {
        "VersionCacheSlidingExpiration": "0:0:0",
        "ContentCacheSlidingExpiration": "0:0:0"
      },
...
#334134
Dec 10, 2024 12:14
Mark Stott - Dec 11, 2024 10:28
The approach of a Page with a Content Area that contains a block which has it's own content which then contains another block is a fairly common solution. e.g. Accordion Block (With child Accordion Item Block) or a Carousel Block (with carousel item blocks). Though where possible for parent / child blocks I now tend to prefer the IList
Eric Herlitz - Dec 11, 2024 11:39
Yea I know, I've done it in the past and it works fine but I believe that one of the issues is that lots of stuff will break if you accidentally create a loop somewhere. We did and could not index in prod for weeks until we figured that one out. Such things can surely have other effects as well.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.