Search error in 2.1 RC2 GitHub Version

Started by gecitli, November 27, 2019, 04:00:23 AM

Previous topic - Next topic

gecitli

All,

Just got these errors form searching, see attachment.

This is only my test site.

Quoteroot
Today at 08:40 AM
::1
21df2fd2ce1a15c953236c76c59e42e7
Type of error: Undefined
8: Undefined variable: approve_query
http://localhost/son/index.php?action=search2
D:/xampp/htdocs/son/Sources/Search.php (Line 1715)


http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

Arantor


gecitli

http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

Arantor

Yes, but when did you download it? It matters.

gecitli

http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

m4z

Did you install the "release" download from Github or did you install from the git HEAD files?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

m4z

Oh wait... This is the current HEAD I think, I saw those too in my installations. They only happen sporadically, once after update and once or twice during mod install/uninstall. (Edit: And for every forum search, quite expectedly.)
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

m4z

Yup, seeing this line and line 1828. (GH version of ~2019-10-10.)
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

gecitli

Quote from: m4z on November 27, 2019, 05:15:52 AM
Did you install the "release" download from Github or did you install from the git HEAD files?

I downloaded the "release" file from Github
http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

m4z

Ah, because that file is actually the same as the rc2 in the download section here on sm.org, from way back (2019-03-30 or so).
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

gecitli

Quote from: m4z on November 27, 2019, 05:27:52 AM
Ah, because that file is actually the same as the rc2 in the download section here on sm.org, from way back (2019-03-30 or so).

No, not the same

// *** Retrieve the results to be shown on the page
$participants = array();
$request = $smcFunc['db_search_query']('', '
SELECT ' . (empty($search_params['topic']) ? 'lsr.id_topic' : $search_params['topic'] . ' AS id_topic') . ', lsr.id_msg, lsr.relevance, lsr.num_matches
FROM {db_prefix}log_search_results AS lsr' . ($search_params['sort'] == 'num_replies' ? '
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = lsr.id_topic)' : '') . '
WHERE lsr.id_search = {int:id_search}
ORDER BY {raw:sort} {raw:sort_dir}
LIMIT {int:start}, {int:max}',
array(
'id_search' => $_SESSION['search_cache']['id_search'],
'sort' => $search_params['sort'],
'sort_dir' => $search_params['sort_dir'],
'start' => $_REQUEST['start'],
'max' => $modSettings['search_results_per_page'],
)
);


// *** Retrieve the results to be shown on the page
$participants = array();
$request = $smcFunc['db_search_query']('', '
SELECT ' . (empty($search_params['topic']) ? 'lsr.id_topic' : $search_params['topic'] . ' AS id_topic') . ', lsr.id_msg, lsr.relevance, lsr.num_matches
FROM {db_prefix}log_search_results AS lsr' . ($search_params['sort'] == 'num_replies' || !empty($approve_query) ? '
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = lsr.id_topic)' : '') . '
WHERE lsr.id_search = {int:id_search}' . $approve_query . '
ORDER BY {raw:sort} {raw:sort_dir}
LIMIT {int:start}, {int:max}',
array(
'id_search' => $_SESSION['search_cache']['id_search'],
'sort' => $search_params['sort'],
'sort_dir' => $search_params['sort_dir'],
'start' => $_REQUEST['start'],
'max' => $modSettings['search_results_per_page'],
'is_approved' => 1,
'current_member' => $user_info['id'],
'approve_boards' => !empty($approve_boards) ? $approve_boards : array(0),
)
);
http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

m4z

Did you use the "releases" tab or the green "clone or download" button -> "download zip"?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

gecitli

I've been using smf for years how to install? I know the purpose of opening this thread is to report an error?
http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

m4z

#13
Yes, we heard you, the error will be "logged" on Github and will be fixed. (Thanks!)

I'm just trying to understand how you ended up in the situation you are in. Because if you did download the actual rc2 release file, you shouldn't see this problem, it was introduced later on. This is why I'm trying to find out what happened.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

SRHT

same mistake.


Type of error: Undefined
8: Undefined variable: approve_query
http://localhost:8080/smf/index.php?action=search2
C:/wamp64/www/smf/Sources/Search.php (Line 1828)



Type of error: Undefined
8: Undefined variable: approve_query
http://localhost:8080/smf/index.php?action=search2
C:/wamp64/www/smf/Sources/Search.php (Line 1715)



Arantor

Quote from: gecitli on November 27, 2019, 07:19:06 AM
I've been using smf for years how to install? I know the purpose of opening this thread is to report an error?

Yes, but depending on when you got it from GitHub and how, it can affect us fixing the bug, that's why we ask these questions.

That's why I asked for the commit, as that tells us *exactly* which code you're looking at. Because what's on GitHub up to multiple times a day...

albertlast

As  always use the nightly download would  be the easy way...

m4z

"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Advertisement: