Should AbstractUserControl.IsLiveSite be true in preview mode

Pedro Costa asked on July 2, 2015 12:54

Hi,

Am encountering a small problem with a projected converted from Web Site Project to Web Application Project.

I'm running the latest version 8 with hotfix 26 in the web application project and whilst debugging a change to the ShoppingCartItemSelector as shown here https://devnet.kentico.com/articles/removing-unavailable-variant-product-options-from-the-shoppingcartitemselector I noticed that the IsLiveSite property is true even on preview mode:

Image Text

From some of my digging I figured out that it is the IsLiveSite property of the parent control (the transformation that includes the ShoppingCartItemSelector control) that is true. Unfortunately I don't know what's setting that property or causing it to be true.

This happends both when in preview mode of a Product on the Products as on preview mode navigating the site.

Because the product is not published I cannot see the options, the control is always trying to get the live SKU's for the product!

Could this be a bug? Could this be a Web Application Project setting i'm missing somewhere?

I appreciate all help in advance,

Many thanks, P.

Recent Answers


Brenden Kehren answered on July 2, 2015 16:05

I too have found that not working as well as I'd expect, which is why I always check the ViewMode property instead. I'd recommend that.

0 votesVote for this answer Mark as a Correct answer

Pedro Costa answered on July 2, 2015 16:10

Hi Brenden,

On my custom code I do to, however the ShoppingCartItemSelector is an e-commerce module control, and IsLiveSite is used across it.

Strangely I don't think I have this behaviour on the Web Site Project version of the same site, so I suspect this may be somehow related to being a Web Application Project?

To clarify this was a brand new install using application project that we then imported the site from an export of the web site project via the CMS.

Cheers, P.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 2, 2015 18:36

Ahh makes sense now, sorry I missed that earlier. I'd suggest submitting it to Kentico as a bug and reference this post and see what you get from them.

0 votesVote for this answer Mark as a Correct answer

Pedro Costa answered on July 2, 2015 18:41

Done so, waiting to hear back, just wondering whether anyone in the community may have come across this before. Thanks, P.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.