1

We have recently upgraded the project from Sitecore 9.0.2 to Sitecore9.3. There is a component called Page List and we have created a custom component from it as per custom need and it was working fine with Sitecore 9.0.2. We have configured this custom component on many pages.

After the upgrade, I faced a strange issue while loading a page from any of the pages first time it loaded fine (with the correct datasource) but other pages also loaded the same data as the first page. I've verified all the pages have different datasource values configured in the field.

There is no caching issue, I tried clearing the cache also there is no caching applied on the Component/Rendering level.

We always receive the same DataSource value from Rendering.

Does anyone face such an issue with Sitecore 9.3?

Thanks in Advance!

3
  • Is your component inside a placeholder that might be cached?
    – Richard Seal
    Sep 25, 2023 at 13:13
  • Thanks, @RichardSeal, I double-checked the placeholder caching. placeholder is not cached. Sep 26, 2023 at 1:29
  • No, I mean, check that the component that holds the placeholder is not cached. If you have for example a Container component, that has a placeholder in and then you set caching on that. Then you add a component to the placeholder and make sure that isn't cached. It will still cache the entire output of the Container component leading to the output you are seeing.
    – Richard Seal
    Sep 27, 2023 at 13:46

1 Answer 1

0

After spending many hours, comparing old configs of Sitecore 9.0.2 with Sitecore 9.3 and trying different things, I got the solution.

Problem with a service configuration that works fine in 9.0.2 instances like the below configuration.

<configuration>
    <sitecore>
        <services>
            <register serviceType="MyAssembly.Repositories.IPageListRepository, MyAssembly" implementationType="MyAssembly.Repositories.PageListRepository, MyAssembly" lifetime="Singleton"/>
        </services>
    </sitecore>
</configuration>

To make it work we have to change it with as below (lifetime="Transient")

<register serviceType="MyAssembly.Repositories.IPageListRepository, MyAssembly" implementationType="MyAssembly.Repositories.PageListRepository, MyAssembly" lifetime="Transient"/>

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.