Product description tabs disappeared.
Posted: Tue Oct 02, 2012 9:37 am
I've been tweaking our store, and just noticed that the product description tabs have disappeared from the product page. After backing out most of the layout and style edits, it still doesn't appear.
Markup for the tab controls gets rendered to the browser, but has a visibility:hidden attribute applied to the containing div. Here is the markup. I indented for legibility. You can see the second containing div has the visibility:hidden property.
If I change that second div to this in the Chrome elements console, it renders the tabs, albeit not styled with the colors, but at least it displays them.
That output appears to be rendered by the ProductPage.ascx control. I've looked at that, and at the code-behind. The Page_PreRender() event in that control has some visibility related code. But when running this in debugger it appears to have the properties set correctly. Here is a code snippet from that.
From the above, debugger shows the Tabs[#].Visible properties get set as follows:
ProductDetailsTabs.Tabs[0].Visible = true
ProductDetailsTabs.Tabs[1].Visible = false
ProductDetailsTabs.Tabs[2].Visible = true
ProductDetailsTabs.Tabs[3].Visible = false
This was working yesterday. I think the problem may rest with one of the database settings, but don't know where to look for that. Any guidance would be appreciated. Thanks.
Markup for the tab controls gets rendered to the browser, but has a visibility:hidden attribute applied to the containing div. Here is the markup. I indented for legibility. You can see the second containing div has the visibility:hidden property.
Code: Select all
<div class="tabs">
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs" class="tabs" style="visibility:hidden;">
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_header" class="ajax__tab_header">
<span id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl00_tab">
<span class="ajax__tab_outer">
<span class="ajax__tab_inner">
<a class="ajax__tab_tab" id="__tab_ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl00" href="#" style="text-decoration:none;">
<span>Description</span></a>
</span>
</span>
</span>
<span id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl01_tab">
<span class="ajax__tab_outer">
<span class="ajax__tab_inner">
<a class="ajax__tab_tab" id="__tab_ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl01" href="#" style="text-decoration:none;">
<span>Reviews</span></a>
</span>
</span>
</span>
</div>
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_body" class="ajax__tab_body" style="height:100%;display:block;">
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl00" id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl00" class="ajax__tab_panel">
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl00_ProductDescription1_DescriptionAjax">
<div class="widget productDescription">
<div class="innerSection">
<div class="header">
<h2>
Description
</h2>
</div>
<div class="content">
<div class="descriptionWrapper">
<p><span>Covers subjects such as US Government, Peoples of America, World History, Countries of the World, an Atlas, Math, Biology, Chemistry, Physics, English and Literature. Contains an alphabetized, illustrated guide to books, plays, and literary figures.</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl01" id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs_ctl01" class="ajax__tab_panel" style="display:none;visibility:hidden;">
</div>
Code: Select all
<div id="ctl00_ctl00_NestedMaster_PageContent_ctl00_ProductDetailsTabs" class="tabs" style="visibility:block;">
Code: Select all
protected void Page_PreRender(object sender, EventArgs e)
{
ProductDetailsTabs.Tabs[0].Visible = ProductDescription1.Visible;
if (!string.IsNullOrEmpty(_Product.ExtendedDescription))
{
ProductDetailsTabs.Tabs[1].Visible = true;
ExtendedDescription.Text = _Product.ExtendedDescription;
}
else
{
ProductDetailsTabs.Tabs[1].Visible = false;
}
ProductDetailsTabs.Tabs[2].Visible = ProductReviewsPanel1.Visible;
ProductDetailsTabs.Tabs[3].Visible = MoreCategoryItems1.Visible;
}
ProductDetailsTabs.Tabs[0].Visible = true
ProductDetailsTabs.Tabs[1].Visible = false
ProductDetailsTabs.Tabs[2].Visible = true
ProductDetailsTabs.Tabs[3].Visible = false
This was working yesterday. I think the problem may rest with one of the database settings, but don't know where to look for that. Any guidance would be appreciated. Thanks.