No announcement yet.

Database error

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Bug / Issue] Database error

    I received the following email.

    Database error in vBulletin 5.4.3:

    Invalid SQL:
    INSERT INTO searchtowords_i (`nodeid`,`wordid`,`is_title`,`score`,`position`) VALUES (323,12249,0,10000,72)

    MySQL Error : Duplicate entry '12249-323' for key 'wordid'
    Error Number : 1062
    Request Date : Sunday, September 16th 2018 @ 03:37:25 AM
    Error Date : Sunday, September 16th 2018 @ 03:37:25 AM
    Script :
    Referrer :
    IP Address :
    Username : Angelo Cannata
    Classname : vB_Database_MySQLi
    MySQL Version : 5.6.40-84.0-log

    Stack Trace:
    #0 vB_Database->getErrorData() called in [path]/vb/database.php on line 1188
    #1 vB_Database->halt() called in [path]/vb/database/mysqli.php on line 201
    #2 vB_Database_MySQLi->execute_query() called in [path]/vb/database.php on line 542
    #3 vB_Database->query_write() called in [path]/vb/db/query/multipleinsert.php on line 114
    #4 vB_dB_Query_MultipleInsert->doMultipleInserts() called in [path]/vb/db/query/multipleinsert.php on line 89
    #5 vB_dB_Query_MultipleInsert->execSQL() called in [path]/vb/db/assertor.php on line 304
    #6 vB_dB_Assertor->assertQuery() called in [path]/vb/db/assertor.php on line 519
    #7 vB_dB_Assertor->insertMultiple() called in [path]/packages/vbdbsearch/core.php on line 161
    #8 vBDBSearch_Core->indexText() called in [path]/vb/search/core.php on line 118
    #9 vB_Search_Core->index() called in [path]/vb/library/search.php on line 42
    #10 vB_Library_Search->index() called in [path]/vb/library/content.php on line 2118
    #11 vB_Library_Content->update() called in [path]/vb/library/content/text.php on line 473
    #12 vB_Library_Content_Text->update() called in [path]/vb/api/content.php on line 422
    #13 vB_Api_Content->update() called in [path]/vb/api/content/text.php on line 295
    #14 vB_Api_Content_Text->update() called in [path]/vb/api/wrapper.php on line 199
    #15 vB_Api_Wrapper->__call() called in /home/spirit04/public_html/includes/api/interface/collapsed.php on line 101
    #16 Api_Interface_Collapsed->callApi() called in /home/spirit04/public_html/includes/vb5/frontend/controller/createcontent.php on line 337
    #17 vB5_Frontend_Controller_CreateContent->updateNode() called in /home/spirit04/public_html/includes/vb5/frontend/controller/createcontent.php on line 278
    #18 vB5_Frontend_Controller_CreateContent->actionTextNodeInternal() called in /home/spirit04/public_html/includes/vb5/frontend/controller/createcontent.php on line 185
    #19 vB5_Frontend_Controller_CreateContent->index() called in /home/spirit04/public_html/index.php on line 74

    I already tried to delete that post and created a new post with the same title, but it still gives me that error email.

  • #2
    Can you run these queries on your site?

    show create table `node`;
    show create table `text`;
    show create table `word`;
    You can run queries using phpMyAdmin, Adminer or similar tools. If you don't know if you have these, contact your hosting provider to ask them.

    Paste the results in a reply here. If you have a table prefix defined in your core/includes/config.php, you will need to modify the table names (node, text, and word) appropriately.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.


    • #3
      I did it. I obtained the following result:


      SQL query:

      show create table `word`

      MySQL said: Documentation
      #1146 - Table 'spirit04_vb.word' doesn't exist


      • In Omnibus
        In Omnibus commented
        Editing a comment
        Try the query again with the table name spirit04_vb.words - It should display a table with a wordid column

    • #4
      I obtain this result:


      SQL query:

      show create table `spirit04_vb.words`

      MySQL said: Documentation
      #1146 - Table 'spirit04_vb.spirit04_vb.words' doesn't exist


      • #5
        It looks like you have a table prefix. As Wayne mentioned, check the table_prefix option in core/includes/config.php file. If it's set to 'vb_' then you have to prepend it to the table name such as vb_word, vb_node, vb_text

        GIPHY for vB5 | AutoLinker | Video Attachments Player | Last Registered Users Module | Clear System Cache Cron | Drag-n-Drop Upload | Topic AJAX AutoUpdate | Force Read Topic


        • #6
          My core/includes/config.php file has this text in lines 41-43:

          // ****** TABLE PREFIX ******
          // Prefix that your vBulletin tables have in the database.
          $config['Database']['tableprefix'] = '';

          So, it looks like no prefix is set.