Expand my Community achievements bar.

SOLVED

DataServicesStorefrontInstanceContext Query error on Adobe Commerce

Avatar

Level 2

Hi All,

 

When we are trying to integrate AEM with Adobe Commerce through CIF, we encountered the following error.

 

suprithanbhat_2-1694704347084.png

 

We are using AEMaaCS, Adobe Commerce enterprise edition 2.4.6-p1.

 

Network tab : 

suprithanbhat_3-1694704525568.png

suprithanbhat_4-1694704553981.png

When we tried debugging it, we found out that the inbuilt plugin @adobe/aem-core-cif-product-recs-extension is using this query.
suprithanbhat_5-1694704584401.png

We referred https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-venia-with-magento-int... and installed the module magento/module-data-services-graphql but no luck.

 

It is also mentioned in the above document that we will not be getting this error on Adobe Commerce Enterprise edition. Unfortunately, we are facing this issue on the Adobe Commerce Enterprise edition too.

suprithanbhat_6-1694704648677.png

Query : <commerce-endpoint>/graphql?query=query+DataServicesStorefrontInstanceContext%7BdataServicesStorefrontInstanceContext%7Bcatalog_extension_version+environment+environment_id+store_code+store_id+store_name+store_url+store_view_code+store_view_id+store_view_name+website_code+website_id+website_name+__typename%7DstoreConfig%7Bbase_currency_code+store_code+__typename%7D%7D&operationName=DataServicesStorefrontInstanceContext&variables=%7B%7D

 

Response on browser : 

suprithanbhat_7-1694704777264.png

 

We also went through the graphql documentation https://developer.adobe.com/commerce/webapi/graphql/reference/ to find the significance of this query. But, this query is not mentioned in the document.
 
The plugin @adobe/aem-core-cif-product-recs-extension is being used as below in the venia codebase (we took a reference from the venia codebase).
suprithanbhat_8-1694704822707.png

 

Please let me know a way to resolve this.

 

Thanks in advance,

Supritha.N

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

After installing the below product recommendation modules on our magento instance, we were able to resolve the above issue. Now the DataServicesStorefrontInstanceContext query is giving proper the response. 

 

1) composer require magento/product-recommendations

2) composer require magento/module-page-builder-product-recommendations

3) composer require magento/module-visual-product-recommendations

and then installed

4) composer require magento/module-data-services-graphql

ref : https://developer.adobe.com/commerce/pwa-studio/integrations/product-recommendations/

 

Note : After installing the above modules, we have to execute the below commands

 

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento cache:clean

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

After installing the below product recommendation modules on our magento instance, we were able to resolve the above issue. Now the DataServicesStorefrontInstanceContext query is giving proper the response. 

 

1) composer require magento/product-recommendations

2) composer require magento/module-page-builder-product-recommendations

3) composer require magento/module-visual-product-recommendations

and then installed

4) composer require magento/module-data-services-graphql

ref : https://developer.adobe.com/commerce/pwa-studio/integrations/product-recommendations/

 

Note : After installing the above modules, we have to execute the below commands

 

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento cache:clean