Support Forum
Hi,
i have a problem with
"list topic you have post"
"list topic you started"
got error like in title. Checking error log i found
file: xxxxxxxxxxxxxxxxxxxxxxxxx/wp-content/plugins/simple-press/forum/content/classes/sp-search-view-class.php
line: 222
function: select
error: Unknown column 'wp_sfposts.wp_sfposts.topic_id' in 'field list'
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_sfposts.wp_sfposts.topic_id FROM wp_sfposts JOIN wp_sftopics ON wp_sftopics.topic_id = wp_sfposts.topic_id WHERE wp_sfposts.user_id=10 AND wp_sfposts.forum_id IN (11,10,12,13) AND topic_hide_posters=0 ORDER BY wp_sfposts.topic_id DESC LIMIT 0, 30
i think error is becouse of 'wp_sfposts.wp_sfposts.topic_id
'wp_sfposts.wp_sfposts.topic_id' is double it should be 'wp_sfposts.topic_id' i guess
any suggestion how can fix this? i'm unable to use list topic post/started
Wow....
Seems like there is a problem with the Hide Poster plugin that has been missed until now. Apologies for that. I will open a ticket quickly and take a look at what is going on. If it is a simple fix I will post it here in case you want to make the edit locally.
YELLOW
SWORDFISH
|
Again - sorry about this. The search code and query was changed and this addition to the search query was overlooked. If you Do want to make an edit to allow it to function then here are the details. It is very simple.
The file you need to edit is in the Simple:Press Plugins folder - i.e., where our own plugins are located. You need the file /problem-with-post-edit-buttonide-poster/sp-hide-poster-plugin.php
At line 213 is this function:
function sp_hide_poster_search_query($query, $searchterm, $searchtype, $searchinclude, $seachthis) { if ($searchtype == 4 || $searchtype == 5) { $query->fields = str_replace('topic_id' , SFPOSTS.'.topic_id', $query->fields); $query->where.= ' AND topic_hide_posters=0'; $query->where = str_replace('user_id' , SFPOSTS.'.user_id', $query->where); $query->join.= SFTOPICS.' ON '.SFTOPICS.'.topic_id = '.SFPOSTS.'.topic_id'; } return $query; }
You just need to remove the line of code:
$query->fields = str_replace('topic_id' , SFPOSTS.'.topic_id', $query->fields);
and all should then be well.
YELLOW
SWORDFISH
|
OMG! Its worked
Is not important since you solution fixed the problem at all but can I ask if you have any idea how i have create this error so i will try to avoid and not repeat in future or it's is just a random issue?
thanks for fast help I would never tired to repeat Simple Press Team is one of best support ever
1 Guest(s)