Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   [SOLVED] BUGFIX - 3.4.1->3.4.6 - Comment form will not show up after first comment on (http://forum.bytesforall.com/showthread.php?t=5031)

juggledad Dec 28, 2009 04:11 AM

[SOLVED] BUGFIX - 3.4.1->3.4.6 - Comment form will not show up after first comment on
 
UPDATE: Note the WORDPRESS BUG code fix in post #14 you need this fixed and the comment.php in post #8
==================
Update: Grab the comment.zip in post#36 to fix this
==================

There is a bug in the comment code which causes the comment form not to show up after the first comment is made on a 'PAGE' page. To fix this bug do the following

Edit comment.php and find line 79-80 (versions 341/344) which should be
HTML Code:

<?php // If comments are open
if ('open' == $post->
comment_status) : ?>

and replace them with the following
HTML Code:

<?php // If comments are open
if ( ('open' == $post->
comment_status)
OR ( is_page() and ('Yes' == $bfa_ata[comments_on_pages]) and ('open' == $post->comment_status) )) : ?>

save the file to the host and you should be all set.

Keikurono Dec 28, 2009 09:27 AM

Hi again Juggledad, thanks for the fix, works perfect... thanks again

Keikurono Dec 29, 2009 11:57 PM

Hidding comment form on specific pages
 
Hi, thanks again for the fix on the comments form but now i want to know if there is any way for hidding the form on some pages where commenting is not allowed (example > http://www.shito-anime.net/?page_id=2324)

even knowing the comments are closed, the form still appears, i want to hide it..

thanks....

jhoff Dec 30, 2009 01:06 AM

works for me too! Thanks!

http://www.betsysbabyservices.com/

juggledad Dec 30, 2009 05:45 AM

I updated the fix so the form won't show when the comments are closed on the page - Thanks to Keikurono for spotting that!

extremecarver Dec 30, 2009 07:34 AM

Well I don't know about the original fix. But the updated fix does not work for me. Form is only shown on pages without any posts. On other pages people can use "reply" but the comment form only shows for pages without any comment.

juggledad Dec 30, 2009 08:01 AM

I see I'd better go back to the drawing board and try
1) a page with no comments - comments open
2) a page with no comments - comments closed
3) a page with comments - comments open
4) a page with comments - comments closed

juggledad Dec 30, 2009 09:03 AM

1 Attachment(s)
Update, use the attached file in post #36 instead of this one - checked for 3.4.1 -> 3.4.6
================================================== =====
ok, I think I have it. A link to the page was getting dropped when the actual comments were displayed. Please try the attached version of comments.php and let me know how it goes.
Attachment 338

extremecarver Dec 30, 2009 11:57 AM

working again now. BTW is there an easy solution to put the comment field ABOVE the comments?
Even though I page my comments to 25 comments per page, newest on top, this still is a lotta text to find the comment box.

juggledad Dec 30, 2009 12:35 PM

Using the new version, you could try this.

Take lines 85-181 and put them after line 20.

Keikurono Dec 30, 2009 11:44 PM

works for me... thanks again..

edit: ehh... i'm sorry for bother you again but i have found a new problem: the link "reply to" on specific comments on a page only appears in the first (or last, depending on the order).. meaning i can only reply to that comment but no the others, is ther a way to fix that?? (http://www.shito-anime.net/?page_id=2018 < the link says "responder")

Keikurono Dec 31, 2009 05:17 AM

Quote:

Originally Posted by juggledad (Post 21791)
Using the new version, you could try this.

Take lines 85-181 and put theem after line 20.

this did not work for me.. is there another way for putting the comment form above the comments??

juggledad Dec 31, 2009 05:20 AM

Sorry, this was just a stab in the dark looking at the code for 30 seconds and giving a 'well maybe this will work'.

juggledad Dec 31, 2009 07:37 AM

Wow, Keikurono you owe me a beer!

So I started looking at the issue of only being able to reply to the last comment for a PAGE and after many twists and turns, I ended up in the WordPress module 'comment-template.php' and may have discovered a bug (which I'm asking about on the WordPress Forums - http://wordpress.org/support/topic/3...1#post-1333439).

Anyway, to fix this, edit comment-template.php (it's in the wp-includes folder) and find the function
'get_comment_reply_link' (line 999 in version 2.8.6 -> 2.9.1)

Lines 1012-1013 are
HTML Code:

        $comment = get_comment($comment);
        $post = get_post($post);

make the following change
HTML Code:

        $comment = get_comment($comment);
        $post = get_post($comment->comment_post_ID);

This will always get the post (or page in our case) ID from the comment.

ideefixx Jan 8, 2010 01:15 AM

Hi,

Done the comments.zip and all seems to be OK , but when someone submits there typing there comes a error message telling :

Failed: enter tekst

Pls see url http://www.flyingfinish.eu/nl/?page_id=421


This is not only on pages now but on the complete site.

Thank you

juggledad Jan 8, 2010 07:30 AM

it looks like you are using some javascript to handle thecomments. Are you using a plugin? fi so which and what happen it you disable the plugin

grandpa Jan 12, 2010 02:38 PM

Well done, juggledad, I had the same problem.
I used the donate button for this job.

svein-erik dahl

hlanggo Jan 20, 2010 08:18 AM

To Juggledad:

There are four files in comments.zip:
http://forum.bytesforall.com/attachm...8&d=1262189005

comment/.DS_Store - 7KB
comments.php - 6KB

_MACOSX/comment/.DS_Store - 1KB
_MACOSX/comment/comments.php - 1KB

I'm supposed to just replace -

wp-content/themes/atahualpa/comments.php - 6KB
w/
comments.php - 6KB

- right?

Or do I have to upload the other 3 files too?

juggledad Jan 20, 2010 11:44 AM

Yeah, just the comments.php

LauriePK Jan 28, 2010 11:18 AM

I'm so confused -- all I know is I'm having the same problem -- I can't add comments to pages that already have comments.

I have ata 3.4.4 and WP 2.9.1. I replaced the short code with the longer code, and I uploaded the new comments.php file.

Now I can get comments on one page ( http://theadventurouswriter.com/blog...awlik-kienlen/ ) but not the other ( http://theadventurouswriter.com/blog...t-infertility/ )

Can you please give me the correct php file to upload? And, tell me what files to delete -- should I delete the comments-paged.php file (or some other file)?

Thanks for your help,
Laurie

LauriePK Jan 28, 2010 11:27 AM

Forget my comment and question -- I fixed it! I'd just done it in the wrong order, is all :-)

Cheers

LauriePK Jan 28, 2010 11:57 AM

Actually -- I fixed that my first blog -- got the comments going there.

But I can't fix it on my other blog that has atahualpa! That one has ata 3.4.4 and WP 2.9.1 . I followed the same steps that worked for my first blog, but those didn't work for this one. I even transfered the comment.php file from the first blog to this one, but didn't work...

How can I get the comments to go on this blog, too?

http://seejanesoar.theadventurouswri...sk-a-question/

Thanks,
Laurie

juggledad Jan 28, 2010 01:50 PM

do you have ATO->Style & configure COMMENTS->Allow comments on "Page" pages, too? set to YES
AND dashboard->pages->edit->one of the pages->discussion->Allow Comments. checked off?

LauriePK Jan 28, 2010 01:57 PM

Yes, I've checked those 2 things repeatedly, and just quadrupled-checked again...both are set to "yes" I want comments on pages.

I can't figure out why it works on my other blog, but not this one.

http://seejanesoar.theadventurouswri...awlik-kienlen/

Should I be deleting comments.php file, or one of the other comment files? I didn't for my first blog...

juggledad Jan 28, 2010 03:30 PM

no, both are needed.
Is this blog on the same host?
does it have many widgets?
Do you have any security plugins?

LauriePK Jan 28, 2010 03:52 PM

Yes, both blogs are on the same host.

Both blogs have the same plugins, but none are security-minded.

Before I installed atahualpa on this troublesome blog, I used a theme that came with post thumbnails. I can't see how those posts with thumbnails would affect the comments on pages, but... ???

Maybe I'll try deleting and re-installing all the comments php files......I can't think of anything else to do! Do you think that might work?

Thanks for your help,
Laurie

LauriePK Jan 28, 2010 08:34 PM

Jeepers, now my comments are closed on a post -- and the "close comments on articles older than..." box is NOT checked off in the Discussion settings in this blog. What's up with that? Is it related to not being able to get comments on pages?

juggledad Jan 29, 2010 09:38 AM

The way I understand it You can have wordpress automatically close discussions after a certain number of days so by having that option NOT checked, the discuession on posts will remain open forever...unless
there is a setting on each post that allows discuession for a post to be allowed or not. It comments are allowed, you should be able to comment on that post.

Reinstalling the theme shouldn't effect either of these settings

LauriePK Jan 30, 2010 07:38 AM

I fixed it! :-)

juggledad Jan 30, 2010 10:04 AM

What did you do?

LauriePK Jan 30, 2010 10:16 AM

I made a mistake the first time I copied the comment.php file to my FTP -- I copied the folder, not the file. Not sure why I made this mistake when I did it correctly the first time....I'm chalking it up to a long day :-)

So, I just followed your original instructions again (the next day, when I was fresh), and voila! Comments on pages -- yay.

Still don't know why one of my posts doesn't allow comments, though. The correct boxes are checked....

http://seejanesoar.theadventurouswri...nality-traits/

This is an odd one.

Laurie

juggledad Jan 30, 2010 11:26 AM

try taking out the related posts and share this to see if that changes things

nello Feb 3, 2010 10:31 AM

Thanks for the fix.
BTW, this bug is still in 3.4.5 and this should be fixed before the next release, since your fix is good

griffinjay Feb 4, 2010 07:38 AM

Yep, the fix worked for me, too. I'm using Atahualpa 3.4.4.

It would good to have a comment posted here when this glitch is fixed with a new version.

babak Feb 12, 2010 04:03 PM

Quote:

Originally Posted by juggledad (Post 21593)
==================
Update: Grab the comment.zip in post#8 to fix this
==================

There is a bug in the comment code which causes the comment form not to show up after the first comment is made on a 'PAGE' page. To fix this bug do the following

Edit comment.php and find line 79-80 (versions 341/344) which should be
HTML Code:

<?php // If comments are open
if ('open' == $post->
comment_status) : ?>

and replace them with the following
HTML Code:

<?php // If comments are open
if ( ('open' == $post->
comment_status)
OR ( is_page() and ('Yes' == $bfa_ata[comments_on_pages]) and ('open' == $post->comment_status) )) : ?>

save the file to the host and you should be all set.

Hi,
I'm having the same problem.

I did replace the code in comment.php, but I'm still experiencing the same problem. Only one comment is accepted on pages.

juggledad Feb 13, 2010 05:24 AM

1 Attachment(s)
NOTE: There are two parts to fix this problem

1) replace comment.php in the atahualpa folder with the attached file (unzip it first) and
2) fix the WordPress code described in post 14

Attachment 392

Hamlet Mar 5, 2010 04:14 PM

Thank you man my comment box is now back!:)

alamperti Mar 6, 2010 05:41 AM

@juggledad comments on pages restored! thanks, donation sent.

cheers from Italy :)

lmt Apr 7, 2010 01:57 AM

Quote:

Originally Posted by juggledad (Post 25477)
NOTE: There are two parts to fix this problem

1) replace comment.php in the atahualpa folder with the attached file (unzip it first) and
2) fix the WordPress code described in post 14

Attachment 392

Hi Juggledad:

I am trying to fix this bug but having problems.

1. I cannot unzip the file because it says I do not have the program on my computer to open the attached file for comment.php What file can I download to unzip the comment.php file?

2. I am having problems finding the file you mentioned in post 14. Is it the same as the comment.php file or in the FTP files? :confused:

juggledad Apr 7, 2010 04:14 AM

1) do a google search for 'unzip programs' and download one for your operating system

2) this is one of WordPress's files
Quote:

...edit comment-template.php (it's in the wp-includes folder) and find the function...


All times are GMT -6. The time now is 02:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.