Unable to hide "Comment From Closed" message on pages

Reports about issues that you encounter in Suffusion. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is being officially closed with effect from 3rd February 2019. Future support requests can be posted on the GitHub page at https://github.com/sayontan/suffusion/issues.
Wolftalker
Posts: 10
Joined: 27 Mar 2010, 01:43

Re: Unable to hide "Comment From Closed" message on pages

Post by Wolftalker » 28 Jul 2010, 23:16

STEP BY STEP INSTRUCTIONS ON HOW TO RESOLVE THIS ISSUE - FOR FELLOW TRAVELLERS WHO DO NOT UNDERSTAND TECH SPEAK AND THUS REQUIRE EASY TO FOLLOW POINTERS.

1. Go to your Wordpress 'Dashboard'
2. Go to left sidebar and hit 'Appearance'
3. On Appearance drop down menu, hit 'Editor'
4. This brings you to 'Edit Themes' page. On right sidebar listed under 'Templates' hit 'Comments'
5. This brings you to the 'comments.php' page that people have been talking about. And here is where you will use the instructions reproduced below.

If anyone finds this step by step process useful, then, whenever possible, I encourage you to do the same when posting regarding any issue.

Fare well amigos.
http://australianhousesforsale.com.au/
sayontan wrote:Okay - I guess the massive code rewrite did some damage to the comments file. Here is the fix:
1. First upgrade to 3.5.7 (otherwise you will have worse problems to handle)
2. Open comments.php and look for this block:

Code: Select all

       foreach ($options as $value) {
          if (isset($value['id']) && isset($value['std'])) {
             if (!isset($suffusion_options[$value['id']])) {
                $$value['id'] = $value['std'];
             }
             else {
                $$value['id'] = $suffusion_options[$value['id']];
             }
          }
       }
3. Change it to:

Code: Select all

       foreach ($options as $value) {
          if (isset($value['id'])) {
             if (!isset($suffusion_options[$value['id']]) && isset($value['std'])) {
                $$value['id'] = $value['std'];
             }
             else {
                $$value['id'] = $suffusion_options[$value['id']];
             }
          }
       }

jonweb
Posts: 9
Joined: 21 Jul 2010, 05:28

Re: Unable to hide "Comment From Closed" message on pages

Post by jonweb » 29 Jul 2010, 13:52

I support step by step directions though i didn't need them. I'm not getting consistent results after this change. Some of my pages don't show anything while others still show, "Sorry, the comment form is closed at this time." Any thoughts? Or things I could look into to resolve this?

Thank you.

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Unable to hide "Comment From Closed" message on pages

Post by sayontan » 29 Jul 2010, 13:57

Which site? Which pages? Did you ensure that the pages are selected in Blog Features -> Comment Settings?

jonweb
Posts: 9
Joined: 21 Jul 2010, 05:28

Re: Unable to hide "Comment From Closed" message on pages

Post by jonweb » 29 Jul 2010, 14:09

Thank you, I didn't realize I would need to go back and add pages to the list as I created them. I would have linked the site but it is only on an internal server currently. Your theme is one of my favorites.

sillycar
Posts: 3
Joined: 28 Jul 2010, 01:25

Re: Unable to hide "Comment From Closed" message on pages

Post by sillycar » 29 Jul 2010, 21:25

Just in case it helps someone else, I was using TextWrangler to copy and paste the code, I've done this tons of times with other code for Wordpress files and never had an issue, but it seems that this time it was causing an issue. When I tried it with the editor in the dashboard of Wordpress, it worked! Son of a....
Thanks to everyone for your input!
Great Theme!

User avatar
Connie
Posts: 1169
Joined: 10 Nov 2009, 04:53
Contact:

Re: Unable to hide "Comment From Closed" message on pages

Post by Connie » 29 Jul 2010, 23:16

As I am in holidays, I did not visit this forum for some time and I did not blog in my page very often.
Today I noticed the "Comments are closed.." notice in my blog and followed Wolftalker''s instructions.

It worked and now the message is gone.

I hope the release of the next version will go throught WP-release-checks faster than the last ones so editing the files will not be necessary any more, until then Wolftalkers Step-List will help everybody to loose the fear of editing!

Cheers, and thank you,
Connie

brainseo
Posts: 5
Joined: 24 Jun 2010, 03:28

Re: Unable to hide "Comment From Closed" message on pages

Post by brainseo » 30 Jul 2010, 01:41

i had the same problem after upgrading to 3.5.7
but i made this changes and now it's all good.

thanks.
Wolftalker wrote:STEP BY STEP INSTRUCTIONS ON HOW TO RESOLVE THIS ISSUE - FOR FELLOW TRAVELLERS WHO DO NOT UNDERSTAND TECH SPEAK AND THUS REQUIRE EASY TO FOLLOW POINTERS.

1. Go to your Wordpress 'Dashboard'
2. Go to left sidebar and hit 'Appearance'
3. On Appearance drop down menu, hit 'Editor'
4. This brings you to 'Edit Themes' page. On right sidebar listed under 'Templates' hit 'Comments'
5. This brings you to the 'comments.php' page that people have been talking about. And here is where you will use the instructions reproduced below.

If anyone finds this step by step process useful, then, whenever possible, I encourage you to do the same when posting regarding any issue.

Fare well amigos.
http://australianhousesforsale.com.au/
sayontan wrote:Okay - I guess the massive code rewrite did some damage to the comments file. Here is the fix:
1. First upgrade to 3.5.7 (otherwise you will have worse problems to handle)
2. Open comments.php and look for this block:

Code: Select all

       foreach ($options as $value) {
          if (isset($value['id']) && isset($value['std'])) {
             if (!isset($suffusion_options[$value['id']])) {
                $$value['id'] = $value['std'];
             }
             else {
                $$value['id'] = $suffusion_options[$value['id']];
             }
          }
       }
3. Change it to:

Code: Select all

       foreach ($options as $value) {
          if (isset($value['id'])) {
             if (!isset($suffusion_options[$value['id']]) && isset($value['std'])) {
                $$value['id'] = $value['std'];
             }
             else {
                $$value['id'] = $suffusion_options[$value['id']];
             }
          }
       }

mbnoimi
Posts: 9
Joined: 08 Aug 2010, 18:51
Location: Aleppo, Syria
Contact:

Re: Unable to hide "Comment From Closed" message on pages

Post by mbnoimi » 08 Aug 2010, 18:56

I've same issue too but I didn't upgrade it to any version !

I'm already using version 3.5.7 and the message "Comments are closed.." appears although I edited comments.php as mentioned in the earlier replies

Code: Select all

if (!isset($suffusion_options[$value['id']]) && isset($value['std'])) {
			if (!isset($suffusion_options[$value['id']])) {
				$$value['id'] = $value['std'];
			}
			else {
				$$value['id'] = $suffusion_options[$value['id']];
			}
		}
here is whole comments.php contents:

Code: Select all

<?php
/**
 * Threaded comments
 *
 * @package Suffusion
 * @subpackage Templates
 */
?>
<div id="comments">
<?php // Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
        die ('Please do not load this page directly. Thanks!');
    }
	if ( post_password_required() ) { ?>
		<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments.", "suf_theme");?></p>
		</div> <!-- #comments -->
	<?php
		return;
	}
	global $options, $suffusion_options, $post;
	foreach ($options as $value) {
		// if (isset($value['id']) && isset($value['std'])) {
		if (!isset($suffusion_options[$value['id']]) && isset($value['std'])) {
			if (!isset($suffusion_options[$value['id']])) {
				$$value['id'] = $value['std'];
			}
			else {
				$$value['id'] = $suffusion_options[$value['id']];
			}
		}
	}

// Begin Comments & Trackbacks
if ( have_comments() ) { ?>
<h3 class="comments">
	<?php printf(__('%1$s to &#8220;%2$s&#8221;', "suf_theme"), comments_number(__('No Responses', "suf_theme"), __('One Response', "suf_theme"), __('% Responses', "suf_theme")), get_the_title($post->ID));?>
</h3>
<?php
	suffusion_split_comments();
//	suffusion_comment_navigation(); // Cannot have comment navigation before listing the comments, because at this point we don't know if we are getting all comments or if we are separating out pingbacks and trackbacks
	suffusion_list_comments();?>
	<?php
	suffusion_comment_navigation();
	// End Comments
} ?>

<?php if ('open' == $post->comment_status) : ?>

<div id="respond">

<h3 class="respond"><?php comment_form_title( __('Leave a Reply', "suf_theme"), __('Leave a Reply to %s', "suf_theme") ); ?></h3>

<?php if ( get_option('comment_registration') && !$user_ID ) { ?>
<p><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e("You must be logged in to post a comment.", "suf_theme");?></a></p>
<?php }
else { ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php
if ( $user_ID ) {
	$logged_in_url = "<a href=\"".get_option('siteurl')."/wp-admin/profile.php\">".$user_identity."</a>";
	?>

<!--<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>-->
<p><?php printf(__('Logged in as %s. ', 'suf_theme'), $logged_in_url); ?>
<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account"><?php _e("Log out","suf_theme");?> &raquo;</a></p>
<?php
}
	else {
		$label_style = $suf_comment_label_styles == "plain" ? "" : " fancy ";
?>

	<p>
	<label for="author" class="<?php echo $label_style; ?>"><?php _e('Name', "suf_theme"); ?></label>
	<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
	<?php if ($req) _e('(required)', "suf_theme"); ?>
	</p>

	<p>
	<label for="email" class="<?php echo $label_style; ?>"><?php _e('E-mail', "suf_theme"); ?></label>
	<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" class="textarea" />
	<?php if ($req) _e('(required)', "suf_theme"); ?>
	</p>

	<p>
	<label for="url" class="<?php echo $label_style; ?>"><?php _e('<acronym title="Uniform Resource Identifier">URI</acronym>', "suf_theme"); ?></label>
	<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" class="textarea" />
	</p>

	<?php } ?>

	<p>
	<label for="comment" class="textarea <?php if (isset($label_style)) echo $label_style; ?>"><?php _e('Your Comment', "suf_theme"); ?></label>
	<textarea name="comment" id="comment" cols="60" rows="10" tabindex="4" class="textarea"></textarea>
	</p>

<div class="cancel-comment-reply">
	<small><?php cancel_comment_reply_link(); ?></small>
</div>

	<?php comment_id_fields(); ?>
	<?php do_action('comment_form', $post->ID); ?>
	<p>
	<input name="submit" id="submit" type="submit" tabindex="5" value="<?php _e('Submit Comment', "suf_theme"); ?>" class="Cbutton" />
	</p>
</form>
<?php } ?>
</div>
<?php else : // Comments are closed
    $message_disabled = false;
    if (is_page() && $suf_comments_disabled) {
        $disabled_pages = explode(',', $suf_comments_disabled);
        if (is_array($disabled_pages) && count($disabled_pages) > 0 && in_array($post->ID, $disabled_pages)) {
            $message_disabled = true;
        }
    }
    else if (is_singular() && !is_page() && $suf_comments_disabled_msg_for_posts == 'hide'){
        $message_disabled = true;
    }
		if (!$message_disabled) {
?>
<p><?php _e('Sorry, the comment form is closed at this time.', "suf_theme"); ?></p>
<?php
		}
?>
<?php endif; ?>
</div>
and here my conversation configs:
2010-08-09_044052.png
my conversation configs
2010-08-09_044052.png (23.26 KiB) Viewed 5782 times
could you please help me?

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Unable to hide "Comment From Closed" message on pages

Post by sayontan » 08 Aug 2010, 19:56

You need to select the pages in Blog Features -> Comment Settings.

mbnoimi
Posts: 9
Joined: 08 Aug 2010, 18:51
Location: Aleppo, Syria
Contact:

Re: Unable to hide "Comment From Closed" message on pages

Post by mbnoimi » 08 Aug 2010, 22:04

You need to select the pages in Blog Features -> Comment Settings.
sure I selected pages but it not works !

Locked