So I am trying to upgrade a WordPress project and for one section I get the 404 instead of seeing a product page. I looked around and tried adding this to my functions.php
add_action('wp_head', 'show_template');
function show_template() {
global $template;
print_r($template);
}
but on the top it just shows me wordpress-3.5.2/wp-content/themes/mytheme/404.php
. Can anyone teach me how to trace the error? WP_DEBUG_LOG does have a few depracations and stuff but I'm not sure if that's relevant... Is there a systematic way to trace which function is responsible for this?
I'll paste what WP_DEBUG shows just in case:
Notice: Undefined index: HTTPS in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-content/plugins/audio-player/audio-player.php on line 127
Notice: Undefined index: SERVER_PORT_SECURE in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-content/plugins/audio-player/audio-player.php on line 127
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-content/plugins/audio-player/audio-player.php:127) in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-constants.php on line 17
Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( 'custom-background', $args ) instead. in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-includes/functions.php on line 2841
Notice: add_custom_image_header is deprecated since version 3.4! Use add_theme_support( 'custom-header', $args ) instead. in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-includes/functions.php on line 2841
Notice: Undefined index: /js/js_gallery/jquery-1.6.1.min.js in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-includes/class.wp-scripts.php on line 163
Notice: Trying to get property of non-object in /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-includes/class.wp-scripts.php on line 163 /Users/emai/Documents/wordpress_projects/mytheme/wordpress-3.5.2/wp-content/themes/mytheme/404.php