• 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
    • Upgrading to 4.0.21

    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: Upgrading to 4.0.21

    • Issue Tools
      • View Changes
    1. issueid=5374 March 9, 2018 8:38 AM
      expanserpb expanserpb is offline
      Junior Member
      Upgrading to 4.0.21

      Attempting to upgrade to 4.0.21

      Have attempted twice now from fresh snapshots. Have tried full file list and just new files.

      What is the most sensible way forward?

      Kind Regards,

      Expanse

      Each time:
      Code:
      Upgrading to 4.0.21
      Step 5
      Updating data in table: vw_counter
      
      An exception occurred: Database Error: SELECT COUNT(`revisionid`) AS `counter` FROM `vw_revision` WHERE pageid = AND revisionid != AND visible = 1 AND !(`flags` & 2) Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND revisionid != AND visible = 1 AND !(`flags` & 2)' at line 1 in [path]/vault/core/controller/db/xf.php on line 187
      
      #0: vw_DB_Controller_XF->throw_error() in [path]/vault/core/controller/db/xf.php at line 268
      #1: vw_DB_Controller_XF->query_first() in [path]/vault/core/model/db/mysql/vw.php at line 27
      #2: vw_DB_MySQL_Model->select() in [path]/vault/install/lib/upgradepath/steps/4/0/21/base/vw.php at line 376
      #3: vw_Install_UpgradePath_Steps_4021_base_Controller->{closure}() in [path]/vault/core/controller/progress/steps/vw.php at line 83
      #4: vw_Progress_Steps_Controller->call() in [path]/vault/core/controller/progress/steps/vw.php at line 53
      #5: vw_Progress_Steps_Controller->execute() in [path]/vault/install/lib/upgradepath/vw.php at line 62
      #6: vw_Install_UpgradePath_Controller->exec_script() in [path]/vault/core/controller/progress/vw.php at line 74
      #7: vw_Progress_Controller->execute() in [path]/vault/core/controller/cp/progress/vw.php at line 37
      #8: vw_CP_Progress_Controller->process() in [path]/vault/core/controller/cp/install/vw.php at line 330
      #9: vw_CP_Install_Controller->upgrade() in [path]/vault/core/controller/cp/install/vw.php at line 56
      #10: vw_CP_Install_Controller->execute() in [path]/library/vw/XenForo/ControllerAdmin/Wiki.php at line 125
      #11: vw_XenForo_ControllerAdmin_Wiki->actionIndex() in [path]/library/vw/XenForo/ControllerAdmin/Wiki.php at line 182
      #12: vw_XenForo_ControllerAdmin_Wiki->actionUpgrade() in [path]/library/XenForo/FrontController.php at line 369
      #13: XenForo_FrontController->dispatch() in [path]/library/XenForo/FrontController.php at line 152
      #14: XenForo_FrontController->run() in [path]/admin.php at line 13
    Issue Details
    Issue Number 5374
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.21
    Fixed Version 4.0.21
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. March 9, 2018 9:02 AM
      pegasus pegasus is offline
      VaultWiki Team
      I think this might happen if the upgrade script processes a feed, although I'm not sure how it got through QA, as the wikis we use contain a number of feeds.

      In vault/install/lib/upgradepath/steps/4/0/21/base/vw.php, find:
      Code:
      				if ($root OR $primary['isNode'])
      				{
      					$edits = vw_DB::get()->query()->select(array(
      						'fields' => array(
      							vw_DB::get()->query()->count('revisionid') => 'counter'
      						),
      						'table' => 'vw_revision',
      						'where' => array(
      							vw_DB::get()->query()->eq('pageid', $page['pageid']),
      							vw_DB::get()->query()->eq('revisionid', $page['revisionid'], false),
      							vw_DB::get()->query()->eq('visible', 1),
      							vw_DB::get()->query()->bc('flags', vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_revision_flags', 'minor'), false)
      						),
      						'first' => 1
      					));
      
      					$count = 0;
      
      					if ($edits)
      					{
      						$count = $edits['counter'];
      					}
      
      					$editcounts[$page['routeid']] = $count;
      				}
      Replace with:
      Code:
      				if ($root OR $primary['isNode'])
      				{
      					if ($primary['table'] == 'feed')
      					{
      						$editcounts[$page['routeid']] = 0;
      					}
      					else
      					{
      						$edits = vw_DB::get()->query()->select(array(
      							'fields' => array(
      								vw_DB::get()->query()->count('revisionid') => 'counter'
      							),
      							'table' => 'vw_revision',
      							'where' => array(
      								vw_DB::get()->query()->eq('pageid', $page['pageid']),
      								vw_DB::get()->query()->eq('revisionid', $page['revisionid'], false),
      								vw_DB::get()->query()->eq('visible', 1),
      								vw_DB::get()->query()->bc('flags', vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_revision_flags', 'minor'), false)
      							),
      							'first' => 1
      						));
      
      						$count = 0;
      
      						if ($edits)
      						{
      							$count = $edits['counter'];
      						}
      
      						$editcounts[$page['routeid']] = $count;
      					}
      				}
      Reply Reply  
    2. March 9, 2018 10:12 AM
      expanserpb expanserpb is offline
      Junior Member
      Thank you.

      Have run the upgrade now but still no footnote/reflist/toc codes

      I only have wiki, comment and H

      Could this be due to upgrading from the LITE version in the past?
      Reply Reply  
    3. March 9, 2018 10:54 AM
      pegasus pegasus is offline
      VaultWiki Team
      I see that the upgrade script is not properly regenerating missing BB-Codes in XenForo. I was able to reproduce the issue on a test board that was upgrade from the Lite version.

      In vault/install/lib/upgradepath/vw.php, find:
      Code:
      vw_Hard_Core::model('Settings')->set('vw_version_string', $this->version);
      Before it, add:
      Code:
      		if ($this->version == 'Lite' OR $this->version == 'Final')
      		{
      			vw_Hard_Core::model('Settings')->set('vw_version_string', vw_Hard_Core::model('Version')->simple_version());
      		} else
      Then run the upgrade script again from your current database state and it should rebuild the missing BB-Codes.
      Reply Reply  
    4. March 9, 2018 12:39 PM
      expanserpb expanserpb is offline
      Junior Member
      It's upgraded now. It's safe to re-upload ilb/ and then run again from the admin CP?
      Reply Reply  
    5. March 9, 2018 12:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      Yes.
      Reply Reply  
    6. March 9, 2018 12:49 PM
      expanserpb expanserpb is offline
      Junior Member
      Fixed!

      You assistance is always appreciated!
      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 3: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.