Advertisement:

Author Topic: Search error in 2.1 RC2 GitHub Version  (Read 963 times)

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
Search error in 2.1 RC2 GitHub Version
« on: November 27, 2019, 04:00:23 AM »
All,

Just got these errors form searching, see attachment.

This is only my test site.

Quote
root
 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)


« Last Edit: November 27, 2019, 04:12:51 AM by gecitli »
http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: Search error in 2.1 RC2 GitHub GitHub Version
« Reply #1 on: November 27, 2019, 04:07:21 AM »
What commit on GitHub?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: Search error in 2.1 RC2 GitHub Version
« Reply #3 on: November 27, 2019, 05:01:01 AM »
Yes, but when did you download it? It matters.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
Re: Search error in 2.1 RC2 GitHub Version
« Reply #4 on: November 27, 2019, 05:03:44 AM »
today 2 hours ago.
http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #5 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?
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #6 on: November 27, 2019, 05:17:09 AM »
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

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #7 on: November 27, 2019, 05:23:06 AM »
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

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
Re: Search error in 2.1 RC2 GitHub Version
« Reply #8 on: November 27, 2019, 05:24:24 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.

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #9 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).
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
Re: Search error in 2.1 RC2 GitHub Version
« Reply #10 on: November 27, 2019, 05:34:09 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

Code: [Select]
// *** 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'],
)
);

Code: [Select]
// *** 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.

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #11 on: November 27, 2019, 06:14:30 AM »
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

Offline gecitli

  • Jr. Member
  • **
  • Posts: 314
    • webmaster forumu
Re: Search error in 2.1 RC2 GitHub Version
« Reply #12 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?
http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #13 on: November 27, 2019, 07:41:22 AM »
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.
« Last Edit: November 27, 2019, 08:12:14 AM by m4z »
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline SRHT

  • Newbie
  • *
  • Posts: 1
Re: Search error in 2.1 RC2 GitHub Version
« Reply #14 on: November 27, 2019, 08:03:49 AM »
same mistake.

Code: [Select]
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)

Code: [Select]
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)


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: Search error in 2.1 RC2 GitHub Version
« Reply #15 on: November 27, 2019, 10:25:43 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...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 599
Re: Search error in 2.1 RC2 GitHub Version
« Reply #16 on: November 27, 2019, 10:33:05 PM »
As  always use the nightly download would  be the easy way...

Offline m4z

  • Localizer
  • Sr. Member
  • *
  • Posts: 914
  • /mɛs/
Re: Search error in 2.1 RC2 GitHub Version
« Reply #17 on: November 28, 2019, 05:12:44 PM »
I now reported this as GH#5877.
"Faith is what you have in things that don't exist."
--Homer Simpson