• 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
    • MediaWiki Import: Undefined variable: startat

    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: MediaWiki Import: Undefined variable: startat

    • Issue Tools
      • View Changes
    1. issueid=4046 October 28, 2014 4:24 PM
      owls8521 owls8521 is offline
      New Member
      MediaWiki Import: Undefined variable: startat

      Code:
      step_x
      
      Importing banned wiki titles
      Undefined variable: startat
      vw_CP_Progress_View->handle_php_error() in vault/core/controller/import/steps/mw/vw.php at line 362
      {closure}() in vault/core/controller/progress/vw.php at line 100
      vw_Progress_Controller->call() in vault/core/controller/cp/impex/vw.php at line 114
      vw_CP_ImpEx_Controller->import() in vault/core/controller/cp/impex/vw.php at line 33
      vw_CP_ImpEx_Controller->execute() in library/vw/XenForo/ControllerAdmin/Wiki.php at line 115
      vw_XenForo_ControllerAdmin_Wiki->actionIndex() in library/XenForo/FrontController.php at line 347
      XenForo_FrontController->dispatch() in library/XenForo/FrontController.php at line 134
      XenForo_FrontController->run() in admin.php at line 13
    Issue Details
    Issue Number 4046
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Importing
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.0 RC 4
    Fixed Version 4.0.0 RC 4
    Milestone VaultWiki 4.0 Gold
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. October 28, 2014 4:27 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/controller/import/steps/mw/vw.php, find all:
      Code:
      $caller->next_batch(1, $startat);
      Replace all with:
      Code:
      $caller->next_batch(1);
      Reply Reply  
    2. October 28, 2014 4:30 PM
      owls8521 owls8521 is offline
      New Member
      I got this error after making those changes.

      Code:
      Importing links
      Undefined offset: 1
      vw_CP_Progress_View->handle_php_error() in vault/core/model/parser/legacy/mediawiki/var/vw.php at line 199
      vw_Parser_Legacy_MediaWiki_var_Model->do_template()
      call_user_func() in vault/core/model/parser/legacy/mediawiki/vw.php at line 91
      vw_Parser_Legacy_MediaWiki_Model->recurse() in vault/core/model/parser/legacy/mediawiki/var/vw.php at line 91
      vw_Parser_Legacy_MediaWiki_var_Model->parse() in library/vw/XenForo/BbCode/Parser.php at line 1022
      vw_XenForo_BbCode_Parser->_vwDoLegacyCode() in library/vw/XenForo/BbCode/Parser.php at line 869
      vw_XenForo_BbCode_Parser->vwParseBbCode() in library/vw/XenForo/BbCode/Parser.php at line 674
      vw_XenForo_BbCode_Parser->vwInstanceParse() in vault/core/model/parser/instance/xf.php at line 115
      vw_Parser_Instance_Model_XF->parse() in vault/core/controller/dm/page/vw.php at line 1025
      vw_DM_Page_Controller->process_links() in vault/core/controller/dm/page/vw.php at line 793
      vw_DM_Page_Controller->process_revision() in vault/core/controller/dm/page/vw.php at line 690
      vw_DM_Page_Controller->pre_save() in library/vw/XenForo/DataWriter.php at line 426
      vw_XenForo_DataWriter->_preSave() in library/XenForo/DataWriter.php at line 1446
      XenForo_DataWriter->preSave() in library/XenForo/DataWriter.php at line 1385
      XenForo_DataWriter->save() in vault/core/controller/dm/xf.php at line 378
      vw_DM_Controller_XF->save() in vault/core/controller/import/handle/mw/link/vw.php at line 100
      vw_Import_Handle_MW_Link_Controller->do_page() in vault/core/controller/import/handle/mw/link/vw.php at line 74
      vw_Import_Handle_MW_Link_Controller->do_pages() in vault/core/controller/import/steps/mw/vw.php at line 404
      {closure}() in vault/core/controller/progress/vw.php at line 100
      vw_Progress_Controller->call() in vault/core/controller/cp/impex/vw.php at line 114
      vw_CP_ImpEx_Controller->import() in vault/core/controller/cp/impex/vw.php at line 33
      vw_CP_ImpEx_Controller->execute() in library/vw/XenForo/ControllerAdmin/Wiki.php at line 115
      vw_XenForo_ControllerAdmin_Wiki->actionIndex() in library/XenForo/FrontController.php at line 347
      XenForo_FrontController->dispatch() in library/XenForo/FrontController.php at line 134
      XenForo_FrontController->run() in admin.php at line 13
      Reply Reply  
    3. October 28, 2014 4:35 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/model/parser/legacy/mediawiki/var/vw.php, find:
      Code:
      			return $this->do_var($varbits[0], $varbits[1]);
      Replace with:
      Code:
      			$args = '';
      
      			if (!empty($varbits[1]))
      			{
      				$args = $varbits[1];
      			}
      
      			return $this->do_var($varbits[0], $args);
      Reply Reply  
    4. October 28, 2014 4:39 PM
      owls8521 owls8521 is offline
      New Member
      Now this.

      Code:
      Importing links
      Undefined offset: 1
      vw_CP_Progress_View->handle_php_error() in vault/core/model/parser/legacy/mediawiki/bbcode/vw.php at line 360
      vw_Parser_Legacy_MediaWiki_bbcode_Model->do_link()
      call_user_func() in vault/core/model/parser/legacy/mediawiki/vw.php at line 91
      vw_Parser_Legacy_MediaWiki_Model->recurse() in vault/core/model/parser/legacy/mediawiki/bbcode/vw.php at line 302
      vw_Parser_Legacy_MediaWiki_bbcode_Model->parse_links() in vault/core/model/parser/legacy/mediawiki/bbcode/vw.php at line 59
      vw_Parser_Legacy_MediaWiki_bbcode_Model->parse() in library/vw/XenForo/BbCode/Parser.php at line 1022
      vw_XenForo_BbCode_Parser->_vwDoLegacyCode() in library/vw/XenForo/BbCode/Parser.php at line 917
      vw_XenForo_BbCode_Parser->vwParseBbCode() in library/vw/XenForo/BbCode/Parser.php at line 674
      vw_XenForo_BbCode_Parser->vwInstanceParse() in vault/core/model/parser/instance/xf.php at line 115
      vw_Parser_Instance_Model_XF->parse() in vault/core/controller/dm/page/vw.php at line 1025
      vw_DM_Page_Controller->process_links() in vault/core/controller/dm/page/vw.php at line 793
      vw_DM_Page_Controller->process_revision() in vault/core/controller/dm/page/vw.php at line 690
      vw_DM_Page_Controller->pre_save() in library/vw/XenForo/DataWriter.php at line 426
      vw_XenForo_DataWriter->_preSave() in library/XenForo/DataWriter.php at line 1446
      XenForo_DataWriter->preSave() in library/XenForo/DataWriter.php at line 1385
      XenForo_DataWriter->save() in vault/core/controller/dm/xf.php at line 378
      vw_DM_Controller_XF->save() in vault/core/controller/import/handle/mw/link/vw.php at line 100
      vw_Import_Handle_MW_Link_Controller->do_page() in vault/core/controller/import/handle/mw/link/vw.php at line 74
      Reply Reply  
    5. October 28, 2014 4:50 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, that implies a wiki link that looks like one of these:
      Code:
      [[Category]]
      [[File]]
      [[Image]]
      [[Template]]
      i.e. it is a link to a page with a title that is also a namespace, not a page within the similarly named namespace.

      In vault/core/model/parser/legacy/mediawiki/bbcode/vw.php, find:
      Code:
      		if (stripos($value[0], $catname) === 0)
      		{
      			$tag_key = 'vw_category_tag';
      			$split_skip = true;
      		}
      		else if (stripos($value[0], $imgname) === 0 OR stripos($value[0], $filename) === 0)
      		{
      			$pipes = explode('|', $value[1], 2);
      			$target = str_replace(' ', '_', trim($pipes[0]));
      			$article = $filename . ':' . $target;
      
      			if (!empty($pipes[1]))
      			{
      				$article .= '|' . $pipes[1];
      			}
      
      			$tag_key = 'vw_image_tag';
      			$split_skip = true;
      		}
      		else if ($value[0] == $tmpname AND strpos($value[1], '|') === false)
      		{
      			$article = $text . '|' . $text;
      		}
      Replace with:
      Code:
      		if (!empty($value[1]))
      		{
      			if (stripos($value[0], $catname) === 0)
      			{
      				$tag_key = 'vw_category_tag';
      				$split_skip = true;
      			}
      			else if (stripos($value[0], $imgname) === 0 OR stripos($value[0], $filename) === 0)
      			{
      				$pipes = explode('|', $value[1], 2);
      				$target = str_replace(' ', '_', trim($pipes[0]));
      				$article = $filename . ':' . $target;
      
      				if (!empty($pipes[1]))
      				{
      					$article .= '|' . $pipes[1];
      				}
      
      				$tag_key = 'vw_image_tag';
      				$split_skip = true;
      			}
      			else if ($value[0] == $tmpname AND strpos($value[1], '|') === false)
      			{
      				$article = $text . '|' . $text;
      			}
      		}
      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:20 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.