WordPress.org

Ready to get started?Download WordPress

Forums

Sorry, the comment form is closed at this time. (Help...) (14 posts)

  1. bahia0019
    Member
    Posted 5 years ago #

    Hi all.
    Website in question is http://www.williambayphotography.com
    This is a fresh install of 2.6 from a few months ago. I have not upgraded to 2.6.1.
    I just noticed this problem. I am not sure when this occurred, but comments were working fine at least a month ago.
    Now however when you open a post page, the comment box is no longer available and I get this message instead: "Sorry, the comment form is closed at this time."

    I have "Commenter must fill out email and name" checked, but there is no place for you to put your name or email currently.

    This occurs when I am logged in or not.

    I thought that maybe it has to do with something in the comments.php template file, but with my limited php knowledge really can't quite determine what the problem would be.

    I have included the code from my comments.php in the hopes that someone may point out what the problem is...

    <?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
    <p><?php _e('Enter your password to view comments.'); ?></p>
    <?php return; endif; ?>
    
    <h2 id="comments"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>
    <?php if ( comments_open() ) : ?>
    	<a href="#postcomment" title="<?php _e("Leave a comment"); ?>">&raquo;</a>
    <?php endif; ?>
    </h2>
    
    <?php if ( $comments ) : ?>
    
    <?php foreach ($comments as $comment) : $i++; ?>
    	<div id="commentbox">
    	<div class="commentid">
      		<a href="#comment-<?php comment_ID() ?>"><?php if ($i % 2) echo; ?> <?php echo $i; ?></a> </div>
    		<!-- if you use gravatars <a href="http://www.gravatar.com"><img src="<?php // gravatar("R", 80, "gravatar.gif", "" ); ?>" alt="Get your own gravatar for comments by visiting gravatar.com" class="gravatar" /></a>	-->
    		<p class="commentby"><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?></p>
    		<p class="commentinfo"><?php comment_date() ?> @ <?php comment_time() ?> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
    	<?php comment_text() ?>
    	</div>
    
    <?php endforeach; ?>
    
    <?php else : // If there are no comments yet ?>
    	<p><?php _e('No comments yet.'); ?></p>
    <?php endif; ?>
    
    <p><?php comments_rss_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.')); ?>
    <?php if ( pings_open() ) : ?>
    	<a href="<?php trackback_url() ?>" rel="trackback"><?php _e('TrackBack <abbr title="Uniform Resource Identifier">URI</abbr>'); ?></a>
    <?php endif; ?>
    </p>
    
    <?php if ( comments_open() ) : ?>
    <h2 id="postcomment"><?php _e('Leave a comment'); ?></h2>
    
    <?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="<?php _e('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) _e('(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) _e('(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><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; ?>" />
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    <p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>
    
    <?php endif; // If registration required and not logged in ?>
    
    <?php else : // Comments are closed ?>
    <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
    <?php endif; ?>
  2. mrmist
    Forum Janitor
    Posted 5 years ago #

    Are you running any plugins that might affect the comments?

    Such as comment timeout plugins, anti-spam stuff, etc?

  3. bahia0019
    Member
    Posted 5 years ago #

    Thanks for replying.

    No plugin conflict...
    I just went through and tested all deactivated. There were 4 or 5 that needed upgrading. I did that was well, testing after each plugin upgrade to try to isolate any problems.

  4. TrishaM
    Member
    Posted 5 years ago #

    Did you by any chance remove the wp_meta code from the theme? Generally it is in the sidebar.php file......and I don't see anywhere to log in.......that is why you are getting that message (see the end of your code above)

    <?php endif; // If registration required and not logged in ?>
    
    <?php else : // Comments are closed ?>
    <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
    <?php endif; ?>

    If you don't have the login code somewhere on the page then no one can log in unless they type in the addess bar (yoursite.cm/wp-login.php).....the code generally looks something like this, but yours could be a little bit different:

    <li><h2><?php _e('Meta'); ?></h2>
    				<ul>
    					<?php wp_register(); ?>
    					<li><?php wp_loginout(); ?></li>
    					<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
    					<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
    					<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>">WordPress</a></li>
    					<?php wp_meta(); ?>
    				</ul>
    			</li>

    ALSO I noticed that your theme does not have any obvious links back to your home page which can make it tough for people to navigate your site and get back to your home page if they want to.....

  5. bahia0019
    Member
    Posted 5 years ago #

    OK Yes,
    I moved the log-in into my footer. Would that affect anything?

    And I tried it not logged in, wouldn't that at least show me that I have to provide name and email?

    Home is actually the Wedding section, I'd much rather have a keyword than "home", but I do see how that can confuse people, not sure how to resolve that.

    Thanks

  6. bahia0019
    Member
    Posted 5 years ago #

    Trisha,
    I tried using the entire code you suggested. But that, unfortunately, does not solve the problem.

    Thank you for your suggestion though.

  7. TrishaM
    Member
    Posted 5 years ago #

    After you pointed out that it moved to the footer, I did see that - very easy to overlook the first time......and I noticed that you put it back in the sidebar.....I also noticed no link to register in your footer - do you plan to leave it back in the sidebar, or add a "register" link to your Footer? So that people can register?

    Also I must ask, why do you require people to register at all? I'm only asking because many site visitors will not register - is there a benefit to them? Is it for your customers so that they can view their photos? I'd be happy to register to test some more if that helps.

    Basically your comments code says that if the site visitor is not logged in, then it is to display the message you see ('Sorry, the comment form is closed at this time.'). You could modify that file to include the register/login links as well, and maybe have it say "Sorry but you must be logged in to comment." Then display the Login link or even a login username/password box, then below that show something like: "Not a registered User? Use the registration link to sign up." with a register link.

  8. TrishaM
    Member
    Posted 5 years ago #

    Oooh I also wanted to comment on your home page strategy....

    Using a keyword for your pages is always good SEO advice, however, it will definitely confuse your site visitors, and you aren't getting the right SEO juice from it anyway, because in your case you don't do "weddings", you do "wedding photography", and there are way too many other actual wedding sites competing for the keyword "weddings". You would be better off to just use the clear, descriptive word "Home" for your home page, and then have another Page called "Weddings" (or better yet "Wedding Photography") upon which you have your keyword-rich content, with those other pages (gallery, faqs, etc) as subpages of Weddings, instead. That will also work your keyword into the URL (http://williambayphotography.com/weddings/ or again, better still http://williambayphotography.com/wedding-photography/). That way you'll get more juice as your URL will match your content, which will match your keyword.....

  9. bahia0019
    Member
    Posted 5 years ago #

    I just unchecked "Users must be registered and logged in to comment"
    And I still see the same thing whether I'm logged in or not.

    I probably won't leave the Meta, since I don't really need to have anyone register. A email and name is fine for me.

  10. TrishaM
    Member
    Posted 5 years ago #

    take another look at your posts to be sure that the "allow comments" box is checked - if you had started out not allowing comments then any accumulated posts already published would not have that box checked, even if later you went back and allowed comments......

  11. bahia0019
    Member
    Posted 5 years ago #

    Got it. Your last suggestion was the issue. For some reason that option was unchecked on all posts...
    Not sure why.

    Thank you for your troubleshooting help!!!

  12. wpdools
    Member
    Posted 5 years ago #

    Hello, I've got the same problem. I've been using WordPress for a couple years. During the last few days the Allow Comments options is now unchecked on all my posts (nearly 800). I don't have designs on going into each and rechecking them. Any ideas?

  13. stacionari
    Member
    Posted 5 years ago #

    The way I resolved this problem was to make another editing window opened with the same post. Then I deleted the post and started a new one. I copy-pasted html code from another opened window to new one, together with the remaining fields (tags, seo etc..). When I published again, the comments was reactivated.

  14. moshu
    Member
    Posted 5 years ago #

    Why is everybody missing the main point?
    This message

    "Sorry, the comment form is closed at this time."

    appears when the comments are closed either globally (in admin > Settings Discussion) or on a post by post basis (when Write... "allow comments" unchecked).

    The rest is just over-complication.

Topic Closed

This topic has been closed to new replies.

About this Topic