Expand my Community achievements bar.

SOLVED

Issue upgrading to CIF components 2.4.2

Avatar

Level 1

I work on a site that was using version 1.9.0 of CIF components and we are trying to move to 2.4.2

 

Once some dependencies were resolved the site is running but all components fail with a JS error "The commerce API is not properly initialized. A required property is missing from the initialization object"

 

Looking at the code this is what I'm seeing:

 

var t = document.querySelector('meta[name="store-config"]');
if (t)
  window.CIF.CommerceGraphqlApi = new l(JSON.parse(t.content));
else {
  var n = document.body.dataset
    , r = n.storeView
    , e = n.graphqlEndpoint
    , i = n.graphqlMethod
    , o = n.httpHeaders;
  window.CIF.CommerceGraphqlApi = new l({
    graphqlEndpoint: e,
    storeView: r,
    graphqlMethod: i,
    headers: o ? JSON.parse(o) : {}
  })
}

 

The code is entering in the else branch but there's no dataset on the body tag so it fails. The CIF configuration and the com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl.cfg are correctly set as they were before.

 

Who is responsible of setup the data on body tag?

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

HI @cobregon ,

The latest version of the AEM CIF Core Components, require the below minimum system requirements:

CIF Core Components AEM as a Cloud Service AEM 6.5 AEM Commerce Add-On Adobe Commerce Java

CIF Core Components -- > 2.12.6 AEM 6.5 --> 6.5.8AEM Commerce Add-On --> v2022.08.02.00Adobe Commerce --> 2.4.2 eeJava 8, 11



For AEM as a Cloud Service deployments it requires the CIF Add-On provisioned on each environment. The CIF Add-On is installed automatically, no extra deployment is needed. The CIF Add-On is also available for local development with AEM SDK from Software Distribution portal.

For AEM on-prem installations, it requires the AEM Commerce Add-On for AEM 6.5 to improve the authoring experience by leveraging the product pickers, product assets view, and product consoles provided by the connector package. The AEM Commerce Add-On for AEM 6.5 is also available on the Software Distribution portal. It must be installed separately.


THanks
Tarun

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

HI @cobregon ,

The latest version of the AEM CIF Core Components, require the below minimum system requirements:

CIF Core Components AEM as a Cloud Service AEM 6.5 AEM Commerce Add-On Adobe Commerce Java

CIF Core Components -- > 2.12.6 AEM 6.5 --> 6.5.8AEM Commerce Add-On --> v2022.08.02.00Adobe Commerce --> 2.4.2 eeJava 8, 11



For AEM as a Cloud Service deployments it requires the CIF Add-On provisioned on each environment. The CIF Add-On is installed automatically, no extra deployment is needed. The CIF Add-On is also available for local development with AEM SDK from Software Distribution portal.

For AEM on-prem installations, it requires the AEM Commerce Add-On for AEM 6.5 to improve the authoring experience by leveraging the product pickers, product assets view, and product consoles provided by the connector package. The AEM Commerce Add-On for AEM 6.5 is also available on the Software Distribution portal. It must be installed separately.


THanks
Tarun

Avatar

Administrator

@cobregon Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni