News:

Wondering if this will always be free?  See why free is better.

Main Menu

Search not working after upgrade

Started by Astondb5, March 22, 2008, 12:32:32 PM

Previous topic - Next topic

Astondb5

when users try to search they recieve this message:

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


This forum was upgraded to SMF 2.0B3 from SMF 1.1.4

metallica48423

can you look in phpmyadmin (What is phpMyAdmin?) and see if you have id_search as a column in both log_search_messages and log_search_results?

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Astondb5


Astondb5

Also...I realized after this original post that I have 5 boards in this forum and when I uncheck the all boards and search each one individually I only have 1 board that generates this error

metallica48423

that is strange.  Have you tried running repair on the database from phpmyadmin to see if that sorts the problem/
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Astondb5

I haven't tried that....how would I go about doing that.  Sql and I don't get along very well

metallica48423

i dont have the visual guide with me right now but if you go in and select your database on the left, then go down below the table list there should be options for checking all the tables and a drop down for operations to do. you need the repair one
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Astondb5

ok I did that and it still doesn't work on 1 of the 5 boards in the forum

rsw686

You might try the "Empty out unimportant logs." option from the admin panel. I know this clears the search tables. Might fix the problem.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Astondb5

Already tried that too...thanks for the suggestion though

metallica48423

Im out of ideas.  Posted to the support team board to see if someone has any idea.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

SleePy

Astondb5,

I would like to see the query that is running.
Using FTP, can you open your Settings.php and add in anywhere this line:

$db_show_debug = true;


This will put your forum into a debug mode.

Attempt to run search again. The error message you get back should contain a lot more information and the full query that it attempted to run.
This would help us greatly :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Astondb5

 Astondb5   
Today at 04:29:52 PM
  9023ef8639720fb63faf59559aa297e7
Type of error: Critical
http://boards.fender-bender.org/index.php?action=search2
The database value you're trying to insert does not exist: id_search
Function: plushsearch2
File: /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php
Line: 1531

Astondb5

ok lets throw this into the mix....I searched for different words...some work some dont

SleePy

Astondb5,

You would be on the search page when you get the full error, I wanted to see the query it was going to perform that it found the error in.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Astondb5

ok I think this is what you are talking about

QuoteTemplates: 3: index (default), Search (default), Errors (default).
Sub templates: 6: init, html_above, body_above, fatal_error, body_below, html_below.
Language files: 2: index+Modifications.english (default), Search.english (default).
Style sheets: 0: .
Files included: 16 - 636KB. (show)
Queries used: 20.

         SELECT variable, value
         FROM smf_settings
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Load.php line 158, which took 0.0015049 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '5d2248041e4fa6b4bc0997e0282f9735'
      LIMIT 1
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Load.php line 2132, which took 0.00073886 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Load.php line 348, which took 0.00061083 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme = 1
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Load.php line 1267, which took 0.00066209 seconds.

            DELETE FROM smf_log_online
            WHERE log_time < 1208180687
               AND session != '5d2248041e4fa6b4bc0997e0282f9735'
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 2709, which took 0.00036597 seconds.

         UPDATE smf_log_online
         SET log_time = 1208181587, ip = IFNULL(INET_ATON('66.184.241.26'), 0), url = 'a:2:{s:6:\"action\";s:7:\"search2\";s:10:\"USER_AGENT\";s:112:\"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13\";}'
         WHERE session = '5d2248041e4fa6b4bc0997e0282f9735'
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 2725, which took 0.00048494 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 526, which took 0.00031304 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 548, which took 0.00025797 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1208181585
         AND log_type = 'search'
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 3103, which took 0.00039196 seconds.

      REPLACE INTO smf_log_floodcontrol(ip, log_time, log_type)
      VALUES
         (SUBSTRING('66.184.241.26', 1, 16), 1208181587, 'search')
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 3111, which took 0.00036621 seconds.

      REPLACE INTO smf_settings(variable, value)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('51', 1, 65534))
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 630, which took 0.00045705 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 51
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 975, which took 0.00148296 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 1186, which took 0.00029683 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 1196, which took 0.00033402 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 51
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 1206, which took 0.00030899 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 51, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%test%'
                     LIMIT 1200
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Search.php line 1304, which took 0.034199 seconds.

      INSERT INTO smf_log_errors(id_member, log_time, ip, url, message, session, error_type, file, line)
      VALUES
         (1, 1208181587, SUBSTRING('66.184.241.26', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('The database value you\'re trying to insert does not exist: id_search<br />Function: plushsearch2', 1, 65534), '7e9cd1f9b061b6304609304540fbc7f5', 'critical', SUBSTRING('/home/content/f/e/n/fenderbender/html/smf/Sources/Search.php', 1, 255), 1531)
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Errors.php line 150, which took 0.00182796 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2008-04-14'
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 3056, which took 0.00073195 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in /home/content/f/e/n/fenderbender/html/smf/Sources/Subs.php line 2585, which took 0.00065994 seconds.

metallica48423

SleePy, did you ever get a chance to look into this?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Astondb5


Russell Howard

I was getting a slightly different error. It was complaining about "Wrong value type sent to the database. Integer expected." when performing a search.
I tracked it down to being to do with the relevance result of the search not being worked out to an integer. So adding the code:
$row[1] = round($row[1]);
at line 1541 or search.php fixed the problem.

Hope that helps someone!  :D

picos

Is there a fix for this error yet?  I tried $row[1] = round($row[1]); but that didn't help...  I can  search within a topic but not within a board or I get that error. 

edi67

same problem for me this my error too:

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

i using smf 2.0 beta 3.1

with some words work with another not work and show me that error
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Astondb5

I fixed my error by going to the search options and changing rebuilding the index and using an indexed search and it now works fine

holodoc

Quote from: Astondb5 on June 05, 2008, 08:02:15 PM
I fixed my error by going to the search options and changing rebuilding the index and using an indexed search and it now works fine
This solution worked for me too. I made a medium custom index in my search options and checked the forced index usage options. It works fine.

FMaz

I know the topic is really old, but I have the exact same problem with SMF 2, RC2, and I think it still pertinent. (Note that I use a french version, so I might translate some words a bit differently)

So to activate the Index Search, I must go in:
Forum->Search->Search Mode.

And then I have 3 checkbox in the Search Index frame:
- No index
- Text index
- Custom Index

For now, I'm not indexed (No Index), so I wanted to use Text Index. When selecting the radio box, I receive a message that tells me that to use text index, I must create an index.

Also, under the radio box, I have a little note saying:
"Index: ne peut être créé car le message dépasse la taille de 65,535 caractères ou la table n'est pas du type MyISAM "

Translation: "Index: cannot be created because the message size exceed 65,635 characters or the table isn't a MyISAM one."

All my tables are MyISAM. And I'm sure that I do have messages exceeding 65635 character.


So my question is:
How can I fix the error and activate the search ?  :-\
(Because it looks kind of dumb to have an error when using a basic function such as "search"  ;))

joker7

any info on this error?
i have smf 2.0 rc4 and i am getting this, also when i create a full index after that some searches return totally unrelated results.
the error log says

siteurl/index.php?action=search2
The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
File: sitepath/Sources/Search.php
Line: 1570

imseor

Quote from: joker7 on December 11, 2010, 01:36:01 PM
any info on this error?
i have smf 2.0 rc4 and i am getting this, also when i create a full index after that some searches return totally unrelated results.
the error log says

siteurl/index.php?action=search2
The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
File: sitepath/Sources/Search.php
Line: 1570

I have had the same error. Tick "Enable simple search" in Admin/Forum/Search -> Settings helped me.

Advertisement: