Notifications
Clear all

wpForo 1.x.x [Solved] Topic icons are not updated after v1.60

6 Posts
2 Users
1 Likes
1,476 Views
spider
Posts: 54
Topic starter
(@spider)
Trusted Member
Joined: 5 years ago

I'm seeing this bug only on Q/A forums. The topic icons don't change when solved. It's fine after I clear the topic cache. But I need to do it everytime. Now I'm using v1.6.1 and it's still the same. 

Topic Tags
5 Replies
3 Replies
Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 9278

Thank you for letting us know. We'll check this and fix in upcoming version.

spider
(@spider)
Joined: 5 years ago

Trusted Member
Posts: 54

I just want to remind you this issue. We're in v1.6.5 but It's still the same.

spider
(@spider)
Joined: 5 years ago

Trusted Member
Posts: 54

After v1.7.0 this problem still exist.

Robert
Posts: 9278
Admin
(@robert)
Support Team
Joined: 6 years ago

Hi @spider,

We just fixed this issue, it'll be available with next update. If you need it fix urgently you can edit this file:

/wp-content/plugins/wpforo/wpf-includes/wpf-hooks.php file.

Find this part of code:

if( FALSE !== WPF()->db->query( "UPDATE ".WPF()->tables->posts." SET is_answer = ".intval($_POST['answerstatus'])." WHERE postid = " . intval($postid) ) ){
wpforo_clean_cache('post', $postid, $post);
do_action('wpforo_answer', intval($_POST['answerstatus']), $post);
WPF()->notice->add('done', 'success');
$response['stat'] = 1;
$response['notice'] = WPF()->notice->get_notices();
}

Change it to this:

if( FALSE !== WPF()->db->query( "UPDATE ".WPF()->tables->posts." SET is_answer = ".intval($_POST['answerstatus'])." WHERE postid = " . intval($postid) ) ){
wpforo_clean_cache('post', $postid, $post);
do_action('wpforo_answer', intval($_POST['answerstatus']), $post);
WPF()->db->query( "UPDATE ".WPF()->tables->topics." SET `solved` = " . intval($_POST['answerstatus']) . " WHERE `topicid` = " . intval($post['topicid']) );
WPF()->notice->add('done', 'success');
$response['stat'] = 1;
$response['notice'] = WPF()->notice->get_notices();
}

 

1 Reply
spider
(@spider)
Joined: 5 years ago

Trusted Member
Posts: 54

@robert

Thank you very much. That line was what I need 🙂

Share: