0

I am upgrading Sitecore 8.2 code to 9.1 and in my code ProxyManager class has been used at several places. Below is one of the examples.

ProxyManager.GetRealItem(item, false);

I understand Sitecore.Data.Proxies namespace has been significantly reduced in Sitecore 9 but can someone please suggest the alternate class (or code) for ProxyManager.

Thanks

3

I have bad news for you -> ProxyManager, SqlServerProxyDataProvider, SqlProxyDataProvider, ProxyDisabler and many other proxy related classes have been deprecated in Sitecore 9.

There is no direct replacement for them in Sitecore 9.

You can use Cloning functionality which is similar functionality to Proxy items -> https://doc.sitecore.com/users/92/sitecore-experience-platform/en/clones.html

  • Peter- I have not used ProxyManager much but can we create an extension method to get the original Item from __Source field? I mean, what did ProxyManager.GetRealItem do actually? – Mahendra Shekhawat Oct 14 at 13:09
  • 1
    You have two options here: 1) Recode and restructure the solution to use clones or aliases instead of proxy items. This is more time consuming but future wise better solution as it will be supported for couple of more versions in Sitecore. 2) Disassembly old Sitecore 8 dlls where ProxyManager and all methods that you use currently are used and create your own implementation for Sitecore 9. This is not as much time consuming as first option but is less maintainable and upgradable definetely. I would suggest going with first option and client to pay extra effort now and make solution more robust – Peter Procházka Oct 14 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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