• Welcome to Simple Machines Community Forum. Please login or sign up.
December 01, 2021, 05:43:00 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Search Error

Started by plusev, July 21, 2009, 07:40:06 PM

Previous topic - Next topic

plusev

Do any search yeilds

The database value you're trying to insert does not exist: id_search

Please advise. Thx

Arantor

Is there any more information in the error log than that?
No good deed goes unpunished
All helpful urges should be circumvented

plusev

Nothing in the log. It's only once in a while now.

H

Are you using a search index? See: Search
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

plusev

Actually I think I found the issue. I have a few test posts named "test" so I did a search for "test" to see if search was functioning correctly. Thats when I got the error. All other searchs seems to work.

+EV

H

Its good that it isn't happening all the time but you may still want to look at fixing it. If you're using a search index you can try rebuilding it
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

plusev

I have no index and it was the first search I ever did. Only 2 posts and 1 member in the test forum. It just freaked when I searched for the term "test"

Thx

plusev

August 05, 2009, 12:11:20 AM #7 Last Edit: September 17, 2009, 01:11:05 AM by plusev
Now if I enter the word test into my search I get the following error -

The database value you're trying to insert does not exist: id_search
Function: PlushSearch2

please advise

Norv

Can you please make sure you paste the entire error message here?

Or, make a screenshot with it, if you can.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

The database value you're trying to insert does not exist: id_search

Is the actual error on the search page. Attached is the error log.

Thx

Norv

It seems your database may be missing a field from a table. I wonder how that could happen.
Can you please run the following query in phpMyAdmin, and copy paste or screenshot here the results:

SHOW COLUMNS FROM smf_log_search_results

( What is phpMyAdmin? )
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

You were correct. How a missing table?? No idea but thankfully fixed. Thx for pointing me in the right direction.

Norv

Cheers, great to hear you got it sorted out!
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

Still not able to search. Getting this error:

An Error Has Occurred!
The database value you're trying to insert does not exist: id_search 

From error log:

Type of error: Critical
The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
File: //web/Sources/Search.php
Line: 1567 



Norv

Quote from: Norv on August 06, 2009, 11:19:48 AM
Can you please run the following query in phpMyAdmin, and copy paste or screenshot here the results:

SHOW COLUMNS FROM smf_log_search_results

( What is phpMyAdmin? )

Eventually, please attach your ./Sources/Search.php as well, I wonder if meanwhile a mod might have changed it.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

SQL-query:
SHOW COLUMNS FROM smf_log_search_results 
[Edit] [Create PHP Code] [Refresh]

Field  Type  Null  Key  Default  Extra 
id_search tinyint(3) unsigned NO PRI 0   
id_topic mediumint(8) unsigned NO PRI 0   
id_msg int(10) unsigned NO   0   
relevance smallint(5) unsigned NO   0   
num_matches smallint(5) unsigned NO   0   


________________

Sorry for the delay, Thx

Norv

I see nothing obviously wrong in the file and table.

Could you please make sure you enable the option to "log database queries" from your administration panel. Then try searching again. Perhaps it will tell us more about the error.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

"Include database query in the error log" was enabled. Is that the same as "log database queries"?

Norv

Yes, that one...
Please, instead, use this file, and make a search. It will log the exact query (in your forum error log). Please copy and paste it here.
It's only meant to log the query, so please just use it once to see the log, then replace it back with your original file.

(rename the file to Search.php :) )
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

September 16, 2009, 01:06:59 PM #19 Last Edit: September 17, 2009, 01:12:35 AM by plusev
Here is the error log entry:

512:
INSERT IGNORE INTO {db_prefix}log_search_results
(id_search, relevance, id_topic, id_msg, num_matches)
File: /Sources/Search.php
Line: 1565 

==>1565: LIMIT ' . $modSettings['search_max_results']), E_USER_WARNING);

Thx

Advertisement: