1

I'm currently in the process of upgrading our solution from Sitecore 9.1.1 to 10.2. Our solution has a number of nVelocity templates that I need to replace with scriban templates. I've also already run the SXA upgrade steps for 9.1.1 to 10.2.

Whenever I add a scriban template item to a rendering variant, I'm getting the following error.

Method 'TryGetItem' in type 'Sitecore.XA.Foundation.Scriban.ContextExtensions.ItemAccessor' from assembly 'Sitecore.XA.Foundation.Scriban, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Has anyone run into this issue before?

enter image description here

7
  • can you add your scriban script ? did you try to add just a simple html without taking any values from fields to see if is crashing? May 5, 2022 at 19:47
  • Yes, I added a scriban template with just the word "test" in there. As long as a scriban template is added to the rendering variant, it crashes.
    – soze
    May 6, 2022 at 4:53
  • can you compare your dlls with a clean 10.2 solution with sxa . I search for the trygetitem method in that assembly in 10.2 and doesn't exist. I guess you have a mix of old solution dll and new solution. May 6, 2022 at 8:05
  • 1
    Good point! I'll take a look.
    – soze
    May 6, 2022 at 16:33
  • So, I think maybe this Scriban dll from Nuget has an issue? The TryGetItem is defined from the Interface IObjectAccessor which is not implemented in Sitecore.XA.Foundation.Scriban.ContextExtensions.ItemAccessor
    – soze
    May 6, 2022 at 23:39

1 Answer 1

0

You need to add correct reference to Scriban.dll . Sitecore 10.2 works with version 3.6 of Scriban.

enter image description here

Your Answer

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

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