I'm not being able to load this page, although I can easily load all other posts that load the same custom post type template (please look for "// From now on, WP is throwing a blank page" on that template to pin point where exactly this situation occurs). When turning debugging on, I only get:

Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /nfs/c01/h04/mnt/38315/domains/joao.pt/html/wp-includes/functions.php on line 2905

What else can I do to understand what's going on here? It doesn't even timeout, it just serves a blank page—tested in all major browsers. Because of the fact that pretty much all other posts with the same template load correctly, I really have no idea how to debug this weird blank page.

  • you need to check the code for perticular page or for plugin too – Vikas Gautam Sep 18 '13 at 8:46
  • I did. I printed pretty much every little variable I'm using to ensure they do exist. They do. Everything is working with all other posts loading the same template—that's why I'm so confused about this. – João Sep 18 '13 at 8:48
  • have you use $wpdb->escape in any where in your sql query ? if yes so simply replace $wpdb->escape with esc_sql. – Vikas Gautam Sep 18 '13 at 9:17
  • have you useing Akismet plugin for spam filter if yes deactivate that or replace the above code in that plugin files – Vikas Gautam Sep 18 '13 at 9:24
  • 1
    If you didn't use wpdb::escape in your theme or plugin try disabling other plugins one by one to find out which plugin is creating the problem – Dipesh KC Sep 18 '13 at 10:45

Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /nfs/c01/h04/mnt/38315/domains/joao.pt/html/wp-includes/functions.php on line 2905

WordPress often is not really accurate with giving your information. You can change that: Set error_reporting( -1 ); and define( 'WP_DEBUG', true );. More info in that Gist. This will avoid the white screen of death.

If you got XDebug installed, every error normally comes with a backtrace of what happened. If you even got an IDE like PHPStorm, you'll be able to remote debug your pages and see your errors very accurate and fast.

If you ain't got any of that, your best bet is deactivating all plugins, switching back to the default theme and then activate one after the other step by step to see when the error occurs. If you found the plugin or theme responsible, do a cross file search for escape. Then change it according to the error message.

  • Thanks, @kaiser. I added error_reporting( -1 ); to my wp-config.php but still have the same error as quoted above. I'm assuming it has nothing to do with plugins, since I have very few plugins installed and since the same template is being properly displayed across all other posts. Any more suggestions? – João Sep 18 '13 at 13:41
  • 1
    Yes: As stated in the answer, simply deactivate all plugins, switch to the default theme. Then activate one after the other until the Error appears. – kaiser Sep 18 '13 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.