Support » Fixing WordPress » Mysterious text inserted when showing page

  • On most machines, but not all, I get a text at the top of my wordpress blog. It is four letters, and they are random and not anywhere in my source. I just installed a fresh copy of wordpress 2.1, but it started happening before this.

    Not all machines show the error so i have taken a screenshot aswell.

    I have narrowed down the bug to my themes index.php. If i remove the following code it disappears, but it doesn’t matter if i leave only comments or only story because it still shows…

    <div class="post" id="post-<?php the_ID(); ?>">
    <h3 class="storytitle">" rel="bookmark"><?php the_title(); ?></h3>
    <div class="meta">Posted by <?php the_author() ?> in <?php the_category(',') ?> on <?php the_time('l, F jS, Y') ?> <?php edit_post_link(__('edit')); ?></div>

    <div class="storycontent">
    <?php the_content(__('(more...)')); ?>

    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

Viewing 12 replies - 1 through 12 (of 12 total)
  • I don’t know if this will fix it, but there appears to be an error in your code:

    <h3 class=\"storytitle\">\" rel=\"bookmark\"><?php the_title(); ?></h3>

    Notice the angle bracket after storytitle\">\" ??

    Try this:

    <h3 class=\"storytitle\" rel=\"bookmark\"><?php the_title(); ?></h3>

    Hm. That added a lot of backslashes to the code, but hopefully you can see that the angle bracket after “storytitle” should not be there.

    My code doesn’t look like that… it is the forum doing it.

    This must have something to do with the data from mysql is my best guess…

    but since it is not browser dependent, but machine dependent it must be something on the pc?

    I’m seeing the same thing on a site of mine. Happens in firefox and ie6/7 but not safari. Removing the calls to posts from the theme index does seem to stop the numbers showing? This is on a fresh install of 2.1.2?

    I’m wanting to know what browser you’re seeing this in. Either you’ve gotten it fixed or it’s not a browser I’ve checked it in yet – I’m not seeing this in Firefox, IE7 or IE6.

    I find it interesting – the test that’s showing up is “lf5A” Your site is in another language – I think Swedish? (Not sure)…I’m wondering what the conversion of certain characters looks like on an English keyboard. You say it’s random, but what I’m wondering is this…

    IE 6 (and 7 sometimes) has this bug with comments. If you have your div elements formed in a certain way, then IE will take however many commented lines you have, and show the same amount of characters at the end of your document at the top of your page.

    I know this sounds weird…but for example, if your code looks something like this:

    <div class="post"> <!-- I feel like putting a comment here -->
    <p>post text here</p> <!--let's put in another comment! -->

    Then at the top of your page you’ll see:

    re <– the last two letters of “here” in the post

    because you have two commented fields on the page.

    So I’m wondering if, 1) you’re seeing this in IE and 2) if your Swedish characters convert to odd English keyboard characters, if maybe *that* is what you’re seeing.

    Man, I hope all that made sense.

    But anyway, it’s an IE bug. You can fix it by replacing your comments:

    <!– comment here –>


    <!–[if !IE]> comment here <!–[endif]>

    Of course, I could be totally wrong, but that’s the first thing I thought of when I saw this error, I’ve run into it so many times. Could be the same thing.

    Hi, I’m seeing it in firefox and ie 6 and 7 on my site.

    I thought I’d managed to track it down to:

    <?php trackback_rdf(); ?>

    Removing that function call from the theme index fixed the problem for me. But I had removed some other bits further down, adding them back in gets me the error again! 🙁

    Same issue being discussed over here

    I’m having the same problem. I’ve never actually had it happen to myself, but two friends of mine have seen it. It’s popped up in IE6, IE7 and FireFox. Here’s a link to my site.

    looks fine to me in ff2 and ie7 😮


    It’s always looked fine to me as well. I only know about it because a couple of my friends have told me it has happened to them.

    Thanks for checking though Adam.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Mysterious text inserted when showing page’ is closed to new replies.