Variants shown as Not published, although dates are OK and IsActive = true in the database

Vote:
 

Hi, everyone,

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?

Thx,
Marija

#187780
Feb 02, 2018 10:49
Vote:
 

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.

#187782
Feb 02, 2018 11:10
Vote:
 

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

#187785
Feb 02, 2018 11:28
Vote:
 

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

BR,
Marija

#187789
Edited, Feb 02, 2018 13:18
Vote:
 

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? 

#187790
Feb 02, 2018 13:32
Vote:
 

Yes, I can see that now, I've been browsing through the code and couldn't spot an error. It's version 4.1.1.0 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'

http://prntscr.com/i94um1

Thx in advance!

Marija

#187795
Feb 02, 2018 14:07
Vote:
 

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. 

#187801
Feb 02, 2018 14:48
Vote:
 

The interface suggests it (and restarting the app doesn't change this, so it's no caching):

http://prntscr.com/i95nkt

BR,
Marija

#187802
Feb 02, 2018 14:58
Vote:
 

Could this be just a UI bug?

This is how it looks like in Manager: http://prntscr.com/i95r45

BR,
Marija

#187803
Feb 02, 2018 15:05
Vote:
 

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?

#187808
Feb 02, 2018 15:45
Vote:
 

I cannot delete versions from the Version gadget...

#187810
Feb 02, 2018 15:49
Vote:
 

what does it say?

#187812
Feb 02, 2018 15:54
Vote:
 

Ah sorry, I didn't write it clearly. I don't have the option in the interface to delete versions.

#187850
Feb 05, 2018 9:44
Vote:
 

That is very strange. is the import file something you can share? 

#187851
Feb 05, 2018 9:46
Vote:
 

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)

#187855
Feb 05, 2018 10:28
Vote:
 

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:

currentContent.IsAvailableInCurrentMarket()
#203461
Edited, Apr 24, 2019 14:45
* 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.