Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 259 posts 446 karma points
    5 days ago
    Sean Dooley
    0

    The type 'JObject' exists in Newtonsoft.Json and TeaCommerce.PaymentProviders

    Recently installed Tea Commerce and I'm getting the following error on pages which have a grid layout.

    The type 'JObject' exists in both 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'TeaCommerce.PaymentProviders, Version=3.1.7187.31639, Culture=neutral, PublicKeyToken=null'
    
    Line 72:     {
    Line 73:         var attrs = new List<string>();
    Line 74:         JObject cfg = contentItem.config;
    Line 75: 
    Line 76:         if (cfg != null)
    
    Source File: Views\Partials\Grid\Bootstrap3.cshtml    Line: 60
    

    I've tried the following without any luck

    • Clean and rebuild of solution
    • Declaring the variable with the namespace

    Newtonsoft.Json.Linq.JObject cfg = contentItem.config;

    I've researched various methods, for example, https://stackoverflow.com/a/17651003 and https://stackoverflow.com/a/517169, but I wanted to check with the Umbraco community before trying anything else.

    Additional Information

    • Umbraco 7.15.3
    • Tea Commerce 3.3.3
  • Matt Brailsford 2296 posts 11134 karma points MVP 6x c-trib
    5 days ago
    Matt Brailsford
    0

    Hi Sean,

    This is a problem with how we compiled the payment providers dll. The references should have been internalized when we merge them.

    If you take a look at this forum post https://our.umbraco.com/packages/website-utilities/tea-commerce/tea-commerce-support/98924-the-type-jtoken-exists-in-both-newtonsoftjson-version-12000-and-teacommercepaymentproviders-version-31718424107 there is a download to an alternatively compiled payment providers dll which should hopefully work.

    (This reminds me that I need to get that update pushed out soon, but the dll should at least resolve it for you now)

    Matt

  • Sean Dooley 259 posts 446 karma points
    5 days ago
    Sean Dooley
    1

    Thanks the information Matt.

    For the time being, I've replaced Newtonsoft variables, i.e. JObject, JProperty, with var in grid Partial Views.

Please Sign in or register to post replies

Write your reply to:

Draft