invalid SQL: INSERT INTO closure (`parent`,`child`,`depth`,`publish date`)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aelalfey
    New Member
    • Aug 2012
    • 24
    • 4.2.X

    invalid SQL: INSERT INTO closure (`parent`,`child`,`depth`,`publish date`)

    Dear Sir,

    Vbulletin URL: http://prim.olsmaadi-eg.com/

    I got this error and i can't create new topics anymore

    "Error Database error in vBulletin 5.1.9: Invalid SQL: INSERT INTO closure (`parent`,`child`,`depth`,`publishdate`) VALUES(428,428,0,1445032925) /**closure**/; MySQL Error : Duplicate entry '428-428' for key 'closure_uniq' Error Number : 1062 Request Date : Friday, October 16th 2015 @ 04:02:05 PM Error Date : Friday, October 16th 2015 @ 04:02:06 PM Script : http:///create-content/text/ Referrer : http://prim.olsmaadi-eg.com/new-content/177 IP Address : xxxxxxxxxxxxx Username : xxxxxx Classname : vB_Database_MySQLi MySQL Version : 5.5.42-37.1-log"

    Tried to use different user with no luck. Tried to upgrade from Vbulletin 5.1.8 to 5.1.9 with no luck too.
    Tried Repair/Optimize Closure Table with no luck too.



    Please help
  • Dmitrij
    Member
    • May 2017
    • 56
    • 5.7.0

    #2
    Have the same problem now.
    Vb 5.5.0
    Error Invalid SQL: INSERT INTO closure (`parent`,`child`,`depth`,`publishdate`) VALUES(90133,90133,0,1549393274) /**closure**/;
    Can't create any content on vbulletin

    HELP!!!
    Last edited by Dmitrij; Tue 5 Feb '19, 10:31am.

    Comment

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

      #3
      What is the complete errror?
      Translations provided by Google.

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

      Comment

      • Dmitrij
        Member
        • May 2017
        • 56
        • 5.7.0

        #4
        Originally posted by Wayne Luke
        What is the complete errror?



        Database error in vBulletin 5.5.0: Invalid SQL: INSERT INTO closure (`parent`,`child`,`depth`,`publishdate`) VALUES(90122,90122,0,1549392366) /**closure**/; MySQL Error : Duplicate entry '90122-90122' for key 'closure_uniq' Error Number : 1062 Request Date : Tuesday, February 5th 2019 @ 09:46:06 PM Error Date : Tuesday, February 5th 2019 @ 09:46:07 PM Script : https://www.agni-yoga.net/vbulletin/...-content/text/ Referrer : https://www.agni-yoga.net/vbulletin/new-content/35738 IP Address : xxxxxxxxx Username : Xxxx Classname : vB_Database_MySQLi MySQL Version : 5.5.62-cll-lve Stack Trace: #0 vB_Database->getErrorData() called in [path]/vb/database.php on line 1203 #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 557 #3 vB_Database->query_write() called in [path]/vb/db/query/insert.php on line 115 #4 vB_dB_Query_Insert->doInserts() called in [path]/vb/db/query/insert.php on line 98 #5 vB_dB_Query_Insert->execSQL() called in [path]/vb/db/assertor.php on line 301 #6 vB_dB_Assertor->assertQuery() called in [path]/vb/library/content.php on line 760 #7 vB_Library_Content->add() called in [path]/vb/library/content/text.php on line 731 #8 vB_Library_Content_Text->add() called in [path]/vb/api/content/text.php on line 175 #9 vB_Api_Content_Text->add() called in [path]/vb/api/wrapper.php on line 199 #10 vB_Api_Wrapper->__call() called in /home/agniyoga/public_html/vbulletin/includes/api/interface/collapsed.php on line 101 #11 Api_Interface_Collapsed->callApi() called in /home/agniyoga/public_html/vbulletin/includes/vb5/frontend/controller/createcontent.php on line 426 #12 vB5_Frontend_Controller_CreateContent->createNewNode() called in /home/agniyoga/public_html/vbulletin/includes/vb5/frontend/controller/createcontent.php on line 295 #13 vB5_Frontend_Controller_CreateContent->actionTextNodeInternal() called in /home/agniyoga/public_html/vbulletin/includes/vb5/frontend/controller/createcontent.php on line 185 #14 vB5_Frontend_Controller_CreateContent->index() called in /home/agniyoga/public_html/vbulletin/index.php on line 74 ​​​​​​
        Last edited by Dmitrij; Wed 6 Feb '19, 2:34am.

        Comment

        • Dmitrij
          Member
          • May 2017
          • 56
          • 5.7.0

          #5
          Interesting that mobile version of vbulletin works without this errors

          Comment

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

            #6
            Does the error continue? This isn't a desktop vs. mobile issue. Both would create a duplicate key. Mobile wouldn't see the error because it is suppressed by the API.

            The only way this can happen is if the auto-increment on the node table was changed so that it isn't higher than the highest node id that was previously in the database. truncating the node table without clearing the closure table can cause this to happen. Manually editing the auto-increment on the table after installation can cause it as well. You need to make sure the auto-increment on the node table is higher than the max nodeid in the table and that it is larger than the max parent in the closure table.
            Translations provided by Google.

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

            Comment

            • Dmitrij
              Member
              • May 2017
              • 56
              • 5.7.0

              #7
              Originally posted by Wayne Luke
              Does the error continue? This isn't a desktop vs. mobile issue. Both would create a duplicate key. Mobile wouldn't see the error because it is suppressed by the API.

              The only way this can happen is if the auto-increment on the node table was changed so that it isn't higher than the highest node id that was previously in the database. truncating the node table without clearing the closure table can cause this to happen. Manually editing the auto-increment on the table after installation can cause it as well. You need to make sure the auto-increment on the node table is higher than the max nodeid in the table and that it is larger than the max parent in the closure table.
              Today the error didn't appear
              The only thing I've made since the error appeared is reapgrade the forum with upgrade.php

              Comment

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

                #8
                That wouldn't have fixed the issue if it is an ongoing problem. Upgrade.php will not usually fix database issues that result in errors. It can exacerbate them but won't fix them.

                Can you create content on your site?
                Translations provided by Google.

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

                Comment

                • Dmitrij
                  Member
                  • May 2017
                  • 56
                  • 5.7.0

                  #9
                  Originally posted by Wayne Luke
                  That wouldn't have fixed the issue if it is an ongoing problem. Upgrade.php will not usually fix database issues that result in errors. It can exacerbate them but won't fix them.
                  May be, but as I said that was the only thing I've done

                  Can you create content on your site?
                  Yes I can now

                  Comment

                  • OrganForum
                    Senior Member
                    • Feb 2013
                    • 131
                    • 5.7.X

                    #10
                    I've seen duplicate key errors. I think it occurs when an asynchronous update occurs as the result of a submit and the action times out on the client but ultimately completes on the server. Clicking the submit again results in this duplicate key error. I've seen this mainly in AdminCP where some of those actions don't display a "Working" badge and it's difficult to know if the action is in process, hung, or if the button click was missed.
                    VB 5.7.2
                    PHP 7.4
                    MySQL 8.0.28

                    Comment


                    • Wayne Luke
                      Wayne Luke commented
                      Editing a comment
                      We try to eliminate these "Race Conditions" as much as possible but HTTP is asynchronous by its very design so it isn't always possible.

                  Related Topics

                  Collapse

                  Working...