• 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
    • Import from vw3 fails with database error

    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: Import from vw3 fails with database error

    • Issue Tools
      • View Changes
    1. issueid=3589 February 17, 2014 7:04 AM
      gyro gyro is offline
      New Member
      Import from vw3 fails with database error
      Import from vw3 fails with database error

      When importing from VaultWiki 3, the import fails with the following error when importing the articles. This is now rendering our Wiki useless.
      Code:
      SELECT SQL_CALC_FOUND_ROWS `t`.`threadid` AS `threadid`,`t`.`prefixid` AS `prefixid`,`t`.`title` AS `title`,`t`.`dateline` AS `dateline`,`t`.`lastposter` AS `lastposter`,`t`.`replycount` AS `replycount`,`t`.`open` AS `open`,`t`.`visible` AS `visible`,`t`.`views` AS `views`,`t`.`lastpostid` AS `lastpostid`,`t`.`lastpost` AS `lastpost`,`t`.`forumid` AS `forumid`,`t`.`firstpostid` AS `firstpostid`,`t`.`lastposterid` AS `lastposterid`,`f`.`forumid` AS `forumid`,`f`.`title_clean` AS `title_clean`,`p`.`pagetext` AS `pagetext`,`p`.`postid` AS `postid`,`p`.`userid` AS `userid`,`p`.`parentid` AS `parentid`,`p`.`threadid` AS `threadid`,`u`.`userid` AS `userid`,`u`.`username` AS `username` FROM `thread` `t`  LEFT JOIN `forum` `f` ON (`t`.`forumid` = `f`.`forumid`) 
       LEFT JOIN `post` `p` ON (`t`.`threadid` = `p`.`threadid` AND `p`.`parentid` = 0) 
       LEFT JOIN `user` `u` ON (`p`.`userid` = `u`.`userid`)   WHERE  `f`.`forumid` IN (162)  AND `t`.`visible` = 1 AND  = 1 AND `t`.`open` <> 10 ORDER BY `t`.`title` ASC  LIMIT 0,200;
      It looks like the problem is with the "visible = 1 AND = 1" in the where clause. A field name seems to be missing.
    Issue Details
    Issue Number 3589
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Importing
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.0 Gamma 2
    Fixed Version 4.0.0 Gamma 3
    Milestone VaultWiki 4 Gamma X
    Software DependencyvBulletin 4.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)


    Page 1 of 3 123 Next LastLast


    1. February 17, 2014 12:48 PM
      pegasus pegasus is offline
      VaultWiki Team
      I cannot find anywhere in 4.0.0 Gamma 2 that would generate a query that looks like that. I have also looked at the source code for 3.0.20 PL 1 and cannot find anywhere that would generate a query like that. The import step that imports articles asks for different fields than that query, and orders the results on a different column...

      I'm not sure what steps you are taking to perform the import. Make sure that the VaultWiki 3 product is disabled. It might also be useful to turn on debug mode temporarily. Debug mode will tell us the exact file and line number that is creating that error.
      Reply Reply  
    2. February 17, 2014 4:56 PM
      gyro gyro is offline
      New Member
      I tried to trace it, and my best guess is that the query is built starting on line 347 in vault/core/model/parser/handle/nuwiki/vw.php.

      The import is started from the control panel without any extra bells and whistles. We did an upgrade to vBulletin 4.2.2 right before we attempted to do an import.
      Reply Reply  
    3. February 17, 2014 9:09 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/model/parser/handle/nuwiki/vw.php, find:
      Code:
      					'parentid' => '',
      					'threadid' => ''
      Add before:
      Code:
      'visible' => '',
      Reply Reply  
    4. February 18, 2014 10:34 AM
      gyro gyro is offline
      New Member
      That got me past the database error, but now I'm getting this error:

      Could not find phrase 'step_x'.

      Could not find phrase 'vw_importing_articles'.
      Code:
      #1 : vbstop() called in [path]/vault/core/view/ui/proxy/vb4.php on line 91
      #2 : vw_UI_Proxy_View_vB4->debug_error() called in [path]/vault/core/model/vw.php on line 174
      #3 : vw_Hard_Core::fetch_object() called in [path]/vault/core/model/vw.php on line 305
      #4 : vw_Hard_Core::model() called in [path]/vault/core/model/parser/handle/nuwiki/vw.php on line 423
      #5 : vw_Parser_Handle_NuWiki_Model->fetch_threads() called in [path]/vault/core/model/parser/handle/nuwiki/vw.php on line 131
      #6 : vw_Parser_Handle_NuWiki_Model->render_threads() called in [path]/vault/core/model/parser/handle/nuwiki/vw.php on line 86
      #7 : vw_Parser_Handle_NuWiki_Model->handle_bbcode_forumindex() called in [path]/vault/core/model/parser/handle/nuwiki/vw.php on line 62
      #8 : vw_Parser_Handle_NuWiki_Model->do_parse() called in [path]/vault/core/model/parser/handle/nuwiki/vw.php on line 45
      #9 : vw_Parser_Handle_NuWiki_Model->parse() called in [path]/vault/core/model/parser/base/vw.php on line 389
      #10 : vw_Parser_Base_Model->handle_boxes() called in [path]/vault/core/model/parser/base/vw.php on line 275
      #11 : vw_Parser_Base_Model->do_parse() called in [path]/vault/core/model/parser/base/vw.php on line 194
      #12 : vw_Parser_Base_Model->parse() called in [path]/vault/core/model/parser/instance/vb3.php on line 113
      #13 : vw_Parser_Instance_Model_vB3->parse() called in [path]/vault/core/model/parser/instance/vw.php on line 207
      #14 : vw_Parser_Instance_Model->get_preview() called in [path]/vault/core/model/parser/instance/vb3.php on line 158
      #15 : vw_Parser_Instance_Model_vB3->get_preview() called in [path]/vault/core/controller/dm/revision/vw.php on line 527
      #16 : vw_DM_Revision_Controller->pre_save() called in [path]/vault/core/controller/dm/revision/vb3.php on line 126
      #17 : vw_DM_Revision_Controller_vB3->pre_save() called in [path]/vault/core/controller/dm/vb3.php on line 380
      #18 : vw_DM_Controller_vB3->pre_save() called in [path]/vault/core/controller/dm/page/vw.php on line 1763
      #19 : vw_DM_Page_Controller->internal_pre_save() called in [path]/vault/core/controller/dm/page/vw.php on line 852
      #20 : vw_DM_Page_Controller->process_revision() called in [path]/vault/core/controller/dm/page/vw.php on line 685
      #21 : vw_DM_Page_Controller->pre_save() called in [path]/vault/core/controller/dm/page/vb3.php on line 130
      #22 : vw_DM_Page_Controller_vB3->pre_save() called in [path]/includes/class_dm.php on line 877
      #23 : vB_DataManager->save() called in [path]/vault/core/controller/dm/vb3.php on line 413
      #24 : vw_DM_Controller_vB3->save() called in [path]/vault/core/controller/import/handle/vw3/page/vw.php on line 597
      #25 : vw_Import_Handle_VW3_Page_Controller->add_page() called in [path]/vault/core/controller/import/handle/vw3/page/vw.php on line 403
      #26 : vw_Import_Handle_VW3_Page_Controller->do_page() called in [path]/vault/core/controller/import/handle/vw3/page/vw.php on line 216
      #27 : vw_Import_Handle_VW3_Page_Controller->do_pages() called in [path]/vault/core/controller/import/steps/vw3/vw.php on line 254
      #28 : {closure}() called in [path]/vault/core/controller/progress/vw.php on line 82
      #29 : vw_Progress_Controller->call() called in [path]/vault/core/controller/cp/impex/vw.php on line 75
      #30 : vw_CP_ImpEx_Controller->import() called in [path]/vault/core/controller/cp/impex/vw.php on line 31
      #31 : vw_CP_ImpEx_Controller->execute() called in [path]/vault/helper/vb/global.php on line 72
      #32 : require_once([path]/vault/helper/vb/global.php) called in [path]/admincp/wiki_cp.php on line 24
      Reply Reply  
    5. February 18, 2014 11:08 AM
      gyro gyro is offline
      New Member
      Additional snooping shows that it seems to have problems loading the class "vw_Nav_Paging_Model".
      Reply Reply  
    6. February 19, 2014 12:09 AM
      pegasus pegasus is offline
      VaultWiki Team
      I recommend opening the Syntax Manager and disabling (set them not to parse) FORUMINDEX, SHOWTHREADS, and BOOKINDEX while you are importing the data. I am looking through and there are lots of places in the NuWiki handler where fatal errors will occur. Once the wiki is imported, you can go ahead and reenable them, and we'll deal with the errors as they occur.
      Reply Reply  
    7. February 19, 2014 8:46 AM
      gyro gyro is offline
      New Member
      OK. That got me a lot farther. Now I'm getting a duplicate key on the subscriptions...
      Code:
      Database error in vBulletin 4.2.2:
      
      Invalid SQL:
      INSERT INTO vw_subscribe
      	(userid, nodetypeid, nodeid, options, subhash)
      VALUES
      	(1100, 1, 15, 31, 'a633f71984d3597d1cc56b92e5e49eef');
      
      MySQL Error   : Duplicate entry '1100-15-1' for key 'user_nodeid'
      Reply Reply  
    8. February 19, 2014 9:48 AM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/controller/import/handle/vw3/subscription/vw.php, the following appears twice:
      Code:
      			$this->pagemap = $this->get_import_threadids(array_keys($sublist));
      			$this->get_exist_map();
      The first time, replace with:
      Code:
      			$this->get_exist_map($this->forummap);
      The second time, replace with:
      Code:
      			$this->pagemap = $this->get_import_threadids(array_keys($sublist));
      			$this->get_exist_map($this->pagemap);
      Then find this:
      Code:
      	protected function get_exist_map()
      	{
      		if (empty($this->pagemap) OR empty($this->usermap))
      		{
      			return;
      		}
      Replace with:
      Code:
      	protected function get_exist_map($map)
      	{
      		if (empty($map) OR empty($this->usermap))
      		{
      			return array();
      		}
      Find:
      Code:
      				vw_DB::get()->query()->in('nodeid', $this->pagemap),
      Replace with:
      Code:
      				vw_DB::get()->query()->in('nodeid', $map),
      Find:
      Code:
      		vw_DB::get()->func()->free_result($existing);
      Add the following after it:
      Code:
      		return $this->existmap;
      Reply Reply  
    9. February 19, 2014 10:18 AM
      gyro gyro is offline
      New Member
      Disregard... Missed a few steps.
      Reply Reply  
    10. February 19, 2014 10:19 AM
      gyro gyro is offline
      New Member
      Oh wait... I didn't scroll down, so I missed a few steps. Disregard!!!!
      Reply Reply  
    11. February 19, 2014 10:26 AM
      gyro gyro is offline
      New Member
      Still the same DB error...
      Reply Reply  
    12. This petition for a change to Won't Fix was rejected
      February 19, 2014 9:41 PM
      gyro gyro is offline
      New Member
      pegasus, we really need to get this working, our wiki is a crucial part of our forum, and it's been non-functional for 5 days.
       
    13. February 20, 2014 12:21 AM
      pegasus pegasus is offline
      VaultWiki Team
      The posted fix got the same DB error to disappear on a test site that was experiencing the same issue. It is possible I forgot to post some lines, though. If you want I can patch your files and finish the import myself, but you will have to PM me a user with admin and file access so I can make the changes and run the importer.
      Reply Reply  
    14. February 20, 2014 3:32 PM
      gyro gyro is offline
      New Member
      not really comfy handing out that kind of access to our forum to a stranger (who would be?), but we would be happy to for you to use webex for you to control one of our admin's computers and work on the site that way. You'll be able to do what you need, while we still maintain our security.

      Sending you a PM with our phone number, please call soon so we can make arrangements.
      Reply Reply  
    15. February 21, 2014 11:45 AM
      gyro gyro is offline
      New Member
      Can we expect a call today please?
      Reply Reply  
    Page 1 of 3 123 Next LastLast
    + 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 1:10 PM.
    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.