Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Comment post gives white page WordPress

  • SOLVED

Hello there. I have a rather peculiar problem. I'm developing a theme, and when posting comments, I get a blank page. And I have no clue whats causing it!

See: http://mightywp.freepsdtheme.com/can-avatar-sweep-the-oscar/

Now, here's what makes it odder. On another host site, using the same theme, comments work perfectly fine!

See it here: http://mighty.rohansync.com/hello-world

And, if I use the Default theme, comments work just fine.

Both servers are from MediaTemple, so its obviously not a host-specific thing.

I'd like you to figure out the problem - I've tried, to no avail.

Answers (4)

2010-04-07

Buzu B answers:

have you modified any of the templates? the difference I'm seeing is that the first one is not redirecting properly.IT actually is not even catching any error or saving any data. If i send a comment with the comments fields empty, it doesn't tell me to type a comment, so I'm guessing the issue is in wp-comments-post.php.

Another possibility, if you have not modified the theme is that the wp installation in the first case is too old to work, or too new. I see the first site gives a notice (hard to reproduce):

<blockquote>
Notice: get_the_author_email is deprecated since version 2.8! Use get_the_author_meta('email') instead. in /nfs/c06/h03/mnt/92973/domains/mightywp.freepsdtheme.com/html/wp-includes/functions.php on line 2970
</blockquote>

The second site doesn't give any Notice. It would help a lot to see the code of comment.php on your theme and wp-comments-post.php on your wp directory. That is only if you have modified any of those files, otherwise, I guess it will make no difference and we have to look for the problem somewhere else.


Sync comments:

I corrected the error after seeing it just a few minutes ago.
comments.php and wp-post-comments.php are the same on both installs.
And both installs are WP 2.9, installed within a day of each other.


Buzu B comments:

this is an interesting problem. My guess is that one of the files got corrupted for some reason. Since the installation works just fine with the default theme, what I would do is to upload the theme again and see if that solves the problem. It is a bit difficult to solve the problem without being able to test and see everything firsthand, so my inly suggestion right now is that. You can try, if you want, but theres is no guarantee it will work.


Buzu B comments:

I confirm. Using the default theme works fine. The problem is with the theme.


Sync comments:

Yup, true. But why does the EXACT same theme work on the other server?


Buzu B comments:

Like i said, my guess is one of the files got corrupted. It happens sometimes. Upload the theme again and see how that works...


Sync comments:

I'm trying that :-)


Sync comments:

Re-uploaded the entire theme by FTP, no change.


Buzu B comments:

yeah, problem persists. I need to be on my way to school. I hope your problem gets solved soon.


Sync comments:

Thanks mate.


Buzu B comments:

Hey dude, it is working now...


Buzu B comments:

UGG, Im' running late... did you change anything? if you didn't maybe it was just a matter of the cache clearing out before the new theme started working. I did something but it is not likely to be the reason of the fix, but after doing that it just worked. What I did was to change the action of the form in the first site to point to the second site. It saved a comment on the second site. Then I went to the first site again, added a comment and it just worked. It is a bit silly to think that had something to do with solving the problem, but to think that that cleared the cache on my computer thus pulling the new file from the server is not so. If you didn't change anything I guess that is what happened.


Sync comments:

Honestly, I think the problem was with my zip software, 7zip. When I uploaded from FTP, it worked fine.

thanks man. Though it feels weird to me for paying $17 for such a silly error, you still helped a lot. Good job :-)

2010-04-07

Erez S answers:

the problem is'nt with the theme,try to install another theme and see if there is a problem,if not,try to reupload the files and then to reinstall wordpress because the problem is from the installation or from the core files


Sync comments:

As I said, the comments work fine if using the Default theme.


Erez S comments:

and the themes on both sites is exactly the same?


Sync comments:

Yep. Apart from the error I just fixed.


Erez S comments:

can you put the default theme for a moment?


Erez S comments:

when i'm using the form of the default theme and redirect the information to your site,it still shows blank page


Sync comments:

I've activated the default theme. Comments work.


Erez S comments:

ok,now put the old theme back,i think i found something


Sync comments:

Gimme a minute. I'm reuploading the theme. Trying Buzu B's suggestion that a file may be corrupt.


Sync comments:

Old theme is active again.


Erez S comments:

can you give me the following files:comments.php and functions.php


Sync comments:

comments.php -> http://pastie.org/private/qhkglllnpaqiq6c0lupnsq
functions.php -> http://pastie.org/private/6ovztnwxcffzcblvt6ydgq

2010-04-07

Utkarsh Kukreti answers:

Could you post the server error logs or add this to wp-config.php

define('WP_DEBUG', true);

This will help us to identify the problem.


Sync comments:

You only want this on the error giving site, right?
Done, btw.


Utkarsh Kukreti comments:

I don't see any error appearing. Could you try looking for the PHP error log?
http://kb.mediatemple.net/questions/663/System+Paths


Sync comments:

OK, but <strong>what</strong> do I need to look for?

2010-04-07

Martin answers:

Try this. Backup your database. Now go into phpmyadmin and select your WordPress database then select all the tables and select "Repair Table".

See if that fixes your problem!


Sync comments:

Sorry, didn't work :(