• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Duplicate entry '16948-1-0' for key 'revisionid'

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Duplicate entry '16948-1-0' for key 'revisionid'

    • Issue Tools
      • View Changes
    1. issueid=6289 January 5, 2022 2:02 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Duplicate entry '16948-1-0' for key 'revisionid'

      Oops! We ran into some problems.
      XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '16948-1-0' for key 'revisionid' in src/XF/Db/AbstractStatement.php at line 230

      XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
      XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 79
      XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
      XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 220
      XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1514
      XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1246
      XF\Mvc\Entity\Entity->save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 591
      vw\vw\XF\Entity\EntityBase->vwSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 401
      vw_DM_Controller_XF2->save() in src/addons/vw/vw/_core/controller/dm/revision/vw.php at line 1290
      vw_DM_Revision_Controller->save_unchanged_custom_fields() in src/addons/vw/vw/_core/controller/dm/base/vw.php at line 480
      vw_DM_Base_Controller->save_custom_fields() in src/addons/vw/vw/_core/controller/dm/revision/vw.php at line 937
      vw_DM_Revision_Controller->save_custom_fields() in src/addons/vw/vw/_core/controller/dm/revision/vw.php at line 771
      vw_DM_Revision_Controller->post_save_each() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 668
      vw\vw\XF\Entity\EntityBase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1270
      XF\Mvc\Entity\Entity->save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 591
      vw\vw\XF\Entity\EntityBase->vwSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 401
      vw_DM_Controller_XF2->save() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 2338
      vw_DM_Page_Controller->save_revision() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 1914
      vw_DM_Page_Controller->post_save_each() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 668
      vw\vw\XF\Entity\EntityBase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1270
      XF\Mvc\Entity\Entity->save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 591
      vw\vw\XF\Entity\EntityBase->vwSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 401
      vw_DM_Controller_XF2->save() in src/addons/vw/vw/_core/controller/ui/edit/vw.php at line 247
      vw_UI_Edit_Controller->save() in src/addons/vw/vw/_core/controller/ui/page/vw.php at line 474
      vw_UI_Page_Controller->save() in src/addons/vw/vw/_core/controller/ui/page/vw.php at line 170
      vw_UI_Page_Controller->execute() in src/addons/vw/vw/_core/controller/ui/stack/vw.php at line 295
      vw_UI_Stack_Controller->execute() in src/addons/vw/vw/Pub/Controller/Wiki/Wiki.php at line 80
      vw\vw\Pub\Controller\Wiki\Wiki->_actionIndex() in src/addons/vw/vw/Mvc/Dispatcher.php at line 30
      vw\vw\Mvc\Dispatcher::dispatch() in src/addons/vw/vw/Pub/Controller/Wiki/AbstractController.php at line 26
      vw\vw\Pub\Controller\Wiki\AbstractController->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2351
      XF\App->run() in src/XF.php at line 517
      XF::runApp() in index.php at line 20
    Issue Details
    Issue Number 6289
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Editing Pages
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.4
    Fixed Version 4.1.4
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. January 5, 2022 2:12 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Same for build 2. I tried a rebuild of edits.
      Reply Reply  
    2. January 5, 2022 2:15 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please explain what you were doing when this occurred. I need to be able to reproduce the issue.
      Reply Reply  
    3. January 5, 2022 2:18 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I added a text to a section and tried to save it.
      Reply Reply  
    4. January 5, 2022 2:33 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      If you need access then please let me know. Its not my main site.
      Reply Reply  
    5. January 5, 2022 2:39 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, thanks. This occurs when editing just a section of an existing page that has custom field values. The section editor does not have custom field editors (because they are outside the section) so the custom field values are copied to the new edit from the previous edit. Somewhere along the way, it attempts to copy the values twice. This triggers a database error.

      You can workaround this problem until I have a solution by using the full page editor rather than the section editor for now.
      Reply Reply  
    6. January 5, 2022 3:45 PM
      pegasus pegasus is offline
      VaultWiki Team
      The following fixed it on my test. It remains to be seen if this causes any synchronization issues in fringe cases (like custom field changes in the approval queue).

      In src/addons/vw/vw/_core/controller/dm/base/vw.php, find:
      Code:
      public function save_custom_fields()
      BEFORE it, add:
      Code:
      	protected function custom_field_changed($dm)
      	{
      		$raw = $dm->get_info('field_value_raw');
      
      		if (!isset($raw))
      		{
      			return false;
      		}
      
      		return true;
      	}
      Find:
      Code:
      $dbid = $this->save_custom_field_value($fielddm);
      BEFORE it, add:
      Code:
      				if (!$this->custom_field_changed($fielddm))
      				{
      					unset($fielddm);
      					continue;
      				}
      Most likely this bug was introduced at the same time as custom fields, around RC 2, but I will need to do more research on this, in case it was due to a specific code change.
      Reply Reply  
    7. April 5, 2022 3:15 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Will this fix be included in the next build?
      Reply Reply  
    8. April 5, 2022 11:11 PM
      pegasus pegasus is offline
      VaultWiki Team
      This change was included in 4.1.4 build 002.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 8:21 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.