Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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 5th Feb '19, 10:31am.

    Comment


    • #3
      What is the complete errror?
      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.

      Comment


      • #4
        Originally posted by Wayne Luke View Post
        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 6th Feb '19, 2:34am.

        Comment


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

          Comment


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

            Comment


            • #7
              Originally posted by Wayne Luke View Post
              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


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

                Comment


                • #9
                  Originally posted by Wayne Luke View Post
                  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


                  • #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.5.1
                    PHP 7.2
                    MySQL 5.7.24

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