Forum Menu - Click/Swipe to open
 

[BUG] "People's Say" section not updating in Recent Posts (SQL Error)

You have contributed 0.0% of this topic

Thread Tools
Appreciate
Topic Appreciation
To appreciate this topic, click 'Appreciate Topic' on the right.
Rank Image
Rajab's avatar
Offline
Unspecified
2,275
Brother
1,096
Rajab's avatar
#1 [Permalink] Posted on 19th January 2026 12:53
​Location: Forum Index > Sharing & Voicing > People's Say (Forum ID: 14)

​Description of Issue:
When posting a reply in this section, a MariaDB syntax error occurs. While the post does successfully save inside the thread, the thread is not being "bumped" to the top of the Recent Posts list. The forum index still shows the previous user and timestamp as the "Last Post."

​Error Message:
​You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE forum_id = 14' at line 1
UPDATE msf_forums SET forum_last_post_id = WHERE forum_id = 14

​Impact:
Because the forum_last_post_id is failing to update, new activity in the "People's Say" section is invisible on the main forum index and "Recent Posts" feed.
report post quote code quick quote reply
No post ratings
back to top
Rank Image
Rajab's avatar
Offline
Unspecified
2,275
Brother
1,096
Rajab's avatar
#2 [Permalink] Posted on 19th January 2026 12:57
​To fix this, the developer should:

​Check Variable Assignment: Locate the code responsible for updating the msf_forums table after a post is saved. Ensure the variable (e.g., $new_post_id) is correctly captured from the database's "insert id" before the update query is run.

Add a Conditional Check: Wrap the update query in a simple if statement so it only runs if the ID is not empty.
​Logic: if (post_id is not empty)
run UPDATE msf_forums ...


Database Sync: Once the code is fixed, the "People's Say" (ID: 14) statistics may need a manual "Resync" from the Admin Control Panel to show the correct latest post.
report post quote code quick quote reply
No post ratings
back to top
Yasin's avatar
UK
6,698
Brother
942
Yasin's avatar
#3 [Permalink] Posted on 19th January 2026 17:50
Jazakallah. This will be checked and updated.
report post quote code quick quote reply
No post ratings
back to top
Yasin's avatar
UK
6,698
Brother
942
Yasin's avatar
#4 [Permalink] Posted on 19th January 2026 17:53
Bug hopefully fixed.
report post quote code quick quote reply
No post ratings
back to top
Rank Image
Rajab's avatar
Offline
Unspecified
2,275
Brother
1,096
Rajab's avatar
#5 [Permalink] Posted on 19th January 2026 22:09
Jzk. Let's see if this post gets updated.
report post quote code quick quote reply
No post ratings
back to top