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
Solved! Go to Solution.
Views
Replies
Total Likes
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.8 | AEM Commerce Add-On --> v2022.08.02.00 | Adobe Commerce --> 2.4.2 ee | Java 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
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.8 | AEM Commerce Add-On --> v2022.08.02.00 | Adobe Commerce --> 2.4.2 ee | Java 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
@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.
Views
Replies
Total Likes
Views
Likes
Replies