Problem displaying forum / No categories created message / But categories have been created.
Quote from hkdave95 on April 23, 2020, 3:41 amDear Asgaros
- I set up some categories and set them to “Only when logged in”.
- Then I played around with the settings, finally leaving the two “Hide…” settings unticked.
- The forum is not displaying as per 1.
- Then I set the Categories to “Everyone”, still the categories do not show when not logged in
- They do show fine when logged in.
- Site is https://www.coderslament.uk
Nice piece of work …
KR
David
Dear Asgaros
- I set up some categories and set them to “Only when logged in”.
- Then I played around with the settings, finally leaving the two “Hide…” settings unticked.
- The forum is not displaying as per 1.
- Then I set the Categories to “Everyone”, still the categories do not show when not logged in
- They do show fine when logged in.
- Site is https://www.coderslament.uk
Nice piece of work …
KR
David
Quote from hkdave95 on April 26, 2020, 6:14 pmDear Asgaros
- I was getting an 500 server error searching from the search box…This might be part of the problem.
- I turned on debug.
- Turns out a SQL Statement was causing a problem. / I think “AND f.parent_id IN ()” is the culprit.
SELECT t.*, f.id AS forum_id, f.name AS forum_name, (SELECT (COUNT(*) - 1) FROM wp_forum_posts WHERE parent_id = t.id) AS answers, su.topic_id, SUM(su.score_name + su.score_text) AS score FROM (SELECT id AS topic_id, MATCH (name) AGAINST ('A*' IN BOOLEAN MODE) AS score_name, 0 AS score_text FROM wp_forum_topics WHERE MATCH (name) AGAINST ('A*' IN BOOLEAN MODE) GROUP BY topic_id UNION SELECT parent_id AS topic_id, 0 AS score_name, MATCH (text) AGAINST ('A*' IN BOOLEAN MODE) AS score_text FROM wp_forum_posts WHERE MATCH (text) AGAINST ('A*' IN BOOLEAN MODE) GROUP BY topic_id) AS su, wp_forum_topics AS t, wp_forum_forums AS f WHERE su.topic_id = t.id AND t.parent_id = f.id AND t.approved = 1 AND f.parent_id IN () GROUP BY su.topic_id ORDER BY score DESC, su.topic_id DESC LIMIT 0, 20- I am attaching a screen shot of the forum forum data table.
- The issue described in the previous thread is still occurring.
KR
David
Dear Asgaros
- I was getting an 500 server error searching from the search box…This might be part of the problem.
- I turned on debug.
- Turns out a SQL Statement was causing a problem. / I think “AND f.parent_id IN ()” is the culprit.
-
SELECT t.*, f.id AS forum_id, f.name AS forum_name, (SELECT (COUNT(*) - 1) FROM wp_forum_posts WHERE parent_id = t.id) AS answers, su.topic_id, SUM(su.score_name + su.score_text) AS score FROM (SELECT id AS topic_id, MATCH (name) AGAINST ('A*' IN BOOLEAN MODE) AS score_name, 0 AS score_text FROM wp_forum_topics WHERE MATCH (name) AGAINST ('A*' IN BOOLEAN MODE) GROUP BY topic_id UNION SELECT parent_id AS topic_id, 0 AS score_name, MATCH (text) AGAINST ('A*' IN BOOLEAN MODE) AS score_text FROM wp_forum_posts WHERE MATCH (text) AGAINST ('A*' IN BOOLEAN MODE) GROUP BY topic_id) AS su, wp_forum_topics AS t, wp_forum_forums AS f WHERE su.topic_id = t.id AND t.parent_id = f.id AND t.approved = 1 AND f.parent_id IN () GROUP BY su.topic_id ORDER BY score DESC, su.topic_id DESC LIMIT 0, 20
- I am attaching a screen shot of the forum forum data table.
- The issue described in the previous thread is still occurring.
KR
David
Uploaded files:Quote from Asgaros on May 6, 2020, 3:43 amHello @hkdave95
Sorry for the late reply! Do you have access to your PHPs error.log-file? It would be helpful to see the exact error-message when this issue occurs.
Have you by accident assigned some user-groups to the forum? For some reasons it seems, that the forum-system cannot fetch accessible categories for you. Which user-role are you using when this issue occurs? Have you modified your themesĀ functions.php file?
Hello @hkdave95
Sorry for the late reply! Do you have access to your PHPs error.log-file? It would be helpful to see the exact error-message when this issue occurs.
Have you by accident assigned some user-groups to the forum? For some reasons it seems, that the forum-system cannot fetch accessible categories for you. Which user-role are you using when this issue occurs? Have you modified your themesĀ functions.php file?
Quote from hkdave95 on May 6, 2020, 4:24 amHello Asgaros
I shall locate the error log. 6:14pm post I believe I have located the problem. Try running the SQL on same version data and you get the same.
AND f.parent_id IN ()This is an empty set, and is not allowed in SQL. The software generated the statement, so must be a problem with the software?
I think it is related to the fact that the forum is not displaying properly.
Could the installation, or setup be duff?
Right. Looking for error log.
KR
David
Hello Asgaros
I shall locate the error log. 6:14pm post I believe I have located the problem. Try running the SQL on same version data and you get the same.
AND f.parent_id IN ()
This is an empty set, and is not allowed in SQL. The software generated the statement, so must be a problem with the software?
I think it is related to the fact that the forum is not displaying properly.
Could the installation, or setup be duff?
Right. Looking for error log.
KR
David
Quote from hkdave95 on May 6, 2020, 4:26 amFurther to your questions.
User groups / no.
Functions.php / no.
The forum has two or three user groups, I believe.
Further to your questions.
User groups / no.
Functions.php / no.
The forum has two or three user groups, I believe.
Quote from hkdave95 on May 6, 2020, 4:59 amThank you. @Asgaros / It was the user groups selection (I now note, and furthermore, understand the text).
However, when no categories are created (or visible), the search box throws the error.
Onwards…
Thank you. @Asgaros / It was the user groups selection (I now note, and furthermore, understand the text).
However, when no categories are created (or visible), the search box throws the error.
Onwards…
Quote from Asgaros on May 12, 2020, 3:55 amHi @hkdave95
Good catch! I fixed the query-error on the dev-version and the bugfix will be included in the upcoming release:
https://github.com/Asgaros/asgaros-forum/commit/2929902fe7544d4e784c30ea3ed4a0063e83e371
Hi @hkdave95
Good catch! I fixed the query-error on the dev-version and the bugfix will be included in the upcoming release:
https://github.com/Asgaros/asgaros-forum/commit/2929902fe7544d4e784c30ea3ed4a0063e83e371