Try our conversational search powered by Generative AI!

Variants not displaying in Commerce Manager after Upgrade

Vote:
 

After we upgraded to latest epi commerce, we no longer see the variants showing up in Commerce Manager.  We went from commerce 12.17.1 to 13.30.0.  On the left is 12, rigth is 13.


The Type 'EPiServer.Shell.Storage.ComponentData' needs to be remapped in the Dynamic Data Store, see the Errors collection for more information. Remapping can be done by applying the EPiServer.Data.Dynamic.EPiServerDataStoreAttribute attribute to the type, setting its AutomaticallyRemapStore property to true and ensuring the <episerver.dataStore><dataStore> autoRemapStores attribute in web.config is set to true (or is not defined). at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.GetStore(Type type)

Can someone help with this above instructions?  <episerver.dataStore><dataStore> is not located anywhere in our solution.
#259928
Aug 02, 2021 15:14
Vote:
 

Can you try running this code against your solution. Anywhere will work.

var storeDefinition = StoreDefinition.Get(DynamicDataStoreFactory.Instance.GetStoreNameForType(typeof(ComponentData)));
storeDefinition.Remap(typeof(ComponentData));
storeDefinition.CommitChanges();
#259929
Aug 02, 2021 16:11
Vote:
 

Here is what I ran with no luck....

var errors = new List<string>();
            foreach (var storeDefinition in StoreDefinition.GetAll())
            {
                try
                {
                    var type = TypeResolver.GetType(storeDefinition.StoreName);
                    if (type != null)
                    {
                        storeDefinition.Remap(type);
                        storeDefinition.CommitChanges();
                    }
                    else
                    {
                        var provider = _dataStoreProviderFactory.Create();
                        provider.SaveStoreDefinition(storeDefinition);
                    }
                }
                catch (Exception ex)
                {
                    errors.Add($"Error remapping '{storeDefinition.StoreName}': {ex.Message} {ex.StackTrace}");
                }
            }
#260064
Aug 04, 2021 14:51
Scott Reed - Aug 04, 2021 15:07
The error seemed to be only to do with ComponentData, are you seeing it with other types after running the original code?

There shouldn't be hard in adding in the specified sections to the config. I wouldn't imagine them normally to be there on a default setup.
Vote:
 

Also, we see the variants in Commerce Manager UI, just not the UI in the screenshot above

#260066
Aug 04, 2021 15:07
Vote:
 

Scott, what should I try adding the web.config?

#260069
Aug 04, 2021 15:27
Scott Reed - Aug 04, 2021 15:44
add the datastore config elements as https://world.optimizely.com/documentation/developer-guides/CMS/configuration/Configuring-episerverdataStore/ with the autoRemapStores set to true
Vote:
 

Where am I adding <episerver.dataStore> to web.config?

#260079
Aug 04, 2021 18:21
Vote:
 

Configuration - episerver.dataStore Section | Optimizely Develope

episerver.dataStore should be at the same level as episerver.web etc. However I'm not quite sure about your problem. Where do you see that exception? If it happens it usually means your site has YSOD, not just "variants not showing" 

#260132
Aug 05, 2021 7:19
Vote:
 

So we only saw the error once in our logs, however, you're correct, Quan.  You'd expect to see a YSOD or at least the error being logged all the time.  It was only logged once.  Maybe the error is not related to this problem.  The problem still remains.  No variants are showing up in the new catalog UI, but do under the legacy Commerce Manager UI.

Any tips as to where to look would be much appreciated.  If not, we're about to open a ticket with support.

#260153
Aug 05, 2021 15:17
Vote:
 

Could you see any problem in your browser console?

#260157
Edited, Aug 05, 2021 19:45
Vote:
 

No nothing, all XHR requests return 200OK and no js errors.  I did not see any request when switching to the Variants tab, im guessing everything is loaded on catalog node click.  

I see requests for catalog content like the ones below... is there anything I should look for in particular?

/AMEPiServer/cms/Stores/contentstructure/48746__CatalogContent?dojo.preventCache=1628259017876

/AMEPiServer/cms/Stores/contentstructure/?references=1073755763__CatalogContent&query=getpagedchildren&allLanguages=true&typeIdentifiers=episerver.commerce.catalog.contenttypes.productcontent&typeIdentifiers=episerver.commerce.catalog.contenttypes.variationcontent&typeIdentifiers=episerver.commerce.catalog.contenttypes.packagecontent&typeIdentifiers=episerver.commerce.catalog.contenttypes.bundlecontent&sort()&dojo.preventCache=1628259017675

#260212
Aug 06, 2021 14:23
Vote:
 

You should be able to get the data from

<your-site>/AMEPiServer/EPiServer.Commerce.Shell/Stores/relation/?referenceId=<your-product-content-link>&relationTypes=4

#260336
Aug 09, 2021 8:48
Vote:
 

I don't see any request to that endpoint.... here are all the requests i see when clicking on a product.  I did not include query strings.

/AMEPiServer/cms/Stores/contentstructure

/AMEPiServer/shell/Stores/context

/AMEPiServer/cms/Stores/contentdata/62530_85995964_CatalogContent

/AMEPiServer/cms/Stores/contentversion/62530_85995964_CatalogContent

/AMEPiServer/EPiServer.Marketing.Testing/Stores/ABTestConfigStore

/AMEPiServer/shell/Stores/metadata/EPiServer.Core.ContentData

/AMEPiServer/cms/Stores/project-item

/AMEPiServer/cms/Stores/language

/AMEPiServer/cms/Stores/contentstructure (it looks like this has variants in its response, however the UI must not be using it)

/AMEPiServer/cms/Stores/contentstructure/62530__CatalogContent

#260407
Aug 10, 2021 15:11
Vote:
 

I guess that is the problem. Unless we can closely investigate your site it is hard to say why. Did you contact developer support service?

#260414
Aug 10, 2021 20:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.