Issue upgrading to CIF components 2.4.2 | Community
Skip to main content
New Participant
December 24, 2021
Solved

Issue upgrading to CIF components 2.4.2

  • December 24, 2021
  • 2 replies
  • 1101 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by TarunKumar

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

2 replies

kautuk_sahni
Employee
February 8, 2024

@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
TarunKumar
TarunKumarAccepted solution
New Participant
February 6, 2024

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