ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

title and meta tags not showing up

July 05, 2012 8:33am

Subscribe [2]
  • #1 / Jul 05, 2012 8:33am

    bthom62

    164 posts

    we switched to 2.4 and some of our pages/templates are still giving us some trouble

    a member template to show the bio and their recent columns no longer gives me a title and the meta tags do not show up

    What have I done wrong?

    attached below is the code

    I have blanked out my website name in the title tag

    {exp:channel:entries  limit="1"  channel="default_site" dynamic="off"  username="{segment_3}"  disable="pagination|custom_fields|trackbacks"}
    <title>XXXX XXXX XXXX: {screen_name}</title>
    <meta name="description" content="{screen_name}" />
    <meta name="keyword" content="{screen_name}" />
    {/exp:channel:entries}
  • #2 / Jul 05, 2012 5:43pm

    Dan Decker

    7338 posts

    Hi bthom62,

    Are you seeing this behavior for all users?

    Some troubleshooting to try, hard-code a known username in the username= parameter. What are the results?

    Are you sure the the username in the parameter has a value stored for {screen_name}? If a user has not supplied a screen name, the variable will not have a value.

    I look forward to your reply!

    Cheers,

  • #3 / Jul 05, 2012 5:48pm

    bthom62

    164 posts

    I enter all members.

    So I made the username the same as the screen name

    A few iterations ago ( I think when I went from 1.6 to 1.7, my old way of coding failed , so I came up with this one. and it worked

    Now the display is fine, but as i said no meta tags and titles on the page

  • #4 / Jul 06, 2012 3:07pm

    Shane Eckert

    7174 posts

    Hey bthom62,

    Can you show the whole template code?

    Thank you!

  • #5 / Jul 06, 2012 3:27pm

    bthom62

    164 posts

    Thank you

    {preload_replace:my_channel="default_site"}
    {preload_replace:my_template_group="site"}
    
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html xml:lang="en" lang="en">
    <head>
    
    {exp:channel:entries  limit="1"  channel="default_site" dynamic="off"  username="{segment_3}"  disable="pagination|custom_fields|trackbacks"}
    <title>Canada Free Press: {username}</title>
    <meta name="description" content="{screen_name}" />
    <meta name="keyword" content="{screen_name}" />
    {/exp:channel:entries}
    {script-header-banner-ads}
    <table width="1030" border="0" align="center" cellpadding="5" cellspacing="0" summary="ad row">
     <!-- Start of main content -->
    <tr>
    <td width="160" valign="top">
    <!-- Left side starts -->
    
    {script-leftside}
    </td>
    <td width="550" valign="top">
    <table width="550" align="center" border="0" cellpadding="0" cellspacing="0" summary="">
    <tr valign="top'"><td>
    {exp:channel:entries orderby="date" sort="desc"  limit="1"  channel="default_site" dynamic="off"  author_id="{segment_4}"  disable="pagination|trackbacks"} <!-- Fixed N2 -->
    <span>Author Profile</span>
    <h2>{author}</h2><p> <br />
    </td></tr><br />
    <tr><td><br />
    <table border='0' cellspacing='0' cellpadding='0' width="550"><br />
    <tr><td valign="top" width="120"><br />
    {if photo}</p>
    
    <p><br />
    <div class="itempad">{photo_url}</div><br />
    {/if}</p>
    
    <p><br />
    <a href="mailto:{email}">Email</a></p>
    
    <p></td><br />
    <td width="430"></p>
    
    <p><br />
    <strong>Bio:</strong> {signature}<br />
    </td></tr></table><br />
    {/exp:channel:entries}<br />
    </td></tr></table><br />
    <table width="550" align="center" border="0" cellpadding="0" cellspacing="0" summary=""><br />
    <tr><td></p><h3>Most Recent Articles:</h3>
    <p>{exp:channel:entries orderby="date" sort="desc"  limit="65"  channel="default_site" dynamic="no"  author_id="{segment_4}" paginate="both" disable="member_data|trackbacks|category_fields"}<br />
    <a href="http://{site_url}index.php/article/{entry_id}"><span>{title}</span></a><span> - {entry_date format=' %M %j, %Y '}</span></p>
    
    
    
    <p>{paginate}<br />
    {if previous_page}<br />
    <span>a href="{auto_path}"><< - Previous 65 Columns</a></span>  <br />
    {/if}<br />
    {if next_page}<br />
    <span>a href="{auto_path}">Next 65 Columns - >></a></span></p>
    
    <p><br />
    {/if}</p>
    
    <p>{/paginate}<br />
    {/exp:channel:entries}</p>
    
    <p> </p>
    
    <p><br />
    <hr size="1" width="90%"  noshade ></p>
    
    <p> </p>
    
    <p></td></tr></table><br />
    </td><td width="300" valign="top"><br />
    {script-new-rightside}

  • #6 / Jul 09, 2012 3:56pm

    Dan Decker

    7338 posts

    Hi bthom62,

    So this was an update from 1.x to 2.4?

    The only thing that stands out to me is the use of “trackbacks” in the disable= parameter. That is no longer available in 2.x

    While EE should ignore it, it may be causing the hiccup here. Can you remove trackbacks from the disable parameter and see if things begin behaving properly?

    If not, we would want to get in for a closer look.

    Cheers,

  • #7 / Jul 09, 2012 4:10pm

    bthom62

    164 posts

    I took it out and no such luck

    It still does not work

  • #8 / Jul 11, 2012 12:13pm

    Dan Decker

    7338 posts

    Hi bthom62,

    You should receive an email from EllisLab shortly.

    Cheers,

  • #9 / Jul 13, 2012 3:51pm

    Dan Decker

    7338 posts

    Hi bthom62,

    After looking into this, the problem only occurs on username(s) with a space in them.

    You can either have your users remove special characters from their user names, or use something like {member_id} as {segment_3}.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases