WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#14880 closed defect (bug) (worksforme)

404 Errors Replaced with Category Pages

Reported by: askapache Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Rewrite Rules Keywords: reporter-feedback
Focuses: Cc:

Description

Sometime between 2010-09-14 and 2010-09-15 a revision to trunk makes it impossible to ever have a result of is_404(), resulting also in a MySQL error. At this time the latest (broken) revision is:15620, it looks like every is_404() error page is replaced by a category page or archive page with a broken query resulting in a blank content.

I tried to figure out what was doing this for the past 3 hours, it's over my head.

So it's impossible for the 404.php file to work.

I've checked this on a new installation with 0 plugins 3.0.1-alpha and clean htaccess, etc..

This effectively breaks all 404 pages sitewide. The query executed also has a syntax error that gets logged every time a 404 page is supposed to be shown but isn't.

[15-Sep-2010 20:08:40] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (wpdb_posts.post_author = 0) AND wpdb_posts.post_type = 'post' AND (wpdb_p' at line 1 for query  SELECT SQL_CALC_FOUND_ROWS  wpdb_posts.* FROM wpdb_posts  WHERE 1=1  AND wpdb_posts.ID IN( ) AND (wpdb_posts.post_author = 0) AND wpdb_posts.post_type = 'post' AND (wpdb_posts.post_status = 'publish')  ORDER BY wpdb_posts.post_date DESC LIMIT 0, 20 made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Attachments (2)

14880.diff (625 bytes) - added by scribu 4 years ago.
14880.2.diff (2.3 KB) - added by scribu 4 years ago.
Also check for WP_Error

Download all attachments as: .zip

Change History (28)

comment:1 askapache4 years ago

  • Cc askapache added

comment:2 scribu4 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to scribu
  • Status changed from new to reviewing

comment:3 scribu4 years ago

  • Keywords reporter-feedback added; is_404 404 error get_posts removed
  • Severity changed from critical to normal

Can't seem to reproduce. is_404() returns true when going to a bogus URL.

Try switching to the default theme.

comment:4 scribu4 years ago

Also, here's some debugging code:

`
add_action('wp_head', 'wp_debug');

function wp_debug() {

global $wp_query;

echo '<pre>';
print_r($wp_query);
echo '</pre>';

};
`

comment:5 nacin4 years ago

AND wpdb_posts.ID IN( ) -- While possible, that doesn't look theme-specific to me :-)

comment:6 askapache4 years ago

/doing-everything-i-can/?error=404&e=404&whereis-my-404
WP_Query Object
(
    [query_vars] => Array
        (
            [category_name] => doing-everything-i-can
            [error] => 
            [m] => 0
            [p] => 0
            [post_parent] => 
            [subpost] => 
            [subpost_id] => 
            [attachment] => 
            [attachment_id] => 0
            [name] => 
            [static] => 
            [pagename] => 
            [page_id] => 0
            [second] => 
            [minute] => 
            [hour] => 
            [day] => 0
            [monthnum] => 0
            [year] => 0
            [w] => 0
            [tag] => 
            [cat] => 0
            [tag_id] => 0
            [author_name] => 
            [feed] => 
            [tb] => 
            [paged] => 0
            [comments_popup] => 
            [meta_key] => 
            [meta_value] => 
            [preview] => 
            [s] => 
            [sentence] => 
            [category__in] => Array
                (
                )

            [category__not_in] => Array
                (
                )

            [category__and] => Array
                (
                )

            [post__in] => Array
                (
                )

            [post__not_in] => Array
                (
                )

            [tag__in] => Array
                (
                )

            [tag__not_in] => Array
                (
                )

            [tag__and] => Array
                (
                )

            [tag_slug__in] => Array
                (
                )

            [tag_slug__and] => Array
                (
                )

            [ignore_sticky_posts] => 
            [suppress_filters] => 
            [cache_results] => 1
            [update_post_term_cache] => 1
            [update_post_meta_cache] => 1
            [post_type] => 
            [posts_per_page] => 20
            [nopaging] => 
            [comments_per_page] => 50
            [no_found_rows] => 
            [order] => DESC
            [orderby] => ar15_posts.post_date DESC
        )

    [tax_query] => Array
        (
            [0] => Array
                (
                    [taxonomy] => category
                    [terms] => Array
                        (
                            [0] => 0
                        )

                    [operator] => IN
                    [field] => term_id
                )

        )

    [request] =>  SELECT SQL_CALC_FOUND_ROWS  ar15_posts.* FROM ar15_posts  WHERE 1=1  AND ar15_posts.ID IN( ) AND ar15_posts.post_type = 'post' AND (ar15_posts.post_status = 'publish' OR ar15_posts.post_status = 'private')  ORDER BY ar15_posts.post_date DESC LIMIT 0, 20
    [post_count] => 0
    [current_post] => -1
    [in_the_loop] => 
    [post] => 
    [comments] => 
    [comment_count] => 0
    [current_comment] => -1
    [comment] => 
    [found_posts] => 0
    [max_num_pages] => 0
    [max_num_comment_pages] => 0
    [is_single] => 
    [is_preview] => 
    [is_page] => 
    [is_archive] => 1
    [is_date] => 
    [is_year] => 
    [is_month] => 
    [is_day] => 
    [is_time] => 
    [is_author] => 
    [is_category] => 1
    [is_tag] => 
    [is_tax] => 
    [is_search] => 
    [is_feed] => 
    [is_comment_feed] => 
    [is_trackback] => 
    [is_home] => 
    [is_404] => 
    [is_comments_popup] => 
    [is_admin] => 
    [is_attachment] => 
    [is_singular] => 
    [is_robots] => 
    [is_posts_page] => 
    [is_paged] => 
    [query] => Array
        (
            [category_name] => doing-everything-i-can
        )

    [posts] => Array
        (
        )

    [queried_object] => WP_Error Object
        (
            [errors] => Array
                (
                    [invalid_term] => Array
                        (
                            [0] => Empty Term
                        )

                )

            [error_data] => Array
                (
                )

        )

    [queried_object_id] => 
)


comment:7 askapache4 years ago

That is the twentyten. It does show the 404.php file, but as you can see the vars aren't right.

It's never done this before in the 3+ years I've been using trunk... I reverted back to a stable revision but it didn't fix it so I am guessing it has to do with new internal stuff.

comment:8 askapache4 years ago

Here is the body class output-

<body class="archive category category- logged-in">

and here is the post class output-

<div id="post-0" class="post error404 not-found">

And this is no plugins, twenty-ten, latest trunk.

It seems to me like the category is hijacking the 404. It looks that way in the sql as well.

comment:9 askapache4 years ago

Ok the last revision that worked for me was (from scribu!)

Last Changed Author: scribu
Last Changed Rev: 15581
Last Changed Date: 2010-09-06 07:28:59 -0400 (Mon, 06 Sep 2010)

If I can provide you with anything to help just let me know.

scribu4 years ago

comment:10 scribu4 years ago

  • Keywords has-patch added; reporter-feedback removed

Please try out this patch with the latest revision.

scribu4 years ago

Also check for WP_Error

comment:11 dd324 years ago

attachment 14880.diff added

i commited a near exact replica of that yesterday (unaware of this ticket) [15652]

comment:12 scribu4 years ago

  • Keywords reporter-feedback added; has-patch removed

comment:13 askapache4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

@scribu

Great work, it's running perfectly again (Revision: 15691). From what I can see, this is completely fixed. Thank you!

comment:14 askapache4 years ago

  • Keywords reporter-feedback removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Broken again in: Revision: 16173

I've included more debugging info this time in case it helps you guys.

In case it helps with the fix, I care so much about this issue because of the askapache google 404 plugin, which uses a template_redirect on init to load_template a 404.php template file.

Maybe you could add a check for a custom 404.php and if present, bypass all the guesswork done by canonical and redirect_guess stuff.

Thanks, I love 3.1-alpha

( $_SERVER )
[REQUEST_URI] => /doing-everything-i-can/?error=404&e=404&whereis-my-404

( $_GET )
[e] => 404
[whereis-my-404] => 

( $_REQUEST )
[error] => 404
[e] => 404
[whereis-my-404] => 
WP_Query Object
(
    [post_count] => 40
    [current_post] => -1
    [in_the_loop] => 
    [comment_count] => 0
    [current_comment] => -1
    [found_posts] => 79
    [max_num_pages] => 2
    [max_num_comment_pages] => 0
    [is_single] => 
    [is_preview] => 
    [is_page] => 
    [is_archive] => 1
    [is_date] => 
    [is_year] => 
    [is_month] => 
    [is_day] => 
    [is_time] => 
    [is_author] => 
    [is_category] => 1
    [is_tag] => 
    [is_tax] => 
    [is_search] => 
    [is_feed] => 
    [is_comment_feed] => 
    [is_trackback] => 
    [is_home] => 
    [is_404] => 
    [is_comments_popup] => 
    [is_paged] => 
    [is_admin] => 
    [is_attachment] => 
    [is_singular] => 
    [is_robots] => 
    [is_posts_page] => 
    [is_post_type_archive] => 
    [query_vars] => Array
        (
            [cat] => 66
            [showposts] => 40
            [error] => 
            [m] => 0
            [p] => 0
            [post_parent] => 
            [subpost] => 
            [subpost_id] => 
            [attachment] => 
            [attachment_id] => 0
            [name] => 
            [static] => 
            [pagename] => 
            [page_id] => 0
            [second] => 
            [minute] => 
            [hour] => 
            [day] => 0
            [monthnum] => 0
            [year] => 0
            [w] => 0
            [category_name] => featured
            [tag] => 
            [tag_id] => 
            [author_name] => 
            [feed] => 
            [tb] => 
            [paged] => 0
            [comments_popup] => 
            [meta_key] => 
            [meta_value] => 
            [preview] => 
            [s] => 
            [sentence] => 
            [fields] => 
            [category__in] => Array
                (
                    [0] => 66
                )

            [category__not_in] => Array
                (
                )

            [category__and] => Array
                (
                )

            [post__in] => Array
                (
                )

            [post__not_in] => Array
                (
                )

            [tag__in] => Array
                (
                )

            [tag__not_in] => Array
                (
                )

            [tag__and] => Array
                (
                )

            [tag_slug__in] => Array
                (
                )

            [tag_slug__and] => Array
                (
                )

            [tax_query] => Array
                (
                    [0] => Array
                        (
                            [taxonomy] => category
                            [terms] => Array
                                (
                                    [0] => 66
                                )

                            [operator] => IN
                            [field] => term_id
                        )

                )

            [meta_query] => Array
                (
                )

            [ignore_sticky_posts] => 
            [suppress_filters] => 
            [cache_results] => 1
            [update_post_term_cache] => 1
            [update_post_meta_cache] => 1
            [post_type] => 
            [posts_per_page] => 40
            [nopaging] => 
            [comments_per_page] => 50
            [no_found_rows] => 
            [order] => DESC
            [orderby] => wp5_posts.post_date DESC
        )

    [query] => Array
        (
            [cat] => 66
            [showposts] => 40
        )

    [request] =>  SELECT SQL_CALC_FOUND_ROWS  wp5_posts.* FROM wp5_posts  WHERE 1=1  AND wp5_posts.ID IN(159, 1800, 1916, 2236, 2328, 2540, 54, 442, 566, 457, 556, 549, 541, 151, 369, 530, 258, 462, 190, 313, 517, 116, 510, 1001, 1043, 1046, 1067, 1154, 1209, 1280, 1689, 567, 1724, 1053, 23, 180, 1516, 122, 293, 306, 310, 146, 129, 128, 118, 465, 58, 480, 490, 1380, 2834, 2581, 3062, 3144, 1024, 3161, 3183, 3220, 3287, 3341, 3039, 3167, 3586, 3595, 3612, 3609, 1049, 3701, 3747, 1966, 4037, 4001, 4039, 3861, 34, 4066, 4069, 4113, 4116, 4217, 1019, 33, 4693, 4570, 4577, 4686, 4357, 148, 4419, 3923, 4404, 4708, 4713, 4719, 4732) AND wp5_posts.post_type IN ('post', 'page', 'attachment') AND (wp5_posts.post_status = 'publish' OR wp5_posts.post_author = 1 AND wp5_posts.post_status = 'private')  ORDER BY wp5_posts.post_date DESC LIMIT 0, 40




wp_version="3.1-alpha"
|  |  wp_db_version = (integer) 15477
|  |  tinymce_version="3392a"
|  |  manifest_version="20101102"
|  |  required_php_version="4.3"
|  |  required_mysql_version="4.1.2"
|  |  blog_id = (integer) 1
|  |  PHP_SELF="/index.php"
|  |  timestart = (double) 1288838658.7254
|  |  wpdb = wpdb {
|  |  |  show_errors -> (boolean) 1
|  |  |  suppress_errors -> (boolean) 
|  |  |  last_error->""
|  |  |  num_queries -> (integer) 182
|  |  |  num_rows -> (integer) 0
|  |  |  rows_affected -> (integer) 0
|  |  |  insert_id -> (integer) 0
|  |  |  last_query->"SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1775"
|  |  |  last_result -> Array (
|  |  |  )
Query: SELECT option_name, option_value FROM wp5_options WHERE autoload = 'yes'
Call from: require, require_once, require_once, require_once, wp_not_installed, is_blog_installed, wp_load_alloptions

Query: UPDATE `wp5_options` SET `option_value` = '' WHERE `option_name` = 'uninstall_plugins'
Call from: require, require_once, require_once, require_once, include_once, register_uninstall_hook, update_option

Query: SELECT option_name, option_value FROM wp5_options WHERE autoload = 'yes'
Call from: require, require_once, require_once, require_once, include_once, get_settings, get_option, wp_load_alloptions

Query: SELECT * FROM wp5_users WHERE user_login = 'admin'
Call from: require, require_once, require_once, require_once, WP->init, wp_get_current_user, get_currentuserinfo, wp_validate_auth_cookie, get_userdatabylogin, get_user_by

Query: SELECT user_id, meta_key, meta_value FROM wp5_usermeta WHERE user_id IN (1)
Call from: require, require_once, require_once, require_once, WP->init, wp_get_current_user, get_currentuserinfo, wp_validate_auth_cookie, get_userdatabylogin, get_user_by, _fill_user, get_user_metavalues, update_meta_cache

Query: SHOW COLUMNS FROM wp5_tla_data LIKE 'rss_text'
Call from: require, require_once, require_once, require_once, do_action, call_user_func_array, tla_initialize, textlinkadsObject->initialize, textlinkadsObject->checkInstallation

Query: SHOW TABLES LIKE 'wp5_tla_rss_map'
Call from: require, require_once, require_once, require_once, do_action, call_user_func_array, tla_initialize, textlinkadsObject->initialize, textlinkadsObject->checkInstallation

Query: SHOW COLUMNS FROM wp5_tla_data LIKE 'post_id'
Call from: require, require_once, require_once, require_once, do_action, call_user_func_array, tla_initialize, textlinkadsObject->initialize, textlinkadsObject->checkInstallation

Query: SELECT * FROM wp5_tla_data
Call from: require, require_once, require_once, require_once, do_action, call_user_func_array, tla_initialize, textlinkadsObject->initialize

Query: SELECT SQL_CALC_FOUND_ROWS wp5_posts.* FROM wp5_posts WHERE 1=1 AND wp5_posts.post_type = 'post' AND (wp5_posts.post_status = 'publish' OR wp5_posts.post_status = 'private') ORDER BY wp5_posts.post_date DESC LIMIT 0, 20
Call from: require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Query: SELECT FOUND_ROWS()
Call from: require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Query: SELECT t.*, tt.*, tr.object_id FROM wp5_terms AS t INNER JOIN wp5_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp5_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (1280, 4732, 4719, 4708, 4693, 4508, 3923, 4577, 1019, 4137, 4069, 4419, 4404, 4357, 3220, 3341, 4001, 1380, 3861, 118) ORDER BY t.name ASC
Call from: require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

Query: SELECT post_id, meta_key, meta_value FROM wp5_postmeta WHERE post_id IN (1280,4732,4719,4708,4693,4508,3923,4577,1019,4137,4069,4419,4404,4357,3220,3341,4001,1380,3861,118)
Call from: require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache

Query: SELECT t.*, tt.* FROM wp5_terms AS t INNER JOIN wp5_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'category' AND t.slug = 'doing-everything-i-can' LIMIT 1
Call from: require, require_once, include, get_header, locate_template, load_template, require_once, sqpt_seo_title, get_term_by

Query: SELECT option_value FROM wp5_options WHERE option_name = 'description' LIMIT 1
Call from: require, require_once, include, get_header, locate_template, load_template, require_once, sqpt_seo_title, get_option

Query: SELECT t.name AS name, t.term_id AS term_id, tt.count AS count FROM wp5_term_relationships AS tr INNER JOIN wp5_term_taxonomy AS tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) INNER JOIN wp5_terms AS t ON (tt.term_id = t.term_id) WHERE tt.taxonomy = 'post_tag' AND ( tr.object_id IN ('1280', '4732', '4719', '4708', '4693', '4508', '3923', '4577', '1019', '4137', '4069', '4419', '4404', '4357', '3220', '3341', '4001', '1380', '3861', '118') ) GROUP BY t.term_id ORDER BY tt.count DESC
Call from: require, require_once, include, get_header, locate_template, load_template, require_once, wp_head, do_action, call_user_func_array

Query: SELECT t.*, tt.* FROM wp5_terms AS t INNER JOIN wp5_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'category' AND t.slug = 'doing-everything-i-can' LIMIT 1
Call from: require, require_once, include, get_header, locate_template, load_template, require_once, sqpt_seo_title, get_term_by

Query: SELECT object_id FROM wp5_term_relationships INNER JOIN wp5_term_taxonomy USING (term_taxonomy_id) WHERE taxonomy IN ('category') AND term_id IN (66)
Call from: require, require_once, include, query_posts, WP_Query->query, WP_Query->get_posts, WP_Object_Query->get_tax_sql

Query: SELECT SQL_CALC_FOUND_ROWS wp5_posts.* FROM wp5_posts WHERE 1=1 AND wp5_posts.ID IN(159, 1800, 1916, 2236, 2328, 2540, 54, 442, 566, 457, 556, 549, 541, 151, 369, 530, 258, 462, 190, 313, 517, 116, 510, 1001, 1043, 1046, 1067, 1154, 1209, 1280, 1689, 567, 1724, 1053, 23, 180, 1516, 122, 293, 306, 310, 146, 129, 128, 118, 465, 58, 480, 490, 1380, 2834, 2581, 3062, 3144, 1024, 3161, 3183, 3220, 3287, 3341, 3039, 3167, 3586, 3595, 3612, 3609, 1049, 3701, 3747, 1966, 4037, 4001, 4039, 3861, 34, 4066, 4069, 4113, 4116, 4217, 1019, 33, 4693, 4570, 4577, 4686, 4357, 148, 4419, 3923, 4404, 4708, 4713, 4719, 4732) AND wp5_posts.post_type IN ('post', 'page', 'attachment') AND (wp5_posts.post_status = 'publish' OR wp5_posts.post_author = 1 AND wp5_posts.post_status = 'private') ORDER BY wp5_posts.post_date DESC LIMIT 0, 40
Call from: require, require_once, include, query_posts, WP_Query->query, WP_Query->get_posts

Query: SELECT FOUND_ROWS()
Call from: require, require_once, include, query_posts, WP_Query->query, WP_Query->get_posts

Query: SELECT t.*, tt.*, tr.object_id FROM wp5_terms AS t INNER JOIN wp5_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp5_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (3701, 3183, 3167, 3039, 3287, 1209, 159, 3062, 1024, 1043, 2834, 129, 2540, 2581, 2328, 2236, 1966, 23, 1916, 465, 1053, 1800) ORDER BY t.name ASC
Call from: require, require_once, include, query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_object_term_cache, wp_get_object_terms

Query: SELECT post_id, meta_key, meta_value FROM wp5_postmeta WHERE post_id IN (3701,3183,3167,3039,3287,1209,159,3062,1024,1043,2834,129,2540,2581,2328,2236,1966,23,1916,465,1053,1800)
Call from: require, require_once, include, query_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache

Query: SELECT t.name AS name, t.term_id AS term_id, tt.count AS count FROM wp5_term_relationships AS tr INNER JOIN wp5_term_taxonomy AS tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) INNER JOIN wp5_terms AS t ON (tt.term_id = t.term_id) WHERE tt.taxonomy = 'post_tag' AND ( tr.object_id IN ('1280', '4732', '4719', '4708', '4693', '4508', '3923', '4577', '1019', '4137', '4069', '4419', '4404', '4357', '3220', '3341', '4001', '1380', '3861', '118', '3701', '3183', '3167', '3039', '3287', '1209', '159', '3062', '1024', '1043', '2834', '129', '2540', '2581', '2328', '2236', '1966', '23', '1916', '465', '1053', '1800') ) GROUP BY t.term_id ORDER BY tt.count DESC
Call from: require, require_once, include, the_excerpt, get_the_excerpt, apply_filters, call_user_func_array, apply_filters, call_user_func_array, SimpleTags->autoLinkTags, SimpleTags->prepareAutoLinkTags, SimpleTags->getTagsFromCurrentPosts

Query: SELECT t.*, tt.* FROM wp5_terms AS t INNER JOIN wp5_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp5_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('post_tag') AND tr.object_id IN (4719) ORDER BY t.name ASC
Call from: require, require_once, include, the_excerpt, get_the_excerpt, apply_filters, call_user_func_array, apply_filters, call_user_func_array, wp_get_object_terms

Query: SELECT wp5_posts.* FROM wp5_posts WHERE 1=1 AND wp5_posts.post_type = 'post' AND (wp5_posts.post_status = 'publish') ORDER BY wp5_posts.post_date DESC LIMIT 0, 3
Call from: require, require_once, include, get_sidebar, locate_template, load_template, require_once, sqpt_recent_posts, get_posts, WP_Query->query, WP_Query->get_posts

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'page'
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 4410 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4410
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 3208 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3208
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 3238 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 3208 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 3247 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 3208 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 366 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 366
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 218 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 218
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 220 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 220
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 219 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 219
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 27 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 27
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1313 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 27 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 1370 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 27 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 3117 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 3118 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 3119 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 3116 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 487 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 1323 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 3848 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 2 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 4043 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT * FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4043
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 3628 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3628
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 2705 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2705
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1781 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1781
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1649 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1649
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1528 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1528
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 479 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 479
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 471 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 471
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 460 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 460
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 389 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 389
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 368 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 368
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 360 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 360
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 358 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 358
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 4437 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT `post_parent` FROM wp5_posts WHERE ID = 357 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post, _get_post_ancestors

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4437
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 357
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 350 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 350
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 29 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 29
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1776 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1776
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT * FROM wp5_posts WHERE ID = 1775 LIMIT 1
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1775
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'page'
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4410
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3208
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 366
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 218
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 220
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 219
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 27
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4043
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3628
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2705
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1781
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1649
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1528
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 479
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 471
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 460
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 389
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 368
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 360
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 358
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4437
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 357
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 350
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 29
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1776
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1775
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'page'
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4410
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3208
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 366
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 218
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 220
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 219
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 27
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4043
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 3628
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 2705
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1781
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1649
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1528
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 479
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 471
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 460
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 389
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 368
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 360
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 358
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 4437
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 357
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 350
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 29
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1776
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

Query: SELECT ID, post_name, post_parent FROM wp5_posts WHERE post_type = 'attachment' AND post_parent = 1775
Call from: require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, AA_DEBUG->wp_footer, AA_DEBUG->get_debug_rewrites, AA_DEBUG->handle_results, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index

comment:15 askapache4 years ago

Note that there is no longer any sql errors

comment:16 askapache4 years ago

Still broken in revision 16180, the updated wp_query for this rev is:
{{{WP_Query Object
(

[post_count] => 20
[current_post] => -1
[in_the_loop] =>
[comment_count] => 0
[current_comment] => -1
[found_posts] => 244
[max_num_pages] => 13
[max_num_comment_pages] => 0
[is_single] =>
[is_preview] =>
[is_page] =>
[is_archive] =>
[is_date] =>
[is_year] =>
[is_month] =>
[is_day] =>
[is_time] =>
[is_author] =>
[is_category] =>
[is_tag] =>
[is_tax] =>
[is_search] =>
[is_feed] =>
[is_comment_feed] =>
[is_trackback] =>
[is_home] => 1
[is_404] =>
[is_comments_popup] =>
[is_paged] =>
[is_admin] =>
[is_attachment] =>
[is_singular] =>
[is_robots] =>
[is_posts_page] =>
[is_post_type_archive] =>
[query_vars] => Array

(

[category_name] => doing-everything-i-can
[error] =>
[m] => 0
[p] => 0
[post_parent] =>
[subpost] =>
[subpost_id] =>
[attachment] =>
[attachment_id] => 0
[name] =>
[static] =>
[pagename] =>
[page_id] => 0
[second] =>
[minute] =>
[hour] =>
[day] => 0
[monthnum] => 0
[year] => 0
[w] => 0
[tag] =>
[cat] =>
[tag_id] =>
[author_name] =>
[feed] =>
[tb] =>
[paged] => 0
[comments_popup] =>
[meta_key] =>
[meta_value] =>
[preview] =>
[s] =>
[sentence] =>
[fields] =>
[categoryin] => Array

(
)

[categorynot_in] => Array

(
)

[categoryand] => Array

(
)

[postin] => Array

(
)

[postnot_in] => Array

(
)

[tagin] => Array

(
)

[tagnot_in] => Array

(
)

[tagand] => Array

(
)

[tag_slugin] => Array

(
)

[tag_slugand] => Array

(
)

[tax_query] => Array

(
)

[meta_query] => Array

(
)

[ignore_sticky_posts] =>
[suppress_filters] =>
[cache_results] => 1
[update_post_term_cache] => 1
[update_post_meta_cache] => 1
[post_type] =>
[posts_per_page] => 20
[nopaging] =>
[comments_per_page] => 50
[no_found_rows] =>
[order] => DESC
[orderby] => wp5_posts.post_date DESC

)

[query] => Array

(

[category_name] => doing-everything-i-can

)

[request] => SELECT SQL_CALC_FOUND_ROWS wp5_posts.* FROM wp5_posts WHERE 1=1 AND wp5_posts.post_type = 'post' AND (wp5_posts.post_status = 'publish' OR wp5_posts.post_status = 'private') ORDER BY wp5_posts.post_date DESC LIMIT 0, 20

}}}

But it's not just the category_name being guessed incorrectly, for a url without any possible category the vars are:

WP_Query Object
(
    [post_count] => 20
    [current_post] => -1
    [in_the_loop] => 
    [comment_count] => 0
    [current_comment] => -1
    [found_posts] => 244
    [max_num_pages] => 13
    [max_num_comment_pages] => 0
    [is_single] => 
    [is_preview] => 
    [is_page] => 
    [is_archive] => 
    [is_date] => 
    [is_year] => 
    [is_month] => 
    [is_day] => 
    [is_time] => 
    [is_author] => 
    [is_category] => 
    [is_tag] => 
    [is_tax] => 
    [is_search] => 
    [is_feed] => 
    [is_comment_feed] => 
    [is_trackback] => 
    [is_home] => 1
    [is_404] => 
    [is_comments_popup] => 
    [is_paged] => 
    [is_admin] => 
    [is_attachment] => 
    [is_singular] => 
    [is_robots] => 
    [is_posts_page] => 
    [is_post_type_archive] => 
    [query_vars] => Array
        (
            [page] => 0
            [pagename] => 
            [error] => 
            [m] => 0
            [p] => 0
            [post_parent] => 
            [subpost] => 
            [subpost_id] => 
            [attachment] => 
            [attachment_id] => 0
            [name] => 
            [static] => 
            [page_id] => 0
            [second] => 
            [minute] => 
            [hour] => 
            [day] => 0
            [monthnum] => 0
            [year] => 0
            [w] => 0
            [category_name] => 
            [tag] => 
            [cat] => 
            [tag_id] => 
            [author_name] => 
            [feed] => 
            [tb] => 
            [paged] => 0
            [comments_popup] => 
            [meta_key] => 
            [meta_value] => 
            [preview] => 
            [s] => 
            [sentence] => 
            [fields] => 
            [category__in] => Array
                (
                )

            [category__not_in] => Array
                (
                )

            [category__and] => Array
                (
                )

            [post__in] => Array
                (
                )

            [post__not_in] => Array
                (
                )

            [tag__in] => Array
                (
                )

            [tag__not_in] => Array
                (
                )

            [tag__and] => Array
                (
                )

            [tag_slug__in] => Array
                (
                )

            [tag_slug__and] => Array
                (
                )

            [tax_query] => Array
                (
                )

            [meta_query] => Array
                (
                )

            [ignore_sticky_posts] => 
            [suppress_filters] => 
            [cache_results] => 1
            [update_post_term_cache] => 1
            [update_post_meta_cache] => 1
            [post_type] => 
            [posts_per_page] => 20
            [nopaging] => 
            [comments_per_page] => 50
            [no_found_rows] => 
            [order] => DESC
            [orderby] => ar15_posts.post_date DESC
        )

    [query] => Array
        (
            [page] => 
            [pagename] => 
        )

    [request] =>  SELECT SQL_CALC_FOUND_ROWS  ar15_posts.* FROM ar15_posts  WHERE 1=1  AND ar15_posts.post_type = 'post' AND (ar15_posts.post_status = 'publish' OR ar15_posts.post_status = 'private')  ORDER BY ar15_posts.post_date DESC LIMIT 0, 20

comment:17 askapache4 years ago

  • Keywords parse_request added
  • Severity changed from normal to major

Ok I have traced this error back to the

function parse_request

in wp-includes/class-wp.php

The logic is bad. Looks like someone made some updates to other parts of the function and forgot to test the error is still getting saved.

And the code looks like it really only cares about 404 errors, not the whole spectrum of http error codes as defined by the status_header function. There are 53 status codes, and all HTTP error codes that start with a 4 or a 5 should definately be counted by WP, and would be if this is fixed and the user is using a smart plugin or 404.php template.

A url like /e=405/e=405/?error=405&e=405 should set the error to 405 in the query_vars and cause the is_404 function to be set.

It seems from my debugging that before the error can be set and triggered, it is deleted. IOW, the $_GETerror? is unset as well as the $error (in parse_request).

This is a big problem for any server that is running Apache. A serious problem. For instance, instead of responding correctly to an "OPTIONS * HTTP/1.1" request that isn't allowed with a 405 Method Not Allowed, this parse_request code causes the entire front-page of my blog to be displayed.

Several other problems crop up, especially when dealing with search engines, the way-back archive machine, and others.

I definately think this should be fixed in the core, and not left up to plugin authors to set via filtering query vars, this will get messy quick if that were to happen, and would cause problems with alot of currently useful widespread plugins.

comment:18 askapache4 years ago

Also broken, even when setting up apache to explicitly set that the errordocument should be shown by using:

ErrorDocument /index.php?error=404
Redirect 404 /show-error-404

And requesting /show-error-404, it still does not display the 404 error page. I have created a 404.php that works with wordpress, phpbb, basically any system that can run php 4/5 including windows to handle all HTTP errors. It's being used by over 20,000 wordpress users as its included in the plugin askapache-google-404.

Here is the function from the askapache-google-404 plugin, which is the most advanced and complete php http error-handling code on the net. Something very close to that added to WP core would be incredibly awesome.

class AA_G404_Handler {
	var $reason = '';
	var $uri = '';
	var $sc;
	var $msg = '';

	var $ASC = array(
		400 => "Your browser sent a request that this server could not understand.",
		401 => "This server could not verify that you are authorized to access the document requested.",
		402 => '',
		403 => "You don't have permission to access %U% on this server.",
		404 => "We couldn't find <acronym title='%U%'>that uri</acronym> on our server, though it's most certainly not your fault.",
		405 => "The requested method %M% is not allowed for the URL %U%.",
		406 => "An appropriate representation of the requested resource %U% could not be found on this server.",
		407 => "An appropriate representation of the requested resource %U% could not be found on this server.",
		408 => "Server timeout waiting for the HTTP request from the client.",
		409 => '',
		410 => "The requested resource %U% is no longer available on this server and there is no forwarding address. Please remove all references to this resource.",
		411 => "A request of the requested method GET requires a valid Content-length.",
		412 => "The precondition on the request for the URL %U% evaluated to false.",
		413 => "The requested resource %U% does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.",
		414 => "The requested URL's length exceeds the capacity limit for this server.",
		415 => "The supplied request data is not in a format acceptable for processing by this resource.",
		416 => 'Requested Range Not Satisfiable',
		417 => "The expectation given in the Expect request-header field could not be met by this server. The client sent <code>Expect:</code>",
		422 => "The server understands the media type of the request entity, but was unable to process the contained instructions.",
		423 => "The requested resource is currently locked. The lock must be released or proper identification given before the method can be applied.",
		424 => "The method could not be performed on the resource because the requested action depended on another action and that other action failed.",
		425 => '',
		426 => "The requested resource can only be retrieved using SSL. Either upgrade your client, or try requesting the page using https://",
		500 => '',
		501 => "%M% to %U% not supported.",
		502 => "The proxy server received an invalid response from an upstream server.",
		503 => "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.",
		504 => "The proxy server did not receive a timely response from the upstream server.",
		505 => '',
		506 => "A variant for the requested resource <code>%U%</code> is itself a negotiable resource. This indicates a configuration error.",
		507 => "The method could not be performed.	There is insufficient free space left in your storage allocation.",
		510 => "A mandatory extension policy in the request is not accepted by the server for this resource."
		);
		
		
	
	
	/**
	 */
	function AA_G404_Handler(){}	
	
	/**
	 */
	function handle_it()
	{
		global $AA_G404, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
		if (is_array($wp_query->query_vars)) extract($wp_query->query_vars, EXTR_SKIP);

		// reset AA_G404_Handler vars
		$this->uri = $this->sc = $this->msg = $this->reason = '';
		$this->uri = esc_attr(stripslashes($_SERVER['REQUEST_URI']));
		$this->sc = absint((isset($_SERVER['REDIRECT_STATUS']) && $_SERVER['REDIRECT_STATUS'] != 200) ? $_SERVER['REDIRECT_STATUS'] : (!isset($_REQUEST['error'])) ? 404 : $_REQUEST['error']);

		if ('HTTP/1.1' != $_SERVER["SERVER_PROTOCOL"] && 'HTTP/1.0' != $_SERVER["SERVER_PROTOCOL"] && $_SERVER["SERVER_PROTOCOL"] = 'HTTP/1.0') $this->sc = 505;
		$this->reason = get_status_header_desc($this->sc);
		if ($this->sc == 402 || $this->sc == 409 || $this->sc == 425 || $this->sc == 500 || $this->sc == 505) $this->msg = 'The server encountered an internal error or misconfiguration and was unable to complete your request.';
		else $this->msg = (array_key_exists($this->sc, $this->ASC) !== false) ? str_replace(array('%U%', '%M%'), array($this->uri, $_SERVER['REQUEST_METHOD']), $this->ASC["{$this->sc}"]) : 'Error';

		if ($this->sc == 400 || $this->sc == 403 || $this->sc == 405 || floor($this->sc / 100) == 5) {
			if ($this->sc == 405) @header('Allow: GET,HEAD,POST,OPTIONS,TRACE', 1, 405);
			echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>{$this->sc} {$this->reason}</title>\n<h1>{$this->reason}</h1>\n<p>{$this->msg}<br />\n</p>\n</body></html>";
			return false;
		}

		@header("{$_SERVER['SERVER_PROTOCOL']} {$this->sc} {$this->reason}", 1, $this->sc);
		@header("Status: {$this->sc} {$this->reason}", 1, $this->sc);
		@header("Connection: close", 1);
	}
		
		
	
	
	/**
	 */
	function output()
	{
		global $AA_G404;
		
		// if aa_google_404 function called from within template but plugin not enabled, ditch
		if('1' != $AA_G404->options['enabled']) return '';
		
		$google_helper = (($AA_G404->options['google_404'] == '1') ? '<script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>' . "\n" : '');
		$recent = (($AA_G404->options['recent_posts'] == '1') ? '<ul>' . wp_get_archives(array('echo' => false, 'type' => 'postbypost', 'limit' => absint($AA_G404->options['recent_num']))) . '</ul>' : '');
		$related = (($AA_G404->options['related_posts'] == '1') ? $this->related_posts((int)$AA_G404->options['related_num'], (int)$AA_G404->options['related_length']) : '');
		$tag_cloud = (($AA_G404->options['tag_cloud'] == '1') ? '<p>' . wp_tag_cloud(array('echo' => false)) . '</p>' : '');
		$sr = array(
			'%error_title%' => $this->sc . ' ' . $this->reason,
			'%related_posts%' => $related,
			'%recent_posts%' => $recent,
			'%google_helper%' => $google_helper,
			'%tag_cloud%' => $tag_cloud,
			);
		
		if ($AA_G404->options['google_ajax'] == '1') echo str_replace(array_keys($sr), array_values($sr), $AA_G404->code['html']);
		if ($AA_G404->options['mobile_analytics_log'] == '1')echo $this->mobile_tracker_image();
	}

comment:19 scribu4 years ago

  • Component changed from Query to Press This
  • Keywords parse_request removed
  • Severity changed from major to normal

Again, can't reproduce:

Going to /doing-everything-i-can/?error=404&e=404&whereis-my-404/

gives me this $wp_query->query:

Array
(
    [page] => 
    [pagename] => doing-everything-i-can
)

so there's something else going on on your install.

comment:20 scribu4 years ago

  • Keywords reporter-feedback added

comment:21 scribu4 years ago

Also, $wp_query->is_404 is set to true.

So, I need steps to reproduce.

comment:22 askapache4 years ago

I was able to add a hack-around to the plugin..
In the template_redirect it was checking first whether it was a 404 with:

<?php
if (!is_404() || '1' != $this->options['enabled']) return true;
?>

I changed that to

<?php 
if ((!is_404() || '1' != $this->options['enabled']) && !isset($_GET['error'])) return true;
else $wp_query->set_404();
?>

Which works but only because I have set my ErrorDocuments to /index.php?error=403 for each status code 400-599, so I know that when that query_string is there it's an error.

The error handling should definately be improved, and I'd like to contribute the php error handling function from my plugin, just not sure how to go about doing that.

I found out the main reason that this problem is happening is related to the new rewrites. Specifically the category rewrites are taking over every request that isn't specific for another match like /feed works, page.html works, etc.. but if it's a 404 or a non-existant page, it defaults to showing my featured category, which is basically my home-page. Something to do with the category_name since even when I manually do ?category_name=windows the wp_query still shows category_name as featured.

I'm also getting the following warnings with the latest revision:

PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'topic_count_text_callback' not found or invalid function name in wp-includes/category-template.php on line 680

which is the only warning/error I get on my site.

I'm sure now that the way HTTP errors are recognized by WP can be greatly improved, but the real problem is caused by the rewrites. I wrote the askapache rewriterules viewer plugin a couple years ago, and also have added debugging to the plugin I'm working on now, and the rewritecode definately has gotten better, but it's still incredibly loose.

I don't use /category/%category%/ permalinks, I created my own plugin a couple years ago that uses /%scategory%/%postname%.html,

Everything is fine, everything works correctly other than askapache.com/any-thing-not-explicitly-defined which now always displays my featured posts page, without even bothering to redirect to a proper url. Just a 200 OK and heres my homepage for any 404 page.

I am sure it's not related to apache or those rules, to check I tried it with several versions, on several hosts. Sorry I'm going on and on..

So now that I know its the new rewrite code that is doing this, (and I realize with a 100% default install it would work), does that mean it's not query-related? As I get further along with the debugging plugin I'm working on, I think I can help with some of this, since I'm working on it anyway. Any ideas? I hate the idea of bugging people, and this isn't a small thing to fix or even look at I know.

comment:23 nacin4 years ago

The topic_count_cllback is my fault. Fixing.

comment:24 follow-up: scribu4 years ago

  • Component changed from Press This to Rewrite Rules
  • Owner scribu deleted
  • Status changed from reopened to assigned

So now that I know its the new rewrite code that is doing this, (and I realize with a 100% default install it would work), does that mean it's not query-related?

It means it's plugin related.

There were no rewrite rules changed since WP 3.0, that I know of. nacin?

comment:25 in reply to: ↑ 24 nacin4 years ago

Replying to scribu:

There were no rewrite rules changed since WP 3.0, that I know of. nacin?

Nothing that I can think of.

I don't see anything that would cause this. Please see if you can produce it with no plugins, on the default theme, on a new install, with the most minimal code possible to trigger it.

comment:26 ryan4 years ago

  • Milestone 3.1 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.