Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ernie99 1 post 21 karma points
    Oct 29, 2010 @ 16:21
    ernie99
    0

    Extra Title Tag in Head

    Hi Chris, thank you for creating this package.

    I have a minor problem that I've been trying to resolve for a few hours. No one else seems to have encountered this issue so it must be a problem with the head section of my site. When I use the meta tags macro I get an additional title tag in the source just before the close of the head. Not really a big deal but it does mean my markup doesn't validate. If I don't use the meta tags macro the extra tag does not appear.

    I have pasted the relevant code from my template and the outputted markup. Do you have any suggestions regarding the cause of this problem? Thanks for your time.

    Umbraco: 4.0.3

    ASP.Net: 3.5

    Windows Server 2008. IIS 7.0

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head id="head" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="language" content="en" />
    <umbraco:Macro Alias="MetaTags" runat="server"></umbraco:Macro>
    <meta name="google-site-verification" content="_-DecupmI7Oz228KhhOL7VhxiRkgNbEQGCrsXXXXX" />
    <link rel="icon" href="/images/xxxx/favicon.ico" />
    <link rel="shortcut icon" href="/images/xxxxxxx/favicon.png" />
    <link rel="stylesheet" media="screen" href="/smartoptimizer/?css/tc_structure.css,tc_furniture.css,tc_screen.css,tc_mainnav.css,colours.css,wvPopups.css,ads.css,forms_tables.css" type="text/css" />
    <link rel="stylesheet" media="print" href="/smartoptimizer/?css/print.css" type="text/css" />
    <!--[if IE 6]><link type="text/css" href="/smartoptimizer/?css/ie6.css" rel="stylesheet" media="screen" /><![endif]-->
    <!--[if IE 7]><link type="text/css" href="/smartoptimizer/?css/ie7.css" rel="stylesheet" media="screen" /><![endif]-->
    <!--[if IE 8]><link type="text/css" href="/smartoptimizer/?css/ie8.css" rel="stylesheet" media="screen" /><![endif]-->
    <script type="text/javascript" src="/smartoptimizer/?scripts/jquery.js"></script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/core/mootools_core.js"></script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/natives/Browser.js,Element.js"></script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/externalLinks.js"></script>
    <umbraco:Macro accountNumber="UA-983XXXX-1" displayGoogleAnalyticsCode="0" Alias="TC_GoogleAnalytics" runat="server"></umbraco:Macro>
    </head>

     

     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_head">
    <meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="language" content="en" />
    <title>XXXXX</title>
    <meta name="keywords" content="XXXXX" />
    <meta name="description" content="XXXXXX" />
    <meta name="google-site-verification" content="_-DecupmI7Oz228KhhOL7VXXXXXXX" />
    <link rel="icon" href="/images/XXXX/favicon.ico" />
    <link rel="shortcut icon" href="/images/XXXXX/favicon.png" />
    <link rel="stylesheet" media="screen" href="/smartoptimizer/?css/tc_structure.css,tc_furniture.css,tc_screen.css,tc_mainnav.css,colours.css,wvPopups.css,ads.css,forms_tables.css" type="text/css" />
    <link rel="stylesheet" media="print" href="/smartoptimizer/?css/print.css" type="text/css" /><!--[if IE 6]><link type="text/css" href="/smartoptimizer/?css/ie6.css" rel="stylesheet" media="screen" /><![endif]-->
    <!--[if IE 7]><link type="text/css" href="/smartoptimizer/?css/ie7.css" rel="stylesheet" media="screen" /><![endif]--><!--[if IE 8]><link type="text/css" href="/smartoptimizer/?css/ie8.css" rel="stylesheet" media="screen" /><![endif]-->

    <script type="text/javascript" src="/smartoptimizer/?scripts/jquery.js">
    </script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/core/mootools_core.js">
    </script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/natives/Browser.js,Element.js">
    </script>
    <script type="text/javascript" src="/smartoptimizer/?scripts/externalLinks.js">
    </script>
    <link id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_sslider" rel="stylesheet" type="text/css" href="/smartoptimizer/?css/s3slider.css" />
    <script id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_slider" type="text/javascript" src="/smartoptimizer/?scripts/s3Slider.js">
    </script>
    <title></title>
    </head>
  • David Parr 20 posts 90 karma points
    Nov 04, 2010 @ 10:42
    David Parr
    0

    I am having a similar issue except I don't use a macro to generate my existing title. Even if I don't use a title tag one is always created and appended to the head across every page of the site.

    Does anyone have a solution to this? I am using Umbraco 4.5 .NET 4.

    Regards

    David

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Jan 27, 2011 @ 12:18
    Rasmus Berntsen
    3

    Hi,

    I'm adding the title-tag from XSLT and did have this problem too. My solutions was to add the title-tag in the masterpage and add a visible="false" to it:

    <%-- "Hack" to remove Two Title-tags. --%> 
    
    <title runat="server" visible="false"></title>
  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Feb 08, 2011 @ 02:22
    Chris Houston
    0

    Hi,

    I have only just seen your ticket, so I am sure by now you have solved your problem?

    My guess is that in your child template you were also including an empty title tag in the heading section?

    Cheers,

    Chris

  • Rune Grønkjær 1371 posts 3102 karma points
    Apr 10, 2012 @ 08:44
    Rune Grønkjær
    0

    Hi Guys,

    Thanks Bernsten. That's a great solution.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft