Database error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bullettino
    New Member
    • Aug 2018
    • 8
    • 5.3.x

    [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)
    /**searchtowords_i**/;

    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 : https://www.spiritualita.org/create-content/Text/
    Referrer : https://www.spiritualita.org/forum/d...ano-modicano-i
    IP Address : 94.167.242.234
    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.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    Can you run these queries on your site?

    Code:
    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 demonstration site.
    vBulletin 5 API

    Comment

    • bullettino
      New Member
      • Aug 2018
      • 8
      • 5.3.x

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

      Error

      SQL query:

      show create table `word`

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

      Comment


      • 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
    • bullettino
      New Member
      • Aug 2018
      • 8
      • 5.3.x

      #4
      I obtain this result:

      Error

      SQL query:

      show create table `spirit04_vb.words`

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

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4011
        • 5.7.X

        #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

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        • bullettino
          New Member
          • Aug 2018
          • 8
          • 5.3.x

          #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.

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73981

            #7
            The table has to exist. Otherwise it would return a different error instead of duplicate ID. You have a few days left in your 30-day support provided with your purchase. I suggest that you provide server information in a support ticket so we can fix your database. The link is in the footer of this page.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            Related Topics

            Collapse

            Working...