Something is causing the function qa_db_get_pending_result('navpages'); to return a value of -106 value for the "permit" field if it is 150:
[6]=>
array(9) {
["pageid"]=>
string(1) "6"
["title"]=>
string(3) "FAQ"
["flags"]=>
string(1) "1"
["permit"]=>
string(4) "-106"
["nav"]=>
string(1) "M"
["tags"]=>
string(3) "faq"
["position"]=>
string(1) "1"
["heading"]=>
NULL
["_order_"]=>
int(2)
}
Setting permit to NULL in the database brings the pages back:
[5]=>
array(9) {
["pageid"]=>
string(1) "5"
["title"]=>
string(4) "Wiki"
["flags"]=>
string(1) "1"
["permit"]=>
NULL
["nav"]=>
string(1) "M"
["tags"]=>
string(4) "wiki"
["position"]=>
string(1) "2"
["heading"]=>
NULL
["_order_"]=>
int(1)
}
UPDATE:
Still can't figure this one out, but it's something to do with the selectspec not loading. Loading the selectspec in qa-page.php fixes the problem:
function qa_page_queue_pending()
/*
Queue any pending requests which are required independent of which page will be shown
*/
{
if (qa_to_override(__FUNCTION__)) return qa_call_override(__FUNCTION__, $args=func_get_args());
qa_preload_options();
$loginuserid=qa_get_logged_in_userid();
if (isset($loginuserid)) {
if (!QA_FINAL_EXTERNAL_USERS)
qa_db_queue_pending_select('loggedinuser', qa_db_user_account_selectspec($loginuserid, true));
qa_db_queue_pending_select('notices', qa_db_user_notices_selectspec($loginuserid));
}
qa_db_queue_pending_select('widgets', qa_db_widgets_selectspec());
qa_db_queue_pending_select('navpages', qa_db_pages_selectspec());
qa_db_select_with_pending(
qa_db_pages_selectspec(),
null
);
}