• 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
    • After upgrading to 4.0.12 the wiki is pretty unusable

    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: After upgrading to 4.0.12 the wiki is pretty unusable

    • Issue Tools
      • View Changes
    1. issueid=5354 February 16, 2018 7:01 PM
      SeToY SeToY is offline
      Junior Member
      After upgrading to 4.0.12 the wiki is pretty unusable
      After upgrading to 4.0.12 the wiki is pretty unusable

      Hey there,

      errors in the server log everywhere, working in the moderation queue yields a ton of server error logs and physically removing a deleted wiki page yields a HTTP 500.

      https://gyazo.com/8a84773d2fca912516ba6a1d05ec1ec0
      https://gyazo.com/e1acd56f0b1ae8102e96a51ef6bc8722
    Issue Details
    Issue Number 5354
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 4 - Warnings / Script 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. February 16, 2018 9:37 PM
      pegasus pegasus is offline
      VaultWiki Team
      I see that some of these errors can occur if you upgrade to 4.0.21 on an installation that had not been patched since before the December patch, or if the December patch was not successfully applied for some reason. It was actually possible for this error to happen in the December patch as well.

      In this case, vBulletin users and XenForo users still using XenForo 1.2 will have to manually patch their installation, or wait until 4.0.22. If you need a manual December patch, please follow the following steps:

      1. For vBulletin: Delete the contents of [wiki-attach-dir]/proxy
        For XenForo: Delete the contents of /internal_data/vw_proxy
      2. MySQL query:
        Code:
        TRUNCATE TABLE vw_proxy
      3. MySQL query:
        Code:
        ALTER TABLE vw_proxy DROP PRIMARY KEY
      4. MySQL query:
        Code:
        ALTER TABLE vw_proxy
        ADD COLUMN proxyid INT(10) UNSIGNED AUTO_INCREMENT,
        ADD COLUMN url BLOB NULL,
        CHANGE COLUMN challenge challenge VARCHAR(40) NOT NULL DEFAULT '',
        ADD PRIMARY KEY (proxyid),
        ADD INDEX challenge (challenge)
      5. For vBulletin:
        MySQL query:
        Code:
        DELETE FROM datastore
        WHERE title = 'vw_proxy_usage'
        LIMIT 1
        For XenForo: MySQL query:
        Code:
        DELETE FROM xf_data_registry
        WHERE data_key = 'vw_proxy_usage'
        LIMIT 1


      If you use XenForo 1.3+, you do not require the December patch, so edit vault/core/model/cron/cleanup/xf.php. Find:
      Code:
      if (vw_Compat::not('1.3.0 Beta 1') OR !vw_Hard_Core::model('Version')->patched(':XF 1.3.0 Beta 1', 'proxy'))
      Before it, add:
      Code:
      return false;
      Some of the other errors are happening because a required cache rebuild has not completed for some reason. Please go to Wiki Admin Panel > Structures > Content Types, and toggle one of the types off/on. This should rebuild the cache.

      There are two undefined index errors which are related to the February patch. Edit vault/core/controller/dm/base/vw.php. Find:
      Code:
      $lastdates["$nodeid"] = max($lastdates["$nodeid"], $items["$itemid"]['dateline']);
      Replace with:
      Code:
      						if (isset($lastdates["$nodeid"]))
      						{
      							$lastdates["$nodeid"] = max($lastdates["$nodeid"], $items["$itemid"]['dateline']);
      						}
      						else
      						{
      							$lastdates["$nodeid"] = $items["$itemid"]['dateline'];
      						}
      Edit vault/core/controller/dm/xf.php. Find:
      Code:
      		$idfield = !empty($node['isPage']) ? 'pageid' : $node['idfield'];
      
      		if (!empty($node) AND !empty($existing["$idfield"]))
      		{
      			$this->set_info('itemid', $existing["$idfield"], false);
      		}
      Replace with:
      Code:
      		if ($node)
      		{
      			$idfield = !empty($node['isPage']) ? 'pageid' : $node['idfield'];
      
      			if (!empty($existing["$idfield"]))
      			{
      				$this->set_info('itemid', $existing["$idfield"], false);
      			}
      		}
      A few of your undefined index errors are caused by corrupt content (looks like corrupt attachments). You can try the tool in Wiki Admin Panel > Maintenance > Remove Corrupt Content. If that does not work, you must visit the corrupt content (while not in debug mode!), and delete the content in the normal way as if it was normal not-corrupt content. Ignore any undefined index errors generated during this process.

      For the smilie issue (I assume this is thrown during Preview), edit vault/core/controller/dm/page/vw.php. Find:
      Code:
      $finder->parse($args);
      Before it, add:
      Code:
      			$smilie = $this->instance->get_info('parse_smile');
      
      			if ($smilie === null)
      			{
      				$smilie = true;
      
      				if ($this->instance->get_existing('pageid'))
      				{
      					$smilie = !($this->instance->get_info('flags') & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_revision_flags', 'nosmile'));
      				}
      			}
      
      			$args['smilie'] = $smilie;
      For the following errors, I will need the full stack traces associated with the error, or I will not be able to help:
      - Fatal Error: Call to member function fetch() on boolean
      * If your PHP version is lower than 7.0, you will probably not have a stack trace available. In this case, we would need a private ticket with file access and/or full instructions how to cause the error.

      Almost none of the errors you mentioned, however, prevent the user from successfully using the wiki (they are all "silent" errors), so your "unusable" claim is false. If you are being blocked from doing things by these error messages, that means that you are running your site in debug mode; if you prefer minor errors not to hinder you from using your site, you probably should not be running debug mode at the time.
      Reply Reply  
    2. February 17, 2018 5:41 AM
      SeToY SeToY is offline
      Junior Member
      Hi,

      the contents of /internal_data/vw_proxy was empty (except an index.html).


      Running the 4th MySQL query resulted in:
      Code:
      [SQL]ALTER TABLE vw_proxy
      ADD COLUMN proxyid INT(10) UNSIGNED AUTO_INCREMENT,
      ADD COLUMN url BLOB NULL,
      MODIFY COLUMN challenge challenge VARCHAR(40) DEFAULT '',
      ADD PRIMARY KEY (proxyid),
      ADD INDEX challenge (challenge)
      
      [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'challenge VARCHAR(40) DEFAULT '',
      ADD PRIMARY KEY (proxyid),
      ADD INDEX challen' at line 4
      I downloaded all 4.0.21 files (not just the updated ones) and replaced them on my installation. So I guess my files should be up to date, however the proxy_needs_cleanup function in vault/core/model/cron/cleanup/xf.php looks like this:
      Code:
      	protected function proxy_needs_cleanup()
      	{
      		if (vw_Compat::not('1.3.0 Beta 1') OR !vw_Hard_Core::model('Version')->patched(':XF 1.3.0 Beta 1', 'proxy'))
      		{
      			return true;
      		}
      
      		return false;
      	}
      How should I continue?

      Quote Originally Posted by pegasus
      Almost none of the errors you mentioned, however, prevent the user from successfully using the wiki (they are all "silent" errors), so your "unusable" claim is false. If you are being blocked from doing things by these error messages, that means that you are running your site in debug mode; if you prefer minor errors not to hinder you from using your site, you probably should not be running debug mode at the time.
      Mhmm, I'm not knowingly running my site in debug mode and my users were complaining about HTTP500 errors. Sorry if I offended you, but that's how my users were reporting those errors after the upgrade.

      Here is the stacktrace for the boolean error:
      Code:
      Server Error Log
      Error Info
      ErrorException: Fatal Error: Call to a member function fetch() on boolean - vault\core\controller\db\xf.php:363
      Generated By: SeToY, A moment ago
      Stack Trace
      #0 [internal function]: XenForo_Application::handleFatalError()
      #1 {main}
      Request State
      array(3) {
        ["url"] => string(59) "https://domain.com/wiki-moderate/?do=kill"
        ["_GET"] => array(1) {
          ["do"] => string(4) "kill"
        }
        ["_POST"] => array(6) {
          ["harddelete"] => string(1) "2"
          ["sbutton"] => string(8) "Continue"
          ["_xfToken"] => string(8) "********"
          ["do"] => string(4) "kill"
          ["url"] => string(52) "https://domain.com/wiki/Wiki-Pages"
          ["items"] => array(1) {
            [1] => array(1) {
              [64] => string(2) "64"
            }
          }
        }
      }
      I seem also not to be able to remove corrupt content: https://gyazo.com/9754cf540334f0cb6d37f6f70d413fb7
      Reply Reply  
    3. February 18, 2018 2:10 PM
      pegasus pegasus is offline
      VaultWiki Team
      For the fatal error when deleting content, it seems like this only occurs on XenForo for some reason, but the bug was created by the February patches. In vault/core/controller/dm/page/vw.php, find:
      Code:
      			if (!$node['isPage'] AND !$node['tomany'])
      			{
      				$relationquery['first'] = 1;
      			}
      
      			$relations = vw_DB::get()->query()->select($relationquery);
      
      			if ($node['isPage'] OR !$node['tomany'])
      Replace with:
      Code:
      			if (!$node['isPage'] OR $node['tomany'])
      			{
      				$relationquery['first'] = 1;
      			}
      
      			$relations = vw_DB::get()->query()->select($relationquery);
      
      			if ($node['isPage'] AND !$node['tomany'])
      Sorry if I sounded a bit harsh about the debug mode thing. I was just trying to respond to the urgency that was implied in the first post; 'undefined index' and 'undefined variable' errors are low E_NOTICE level messages, and should not appear on the page at all (just in logs). XenForo's debug mode increases the importance of all messages as it's more of a developer mode, so that developers can notice the messages sooner. Unless there is something wrong with the error-reporting on your site, these messages would only be seen by the end-user if debug mode is turned on. Since you implied urgency ("unusable"), the simplest temporary solution would be to disable debug mode. Even if you are a developer, it might be wise to only have debug mode enabled for the users who actually need it (using IP filtering in your library/config.php).

      If there is a 500 HTTP message being shown to users anyway, you will need to dig into your HTTP and/or PHP logs (not XenForo's logs) to find the cause of the message. 500 HTTP is basically just a vague "There was an error", so I would need more information from your logs if this is still happening.

      Apologies for the mistake in the SQL, it should say "CHANGE COLUMN" not "MODIFY COLUMN"
      The Remove Corrupt Content option is under Rebuild Counters / Caches in that menu.

      Apparently I was a bit loopy yesterday before my fever broke.
      Reply Reply  
    4. February 18, 2018 2:20 PM
      SeToY SeToY is offline
      Junior Member
      Quote Originally Posted by pegasus
      Apologies for the mistake in the SQL, it should say "CHANGE COLUMN" not "MODIFY COLUMN"
      Isn't simply the column name duplicated? Because running the updated query results in:

      Code:
      [SQL]ALTER TABLE vw_proxy
      CHANGE COLUMN challenge challenge VARCHAR(40) DEFAULT '',
      
      [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 2
      My vw_proxy table now looks like this: https://gyazo.com/7fc398028bce348bfa1bfe6065ea9478 with "challenge" default value being an empty string.

      The HTTP error logs pretty much tell this about VaultWiki:
      Code:
      [16-Feb-2018 23:59:32 UTC] PHP Fatal error:  Call to a member function fetch() on boolean in D:\inetpub\wwwroot\domain.com\vault\core\controller\db\xf.php on line 363
      [17-Feb-2018 00:02:09 UTC] PHP Fatal error:  Call to a member function fetch() on boolean in D:\inetpub\wwwroot\domain.com\vault\core\controller\db\xf.php on line 363
      [17-Feb-2018 00:02:35 UTC] PHP Fatal error:  Call to a member function fetch() on boolean in D:\inetpub\wwwroot\domain.com\vault\core\controller\db\xf.php on line 363
      [17-Feb-2018 10:52:58 UTC] PHP Fatal error:  Call to a member function fetch() on boolean in D:\inetpub\wwwroot\domain.com\vault\core\controller\db\xf.php on line 363
      [17-Feb-2018 15:18:57 UTC] PHP Fatal error:  Call to a member function free() on null in D:\inetpub\wwwroot\domain.com\vault\core\controller\db\xf.php on line 383
      Quote Originally Posted by pegasus
      Apparently I was a bit loopy yesterday before my fever broke.
      Get well soon
      Reply Reply  
    5. February 18, 2018 2:29 PM
      pegasus pegasus is offline
      VaultWiki Team
      Your vw_proxy table looks good to me. Please make sure that 'challenge' has a standard index on it.
      Reply Reply  
    6. February 18, 2018 2:30 PM
      SeToY SeToY is offline
      Junior Member
      It does, thanks https://gyazo.com/8b17aa4db07a85b0dc3162323e6c2cf1
      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 4:22 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.