Help needed with duplicate title tags

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
cashr23523
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Thu Oct 15, 2009 7:48 am

Help needed with duplicate title tags

Post by cashr23523 » Thu Oct 15, 2009 8:14 am

Hello, my customer is using AC 7.0. We are experiencing a problem with poor search results due to an issue with title tags being duplicated. In the code below you can see three different title tags being generated. I've seperated them by spaces so you can scroll to them easily. I think I have found where some of the code for the 1st and 3rd title yags are coming from but don't know where the 2nd tag is being generated or why all three are appearing at once. Any suhhestions on this?

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="ctl00_head1">

<title>Bald Cypress Grove</title> //FIRST TITLE TAG

<meta name='keywords' value='Bald Cypress Grove Bonsai, indoor bonsai tree, bonsai, bonzai, tropical tree, succulant'><meta name='description' value=''>
    <script language="javascript">
    //Additional Javascript
    </script>
<link href="App_Themes/BonsaiOutlet/ComponentArt_menuStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/ComponentArt_tabStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/ComponentArt_treeStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/print.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/style.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/webparts.css" type="text/css" rel="stylesheet" />

<title>Bonsai Tools | Bonsai Trees | Bonsai Supplies</title><meta name='keywords' value='Bonsai, Bonzai, Japanese Bonsai Tools, Trees, Plant'><meta name='description' value='BonsaiOutlet.com is the internets leading supplier of Bonsai Tools, Trees, and Supplies.'> //SECOND TITLE TAG

<title>View Product</title> //THIRD TITLE TAG

<style type="text/css">
	.ctl00_ContentZone_0 { border-color:Black;border-width:1px;border-style:Solid; }

</style></head>
I think I know where the tags for the 1st and 3rd tags are coming from but not the 2nd.

The 1st tage is being generated by a method in the PageHelper.cs file. From what I can tell this is the correct method we want to keep. Or at least it is putting the correct tags at the top of the page.

Code: Select all


public class PageHelper
{
    public static void RegisterBasketControl(Page page)
    {
        ...
        public static void BindMetaTags(Page page, ICatalogable catalogObject)
        {
           if (catalogObject != null)
              {
                  page.Header.Controls.AddAt(0,new LiteralControl(catalogObject.HtmlHead));
              }
        }
        ...
   }
}

The 3rd tag I believe is coming from the ASPX page or Products.aspx as seen below

Code: Select all


<%@ Page Language="C#" MasterPageFile="~/Layouts/Scriptlet.master" Inherits="CommerceBuilder.Web.UI.AbleCommercePage" Title="View Product" %>
......
This happens for most of the pages. If there are not three tags it's the 3rd tag that is being omitted. All pages are getting at least two title tags place on them.

Thank you in advance for any help.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Help needed with duplicate title tags

Post by mazhar » Thu Oct 15, 2009 9:19 am

Make sure that you didn't tried to set Title tag in HTML Head section on product details page.

User avatar
Ben
Commander (CMDR)
Commander (CMDR)
Posts: 170
Joined: Fri Aug 20, 2004 3:06 pm
Location: Corpus Christi, TX
Contact:

Re: Help needed with duplicate title tags

Post by Ben » Thu Nov 19, 2009 4:13 pm

question what if the HTML Head is where we want them but not anywhere else? I tried removing them from the pagehelper section but just wind up with an empty title tag open and closed beneth the metatag description.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Help needed with duplicate title tags

Post by mazhar » Fri Nov 20, 2009 4:54 am

You can not provide title tag in HTML Head because ASP.NET creates one title tag itself. So you can't control ASP.NET added tittle tag that's why you shouldn't put your custom one in head section. If you want this title tag to be adjusted on some different text value then control it like

Code: Select all

Page.Title = "Your custom title";

DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Re: Help needed with duplicate title tags

Post by DBounlom » Thu Aug 05, 2010 2:53 pm

Hi Mazhar,
You can not provide title tag in HTML Head because ASP.NET creates one title tag itself.
However, in this wiki article about adding meta tags, http://wiki.ablecommerce.com/index.php/ ... ta_tags%3F the added code allows for title tags to be put in the HTML Head section for product pages. Now, you are saying that we should not do that. Is there an easy way to customize the title tag for each product and category page?

I have looked through all of the past posts regarding title and meta tags such as this one viewtopic.php?f=42&t=7875, and they do not seem to help. Even if I did not include a customized title tag in the HTML Head, it appears the meta information is above the auto-generated title tag. Is there some way to fix that?

Thanks!

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Help needed with duplicate title tags

Post by jmestep » Fri Aug 06, 2010 7:16 am

You can put the title into the meta head section if you put code in the scriplet.master file to move things around as the page is rendered in the browser. You can't do it without doing that because of the way .net renders the default title tag.
We2Market SEO Manager does that.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Re: Help needed with duplicate title tags

Post by DBounlom » Fri Aug 06, 2010 2:57 pm

Hi Judy,

I called W2M yesterday because I wanted to inquire about the SEO Manager plugin that you have. Nobody called me back. =(

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Help needed with duplicate title tags

Post by jmestep » Mon Aug 09, 2010 9:32 am

Please try again and ask for Ruthann, x 205. Or you can place an order.
http://www.web2market.com/SEO-Manager-P122C77.aspx
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply