We've had these issues as well, coming to an unsynchronized state for specifically commerce content. Bitwise adding the SaveAction ForceCurrentVersion to the save method helped us here all though I don't know the underlying cause. :(
So try (or tell your partner company to try) always saving commerce content with
_contentRepository.Save(writeableContent, SaveActions.Publish | SaveActions.ForceCurrentVersion, AccessLevel.NoAccess)
and see if that helps.
IsActive is overridden by Epi_IsPublished and the status of the version, if any. So they need to make sure the content is properly published, like Joel suggested
Doesn't this mean that ServiceAPI that is in use doesn't use the proper save action?
// PUT request was used: episerverapi/commerce/entries/1982
ServiceAPI works on a lower level (CatalogEntryDto/MetaObject), but it should work just fine. Can you look into ecfVersion to see which versions are there for that entry?
Yes, I can see that now, I've been browsing through the code and couldn't spot an error. It's version 18.104.22.168 of Service API.
These are the relevant fields when executing:
SELECT TOP 1000 [WorkId] ,[ObjectId] ,[ObjectTypeId] ,[CatalogId] ,[Code] ,[LanguageName] ,[MasterLanguageName] ,[IsCommonDraft] ,[StartPublish] ,[StopPublish] ,[Status] ,[Created] ,[Modified] FROM [dbTestCommerce].[dbo].[ecfVersion] where name = 'xx' and languagename='en'
Thx in advance!
They have one published version, and one checked out one. How do they know the content is not "published"? They might be looking at the checked out version.
The interface suggests it (and restarting the app doesn't change this, so it's no caching):
Could this be just a UI bug?
This is how it looks like in Manager: http://prntscr.com/i95r45
You have two versions, and for some reasons which I'm not sure (it should logically be otherwise, but the code might work otherwise), the catalog UI is picking up the wrong, older version. Can you open the version gadget and delete the "unpublished" version to see how does it behave?
I cannot delete versions from the Version gadget...
Ah sorry, I didn't write it clearly. I don't have the option in the interface to delete versions.
That is very strange. is the import file something you can share?
My bad, I forgot where the delete option was (expected a context menu on the version).
I have deleted the Draft version now. However, the interface still shows the spare part as unpublished (in the list - http://prntscr.com/iaat4c)
I also have the same issue. I also have InRiver import but it uses Episerver catalog XML import. So we do not control the saving of the content. It is all done by Episerver.
It seems that the issue appeared when I have added a new language to the site. Not sure if products were re-imported or not. But products (products and variants) in the list are shown as unpublished while when editing as published.
The biggest issue is that Find is unable to index those products and also in code, those appear as unpublished. This returns false:
We are having a Commerce installation that gets the product info from InRiver. We are not working on the connector or InRiver, a partner company is.
They have set a variant as unpublished and then they tried to publish it, however, in the interface, this is still not displayed as published. When I checked the DB, IsActive is true and dates are correct as well. The partner company says that this happens only for accessories and spareparts, but not for genericvariants, although I can't effectively test this myself.
What could cause this, any ideas on what to check?