• 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
    • Install failure clss vw_Hard_Core missing

    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: Install failure clss vw_Hard_Core missing

    • Issue Tools
      • View Changes
    1. issueid=6479 1 Week Ago 11:36 AM
      fabrik fabrik is offline
      New Member
      Install failure clss vw_Hard_Core missing
      Installing VW version 4.1.9b1 for xf2.3

      Getting the following error stack.

      Error: Class "vw_Hard_Core" not found in src/addons/vw/vw/Setup.php at line 124
      vw\vw\Setup->checkRequirements() in src/XF/AddOn/AddOn.php at line 488
      XF\AddOn\AddOn->checkRequirements() in src/XF/Admin/Controller/AddOnController.php at line 866
      XF\Admin\Controller\AddOnController->getAddOnWarningsAndErrors() in src/XF/Admin/Controller/AddOnController.php at line 399
      XF\Admin\Controller\AddOnController->actionInstall() in src/XF/Mvc/Dispatcher.php at line 362
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824
      XF\App->run() in src/XF.php at line 806
      XF::runApp() in admin.php at line 15
    Issue Details
    Issue Number 6479
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status VW.org Bug
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.8
    Fixed Version (none)
    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. 1 Week Ago 12:22 PM
      pegasus pegasus is offline
      VaultWiki Team
      Since the constructor for Setup.php loads the vw_Hard_Core class...
      Code:
      		if (!class_exists('vw_Hard_Core', false))
      		{
      			Core::init();
      		}
      It looks like this can only happen if neither of the following files are readable (you must have at least one):
      src/addons/vw/vw/config.php or src/addons/vw/vw/config.php.xf2
      If these files are "missing" then Core::init() would fail and the class would not be loaded.

      This can happen if you just uploaded the ZIP for the first time and the files are not done uploading yet, or
      This can happen if you have removed or renamed the files to something else, or
      This can also happen if the "realpath" to the file returns a failure. For one, this may happen if one or more directories in the path name do not have the executable bit for the system user that PHP is running as.

      If the files were not done uploading yet or one of the files was misnamed and you've fixed it, all you need to do is restart the PHP server process (clears the PHP opcache which may have cached that the file was not found), and retry clicking the Install button.

      If the issue is due to permissions and you are unable to set the permissions as described, please try the following change. In src/addons/vw/vw/Core.php, find:
      Code:
      $path = \XF::getSourceDirectory() . '/addons/vw/vw';
      			$path = realpath($path);
      Replace with:
      Code:
      		$ds = DIRECTORY_SEPARATOR;
      			$path = \XF::getAddonDirectory() . $ds . 'vw' . $ds . 'vw';
      			$rpath = realpath($path);
      
      			if ($rpath)
      			{
      				$path = $rpath;
      			}
      Reply Reply  
    2. 1 Week Ago 12:44 PM
      fabrik fabrik is offline
      New Member
      Interestingly I have neither of those config files present under vw/vw

      They exist in the zip file I downloaded. is it enough to just copy the vw/vw folder to my site?
      Reply Reply  
    3. 1 Week Ago 12:46 PM
      fabrik fabrik is offline
      New Member
      the confix.php.xf2 and icon.png seem not to have been copied during the initial install for some reason.

      The permissions are otherwise correct.
      Reply Reply  
    4. 1 Week Ago 12:48 PM
      pegasus pegasus is offline
      VaultWiki Team
      Yes, if you are missing files, just upload them and try again.
      Reply Reply  
    5. 1 Week Ago 12:56 PM
      fabrik fabrik is offline
      New Member
      OK, I uploaded the missing files and got further, but now I am getting:

      XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'page_settings' in 'field list' in src/XF/Db/AbstractStatement.php at line 230
      XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
      XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 43
      XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 61
      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 219
      XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1578
      XF\Mvc\Entity\Entity->_saveToSource() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 693
      vw\vw\XF\Entity\EntityBase->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1306
      XF\Mvc\Entity\Entity->save() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 434
      vw_DM_Controller_XF2->save() in src/addons/vw/vw/_core/controller/dm/index/vw.php at line 215
      vw_DM_Index_Controller->post_save_each() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 818
      vw\vw\XF\Entity\EntityBase->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1330
      XF\Mvc\Entity\Entity->save() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 434
      vw_DM_Controller_XF2->save() in src/addons/vw/vw/_install/lib/db/insert/vw.php at line 311
      vw_Install_DB_Insert_Controller->execute_dm() in src/addons/vw/vw/_install/lib/full/steps/vw.php at line 142
      vw_Install_Full_Steps_Controller->{closure}() in src/addons/vw/vw/Setup.php at line 350
      vw\vw\Setup->vwRunStep() in src/addons/vw/vw/Setup.php at line 268
      vw\vw\Setup->install() in src/XF/Admin/Controller/AddOnController.php at line 431
      XF\Admin\Controller\AddOnController->actionInstall() in src/XF/Mvc/Dispatcher.php at line 362
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824
      XF\App->run() in src/XF.php at line 806
      XF::runApp() in admin.php at line 15
      Reply Reply  
    6. 6 Days Ago 1:23 PM
      pegasus pegasus is offline
      VaultWiki Team
      Based on this error and the previous error, and that the MySQL definition files in the copy of the ZIP you received contain the column definition for 'page_settings', you may somehow be installing VaultWiki on top of a previous VaultWiki installation (before 4.1.8) that was not removed first. Not sure how XenForo allowed that, but here we are.

      Based on our records, the last version you may have installed was 4.1.7. In that case, we need to manually apply database changes to the tables you already had. In src/addons/vw/vw/_install/db/insert/vw.php, find:
      Code:
      foreach ($dms AS $datatype => $data)
      AFTER it, add:
      Code:
      if ($datatype == 'index') {
      			$dbalter = vw_Hard_Core::controller('DBalter')->get();
      
      			if ($dbalter->fetch('vw_feed'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'feed_settings',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      
      				$dbalter->add_field(array(
      					'name' => 'feed_protect',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_book'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'book_options',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      
      				$dbalter->add_field(array(
      					'name' => 'book_protect',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_category'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'category_options',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      
      				$dbalter->add_field(array(
      					'name' => 'category_protect',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_disambiguation'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'disambig_options',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      
      				$dbalter->add_field(array(
      					'name' => 'disambiguation_protect',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_page'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'page_settings',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_team'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'team_options',
      					'type' => 'int',
      					'attributes' => 'UNSIGNED'
      				));
      
      				$dbalter->add_field(array(
      					'name' => 'team_protect',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED'
      				));
      			}
      
      			if ($dbalter->fetch('vw_special'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'fieldcache',
      					'type' => 'blob'
      				));
      			}
      }
      If you are able to successfully complete the installation from this state, you may want to:
      1. Installation completed.
      2. "Uninstall" VaultWiki from the addon manager.
      3. "Install" VaultWiki from the addon manager.

      This should ensure that you are starting with a clean database and don't have to contend with data from a previous installation that may result in undefined behavior... or at least it might reveal why you had a partial existing installation to begin with.
      Reply Reply  
    7. 6 Days Ago 1:36 PM
      fabrik fabrik is offline
      New Member
      baby steps it seems.

      Got much further but now get: Exception: MySQL statement prepare error [1054]: Unknown column 'featured' in 'field list'

      I don't get the full call stack, only an error Add-on batch result
      One or more of the add-ons in this batch failed to install/upgrade. Click or hover over the error icon to view details of the error.
      Reply Reply  
    8. 6 Days Ago 1:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      Based on the message, I would be surprised if you progressed much. It seems you are indeed missing all the new columns added in 4.1.8, suggesting an existing 4.1.7 installation. Assuming a similar call stack, now replace the previous code change with:
      Code:
      if ($datatype == 'index') {
      			$dbalter = vw_Hard_Core::controller('DBalter')->get();
      
      			if ($dbalter->fetch('vw_discussion'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'featured',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED',
      					'length' => 1
      				));
      			}
      
      			if ($dbalter->fetch('vw_feed'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'featured',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED',
      					'length' => 1
      				));
      			}
      
      			if ($dbalter->fetch('vw_feeditem'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'featured',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED',
      					'length' => 1
      				));
      			}
      
      			if ($dbalter->fetch('vw_page'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'featured',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED',
      					'length' => 1
      				));
      			}
      
      			if ($dbalter->fetch('vw_special'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'featured',
      					'type' => 'tinyint',
      					'attributes' => 'UNSIGNED',
      					'length' => 1
      				));
      			}
      
      			if ($dbalter->fetch('vw_comment'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'embed_metadata',
      					'type' => 'blob',
      					'null' => true
      				));
      			}
      
      			if ($dbalter->fetch('vw_feed'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'embed_metadata',
      					'type' => 'blob',
      					'null' => true
      				));
      			}
      
      			if ($dbalter->fetch('vw_redirect'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'embed_metadata',
      					'type' => 'blob',
      					'null' => true
      				));
      			}
      
      			if ($dbalter->fetch('vw_revision'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'embed_metadata',
      					'type' => 'blob',
      					'null' => true
      				));
      			}
      
      			if ($dbalter->fetch('vw_special'))
      			{
      				$dbalter->add_field(array(
      					'name' => 'embed_metadata',
      					'type' => 'blob',
      					'null' => true
      				));
      			}
      }
      If this has no effect, I'll need you to find the new call stack in XenForo's Server Error Logs.
      Reply Reply  
    9. 6 Days Ago 1:51 PM
      fabrik fabrik is offline
      New Member
      OK, something very strange is going on. When I made that change I went back to the install and dicovered that it thought it was installing 4.1.7 again. So I uninstalled vw and deleted vw from the addon folder. I then uploaded 4.1.9 again and installed it and got the missing vw_Hard_Core class. Went back to the add on page and it was showing an install of 1.4.7. SO I think something must be leftover in the previous install.
      Reply Reply  
    10. 6 Days Ago 2:06 PM
      pegasus pegasus is offline
      VaultWiki Team
      If you submit a ticket I can figure out what is happening and clean out the old installation manually:
      https://www.vaultwiki.org/members/?do=newticket
      Reply Reply  
    11. 6 Days Ago 2:30 PM
      fabrik fabrik is offline
      New Member
      done.
      Reply Reply  
    12. 6 Days Ago 3:11 AM
      pegasus pegasus is offline
      VaultWiki Team
      Your installation has been repaired, and VaultWiki 4.1.9 is now installed successfully.

      First, it appears that XenForo's batch add-on installer will not upload any file from the ZIP that does not appear in the hashes.json file. For VaultWiki, the config file and various binary files, such as image files, are not listed in hashes.json. This explains why the config.php.xf2 file was missing. We've updated our download system so that the hashes for these files are added to future downloads. For now, you may need to manually upload some files, such as files in the styles/vw/vw folder, in order to see any missing images.

      Second, as theorized earlier, a previous installation of 4.1.7 was preventing installation of 4.1.9, but XenForo had placed it in an inconsistent state. This means you were not allowed to upgrade the add-on, or uninstall it, even though there was data in the database. Your logs showed that 4.1.7 was successfully installed in April 2024, so the inconsistent state was confusing. Unfortunately, the state is overwritten every time you attempt to install, so it's very difficult to tell what happened in the first place. Most likely you had a partial reinstall attempt in 2024 and forgot about it until now, then basically continued 4.1.7 install progress using 4.1.9 files.

      Since the initial report of the missing class has been resolved with updated hashes (which are provided by our web site and not tied to any precompiled file), and since the installation was successful and encountered no errors once started from a cleaned database, this issue is being marked as VW.org Bug.
      Reply Reply  
    13. This petition for a change to Fixed is currently pending
      6 Days Ago 6:30 AM
      fabrik fabrik is offline
      New Member
      Thank you very much Ted. No idea how we got in that state. We started to look at migrating from XenCarta to VaultWiki some time ago then other priorities got in the way (as they often do). We are now starting that project up again and wanted to upgrade to the latest version and then this issue.

      We very much appreciate your fast and full support on this.
       
    + 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:03 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.