Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
186 views
in Q2A Core by

We are currently facing a pagination issue on the Moderation page of our site.

In the Admin panel, it displays "Moderation (1481)", indicating that 1,481 posts are pending moderation. However, on the actual moderation page, only 150 posts are shown, and there is no pagination option to access the remaining posts beyond this limit.

We also tried manually accessing the next set of posts using the URL pattern
https://xxxxx.in/admin/moderate?start=151, but it did not work.

Q2A version: 1.8.8
by
in the admin/admin-moderate.php

list($queuedquestions, $queuedanswers, $queuedcomments) = qa_db_select_with_pending(
    qa_db_qs_selectspec($userid, 'created', 0, null, null, 'Q_QUEUED', true),
    qa_db_recent_a_qs_selectspec($userid, 0, null, null, 'A_QUEUED', true),
    qa_db_recent_c_qs_selectspec($userid, 0, null, null, 'C_QUEUED', true)
);

where, in the db/selects.php, the above three functions defined.

In each, a upper limit of no.of records set via

$count = isset($count) ? min($count, QA_DB_RETRIEVE_QS_AS) : QA_DB_RETRIEVE_QS_AS;

QA_DB_RETRIEVE_QS_AS is set to 50 in db/maxima.php

So, 50 questions, 50 answers and 50 comments, total 150 posts displayed on the moderation page.
by
By changing the value of QA_DB_RETRIEVE_QS_AS, the problem will be solved. However, as the QA_DB_RETRIEVE_QS_AS refferred at multiple places, it is not appropriate to change the value of QA_DB_RETRIEVE_QS_AS.

Hence, there were some changes done to the moderation page and flag page. Those are available at https://github.com/q2a/question2answer/pull/1011

1 Answer

0 votes
ago by
I also encountered a similar error with pagination in the admin panel. It was quite annoying when there were a large number of posts to review but I couldn’t access them all. Hopefully the team will fix it soon to make it easier to manage!
ago by
That has been fixed by us.

You may find the changes in the comment section of this question.
...