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. 

Advertisement: