WordPress.org

Ready to get started?Download WordPress

Forums

Comment-meta outputs weird characters (2 posts)

  1. psaad
    Member
    Posted 4 years ago #

    Whenever a user inputs a comment in any post a weird character set outputs on the posts comment all the time right under the username for that comment. See example here:
    http://blog.1ereavenue.com/joseph-ribkoff/leah-making-post/comment-page-1/#comment-4

    --> %A %B %e%q, %Y at %I:%M %p

    It links to itself...

    I looked at the source code and this is what this part shows:
    http://screencast.com/t/4QnPKSFvo

    As for the template file, i searched in my files for the reference
    comment-meta commentmetadata
    and this is what i found in includes/comment-template.php

    <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'&nbsp;&nbsp;','') ?></div>

    As for my comments.php file it contains the following:

    <!-- You can start editing here. -->
    
    <?php if ( have_comments() ) : ?>
    	<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
    
    	<div class="navigation">
    		<div class="alignleft"><?php previous_comments_link() ?></div>
    		<div class="alignright"><?php next_comments_link() ?></div>
    	</div>
    
    	<ol class="commentlist">
    	<?php wp_list_comments(); ?>
    	</ol>
    
    	<div class="navigation">
    		<div class="alignleft"><?php previous_comments_link() ?></div>
    		<div class="alignright"><?php next_comments_link() ?></div>
    	</div>
     <?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed.</p>
    
    	<?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <div id="respond">
    
    <h3>Post a comment:</h3>
    
    <div class="cancel-comment-reply">
    	<small><?php cancel_comment_reply_link(); ?></small>
    </div>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
        		<textarea name="comment" id="comment" cols="102" rows="8" tabindex="1" style="width:560px; height:150px; margin-top:10px; font-size:12px; padding-left:20px; padding-top:20px; padding-bottom:20px; padding-right:20px; line-height:18px; border:none; background-color:#1b1414; color:#FFFFFF;"/></textarea>
               <br /><br />
               <h3>Your Name</h3>
               <input name="name" value="<?php echo $comment_author; ?>" id="name" size="40" tabindex="3" style="background-color:#1b1414; border:hidden; color:#FFFFFF; padding-left: 20px; padding-top:10px; padding-bottom:12px; padding-right:20px; font-size: 12px; margin-top:10px;"  <?php if ($req) echo "aria-required='true'"; ?> />
    
               <br /><br />
               <h3>Your Email Address</h3>
               <input type="text" name="email" value="<?php echo $comment_author_email; ?>" id="email" size="40" tabindex="3" style="background-color:#1b1414; border:hidden; color:#FFFFFF; padding-left: 20px; padding-top:10px; padding-bottom:12px; padding-right:20px; font-size: 12px; margin-top:10px;" <?php if ($req) echo "aria-required='true'"; ?> />
    
             <br /><br />
            <input name="submit" type="submit" id="submit" tabindex="5"  value="Submit" />
    
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>

    Does anyone have a clue why i have these weird characters?

    Also maybe someone can point me in the right direction, if you try to enter a comment and u fill in ur name and email, it doesn't submit the comment it tells me :

    Error: please fill the required fields (name, email).

    Any help would be appreciated.
    Thanks.
    Patrick

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    There's nothing obviously wrong with either includes/comment-template.php or your theme's comments.php file. Try:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-related problems.

Topic Closed

This topic has been closed to new replies.

About this Topic