treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Blank page for WordPress feed: what to fix?

  • Hi --

    I just moved a WordPress site from a temporary URL to a permanent location. I re-installed WordPress using a script installer. (originally I tried to copy the development files, but the server connection wasn't reliable enough, and transfers kept failing).

    Every thing is working except the feed: http://motivationfactor.com/feed. It was causing a 500 server error before -- now it causes a blank page.

    I think there is something wrong with my theme or installation. Can you help me narrow it down?

    I've tried -disabling all plugins -checking wp-config.php and removing a blank line at the end - checking index.php in my child theme folder for a blank line or coding error.

    What else could I do to find the problem?

  • Correction: The blank page is at http://motivationfactor.com/news
    (I need more sleep!)

  • If it isn't on already, try turning on PHP error reporting. If there are any code errors, it will then tell you.

  • OK -- since I don't have access to php.ini to turn on error reporting, I'm using Error Log Monitor WordPress plugin By Janis Elsts (wonderful).

    The warning logged is:

    PHP Warning: call_user_func_array(): First argument is expected to be a valid callback, 'analyticscode' was given in /usr/local/pem/vhosts/100758/webspace/siteapps/WordPress-4603/htdocs/wp-includes/plugin.php on line 406

    Somehow I don't think that's related.

  • well, in case it helps anybody, in Solution to WordPress Blank Web Pages without error Display, Sataya recommends adding this to wp-config.php:

          define('WP_DEBUG', true);  
    

    It worked great to display an on-page error message. You have to turn 'true' to 'false' as soon as you've noted the error, because visitors will see it too. Very handy.

    My errors on http://motivationfactor.com/news are:

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /usr/local/pem/vhosts/100758/webspace/siteapps/WordPress-4603/htdocs/wp-includes/functions.php on line 2910

    Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /usr/local/pem/vhosts/100758/webspace/siteapps/WordPress-4603/htdocs/wp-includes/functions.php on line 2944

  • as you know in this case i can help you if i know exactly what you did! so just try to re-install it my friend :-) one year ago same problem occurs to me(errors on administration panel) and i found out i should remove all blank spaces in the beginning of the function.php file!

  • Thanks @mostafghanbari

    The error message refers to a file I didn't touch, wp-includes/functions.php

    I will go check for extra spaces again....

  • OK I found the problem.

    There was an extra index.php file in my theme folder, with // silence is golden as the content. Removing that fixed the problem for me.

    Thanks for all the advice - it's all good.