Support » Fixing WordPress » comments broken? Help please…

  • greetings to all fellow wordpress blogger.

    for some strange reason my comments function does not want to work. I’ve played around with the setting within the wordpress manager but to little avail.

    can you please help? It’s online here:



    ps. I had tried to change the uri but it broke down my entire site…the one I have currently seems to work…

Viewing 15 replies - 1 through 15 (of 15 total)
  • It appears that your permalinks are messed up. They all go to instead of the individual posts.

    I would try going into your Admin section, Options, Permalinks and change them to the default setting just to see if comment pages show up properly again. I always use the Date and Name based version.

    Mark, thanks. it wasnt that. i changed to default and it was still doing the same thing. it must be something else i’ve messed up…

    The two articles on your front page both link to /projects

    That would imply to me that something is a bit borked in your theme’s index.php. Have you made any recent changes in there around the associated h2 of the article’s title?

    I don’t think so. the project is the category i’ve set for all the posts so this should be right. the only twicking of the html code i remember doing was change the sidebad titles from pages –> to projects and adding my bit there with my pic and brief descriptions that’s all.

    the other thing that seems not to work well is the order of the titles on the right (under the project sections). they don’t seem to use the order i specify from the control panel.

    not sure if that helps but i host my account with 1&1 and I have several domain names with the same account. I may need to upgrade and re-install everything, i am getting bored with that theme anyway but i’d hate loosing all this work and it all feels way too fragile…



    Hmm… Typically, clicking an article’s title should take me to a “single view” of that article.

    If you haven’t changed code, do you have a plugin that’s changing the article link to a category link?

    If you disable all plugins, do the links work as one might expect them to?

    i am almost hopeless about the situation…the only thing that comes close to what you are talking about is my changing the permalinks structure by definining a special %category% tag….but setting this to default doesn’t change anything…

    i don’t really have any plugging installed that could influence this (i think)

    the thing is that i don’t remember the comments function ever working (although the akimet pluging mentioned that it blocked about 22 comments since i installed that…i’ve now deactivated but it still doesn’t work)


    Hmmmm… I wonder if the .htaccess file in your blog’s directory has some messed up redirection, mod_rewrite rules or something in it perhaps?

    If you see anything in there that looks like it might have to do with the blog, try removing it. Make a backup of the file first. (or you could just rename the file temporarily).

    That doesn’t explain all the post links having the same URL though. Clear the category field at the bottom of the Permalink option screen as well.

    Is your blog’s root folder the same as your domain?

    I think the actual root folder is different but when i tried changing the uri I broke everything down and I had to go into the sql tables to fix things.

    i just tried running the wp-settings file here

    and i got a different root folder…do you think if I put this anywhere it will change things? I can’t seem to get to the .htaccess file. I download it but it’s nowhere to be found on my mac…


    Well, I don’t think the .htaccess is really the problem. Even looking at your blog’s feed at all the posts go to the same projects URL and not the individual posts.

    I could somewhat duplicate your problem by directly changing the “permalink_structure” field in the “wp_options” table of the database to be “/projects”. Then, all my post URLs would be

    I was able to correct it by either replacing it with the value that was there, or changing the permalinks in options again. After I made that change, the permalinks options did show a customized setting of /projects and then the correct setting after I changed it. So, that may not be it.

    If you edit the Contagious moods post, what does the Post Slug on the right side show for it?

    The only other thought I have is that you’ve modified the main index template in the theme editor such that it’s not calling the_permalink() function to create the URL and it’s hard-coded to be “projects”.

    <?php get_header(); ?>
    	<div id="content" class="narrowcolumn">
    	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y'); ?> by <?php the_author(); ?> </small>
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				<p class="postmetadata" style="clear: both;">Posted in <?php the_category(', '); ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    		<?php endwhile; ?>
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries'); ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;'); ?></div>
    	<?php else : ?>
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    	<?php endif; ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    the post slug writes: contagious-moods-and-positive-blips

    the project is set as the category and the comments and pings are ticked as they should be.

    I will try to check the code…not sure how far i will go.

    many thanks for your interest and time by the way.


    this is what i have in my comments.php file

    <?php // Do not delete these lines
    	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die ('Please do not load this page directly. Thanks!');
            if (!empty($post->post_password)) { // if there's a password
                if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    				<p class="nocomments">This post is password protected. Enter the password to view comments.<p>
    		/* This variable is for alternating comment background */
    		$oddcomment = 'alt';
    <!-- You can start editing here. -->
    <?php if ($comments) : ?>
    	<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3> 
    	<ol class="commentlist">
    	<?php foreach ($comments as $comment) : ?>
    		<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
    			<cite><?php comment_author_link() ?></cite> Says:
    			<?php if ($comment->comment_approved == '0') : ?>
    			<em>Your comment is awaiting moderation.</em>
    			<?php endif; ?>
    			<br />
    			<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
    			<?php comment_text() ?>
    	<?php /* Changes every other comment to a different class */
    		if ('alt' == $oddcomment) $oddcomment = '';
    		else $oddcomment = 'alt';
    	<?php endforeach; /* end for each comment */ ?>
     <?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) : ?>
    <h3 id="respond">Leave a Reply</h3>
    <?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 the_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">
    <?php if ( $user_ID ) : ?>
    <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
    <?php else : ?>
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>Website</small></label></p>
    <?php endif; ?>
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    <?php do_action('comment_form', $post->ID); ?>
    <?php endif; // If registration required and not logged in ?>
    <?php endif; // if you delete this the sky will fall on your head ?>

    I’m more interested in the index.php file in your theme’s directory, to compare it to mine.

    … and let’s use (or another pastebin) for that source instead of dropping it all into here!

    Thanks. 🙂

    apologies HandySolo I was not aware of your rules…how can i send you the index.php file then MarkH?

    I worked it out this is very good by the way:

    here is the link to my single.php file (maybe something is wrong with the reference to the comments php file – i think)

    and here is the link to my index.php

    and the link to my comments.php

    they are all takes from the wordpress default theme…i assume this is the kubrik one i use…

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘comments broken? Help please…’ is closed to new replies.