• 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
    • Fatal Error: attempted to instantiate non-existent class vw_Start_Controller

    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: Fatal Error: attempted to instantiate non-existent class vw_Start_Controller

    • Issue Tools
      • View Changes
    1. issueid=6459 November 27, 2024 3:22 AM
      mazzly mazzly is offline
      Junior Member
      Fatal Error: attempted to instantiate non-existent class vw_Start_Controller

      Related to https://www.vaultwiki.org/issues/6458/,

      Pinned the PHP version to 8.1, which we have in the prod env, and am now getting a new error:

      Code:
      Fatal Error: attempted to instantiate non-existent class vw_Start_Controller
      /home/nginx/domains/foo.com/public/src/addons/vw/vw/_core/controller/start/vw.php does not exist or does not contain the specified class.
      
      #0: vw_Hard_Core::fetch_object() in [vw-platform]/src/addons/vw/vw/_hard/core.php at line 907
      #1: vw_Hard_Core::controller() in [vw-platform]/src/addons/vw/vw/Core.php at line 52
      #2: vw\vw\Core::init() in [vw-platform]/src/addons/vw/vw/Listener.php at line 57
      #3: vw\vw\Listener::app_setup() in [vw-platform]/src/XF/Extension.php at line 81
      #4: XF\Extension->fire() in [vw-platform]/src/XF/App.php at line 2994
      #5: XF\App->fire() in [vw-platform]/src/XF/App.php at line 2032
      #6: XF\App->setup() in [vw-platform]/src/XF/Admin/App.php at line 56
      #7: XF\Admin\App->setup() in [vw-platform]/src/XF.php at line 497
      #8: XF::setupApp() in [vw-platform]/src/XF.php at line 520
      #9: XF::runApp() in [vw-platform]/admin.php at line 13
      For some reason, it tries to load files from the path of the production server, although we are running this inside a local docker.
    Issue Details
    Issue Number 6459
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version Unknown
    Fixed Version (none)
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 30, 2024 6:43 PM
      pegasus pegasus is offline
      VaultWiki Team
      Most likely you have hardcoded your paths in a file somewhere which you have duplicated to docker.

      The default values for various paths are defined in src/addons/vw/vw/Helper/Paths.php. You were at least able to resolve the _hard/core.php file, so VW_HARD_PATH is being found automatically. By the looks of it, you have either hardcoded VW_DEPOT_PATH or VW_CORE_PATH.
      The first place that comes to mind where you may have hardcoded it is the VW_DEPOT_PATH in src/addons/vw/vw/config.php.
      Reply Reply  
    2. December 6, 2024 3:42 AM
      mazzly mazzly is offline
      Junior Member
      Nowhere in the code is that /home/nginx/... path found... And I also tried looking if the addon folders would have some symlinks but couldn't find anything...

      Could these references be cached somewhere? Or stored in db?
      Reply Reply  
    3. December 6, 2024 3:51 AM
      mazzly mazzly is offline
      Junior Member
      I also tried setting calling \XF::dump($path) in those places where VW_HARD_PATH, VW_DEPOT_PATH & VW_CORE_PATH are defined, and they are all correct... So, I guess that value is set wrong somewhere else?
      Reply Reply  
    4. December 6, 2024 3:59 AM
      mazzly mazzly is offline
      Junior Member
      Turns out that

      self::locate_class($type, $classname, $file, $dependency);

      Returns the wrong file path for some classes... Dunno why, any ideas?
      Reply Reply  
    5. December 6, 2024 2:31 PM
      pegasus pegasus is offline
      VaultWiki Team
      If this is a database restored from a backup on a different server, I see that it would be useful to expire the class cache or make it more agnostic to the base directory.

      I also see that the current expiration logic may be flawed. In src/addons/vw/vw/_hard/core.php, find:
      Code:
      if ($cached AND $cached['expires'] < microtime(true))
      Replace with:
      Code:
      if ($cached AND $cached['expires'] > microtime(true))
      I believe this was using the cache if it was outdated, but if it wasn't outdated it wasn't using the cache. This would normally result in the cache never being used, but if you restored from a backup that was older than the cache lifetime, or if your site was especially inactive, this could result in actually using the stale cache.
      Reply Reply  
    6. December 6, 2024 2:57 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed in the next patch. Beginning with the patch, the cache will now be agnostic as to the path prefix containing the class location. Rather, the cache will store which path should be used, rather than the value of the path, e.g. "VW_CORE_PATH" rather than what VW_CORE_PATH points to. Also the cache expiry is fixed per my previous post.

      With this change, the cache should now be portable across different systems if restoring from a backup on a different system, such as for server migrations, or creating test installations.
      Reply Reply  
    7. December 9, 2024 1:33 AM
      mazzly mazzly is offline
      Junior Member
      Getting further... I was now able to open the local site, but it still throws an error (even after disabling vw/vw through the XF CLI).

      Code:
      ErrorException: [E_WARNING] require_once(/home/nginx/domains/....com/public/src/addons/vw/vw/_core/model/marker/vw.php): Failed to open stream: No such file or directory in src/addons/vw/vw/_hard/core.php at line 777
      XF::handlePhpError() in src/addons/vw/vw/_hard/core.php at line 777
      require_once() in src/addons/vw/vw/_hard/core.php at line 777
      vw_Hard_Core::locate_class() in src/addons/vw/vw/_hard/core.php at line 402
      vw_Hard_Core::fetch_object() in src/addons/vw/vw/_hard/core.php at line 892
      vw_Hard_Core::model() in src/addons/vw/vw/_core/controller/fetch/page/vw.php at line 432
      vw_Fetch_Page_Controller->stack_info() in src/addons/vw/vw/_core/controller/fetch/page/xf0.php at line 19
      vw_Fetch_Page_Controller_XF0->stack_info() in src/addons/vw/vw/_core/controller/fetch/stack/vw.php at line 150
      vw_Fetch_Stack_Controller->build_query() in src/addons/vw/vw/_core/controller/fetch/stack/vw.php at line 129
      vw_Fetch_Stack_Controller->query() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 615
      vw_Fetch_Controller->query() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 456
      vw_Fetch_Controller->get() in src/addons/vw/vw/_core/controller/fetch/vw.php at line 295
      vw_Fetch_Controller->get_by_route() in src/addons/vw/vw/Entity/Integrate.php at line 26
      vw\vw\Entity\Integrate->canView() in src/XF/Entity/Node.php at line 54
      XF\Entity\Node->canView() in src/XF/Mvc/Entity/AbstractCollection.php at line 328
      XF\Mvc\Entity\AbstractCollection->XF\Mvc\Entity\{closure}()
      array_filter() in src/XF/Mvc/Entity/AbstractCollection.php at line 197
      XF\Mvc\Entity\AbstractCollection->filter() in src/XF/Mvc/Entity/AbstractCollection.php at line 329
      XF\Mvc\Entity\AbstractCollection->filterViewable() in src/XF/Repository/Node.php at line 161
      XF\Repository\Node->filterViewable() in src/XF/Repository/Node.php at line 22
      XF\Repository\Node->getNodeList() in src/XF/Pub/Controller/Forum.php at line 54
      XF\Pub\Controller\Forum->actionList() in src/addons/MaZ/AMP/XF/Pub/Controller/Forum.php at line 33
      MaZ\AMP\XF\Pub\Controller\Forum->actionList() in src/XF/Mvc/Dispatcher.php at line 352
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
      XF\App->run() in src/XF.php at line 524
      XF::runApp() in index.php at line 20
      Reply Reply  
    8. December 9, 2024 10:36 AM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, I see what is happening now. When the cache expires, it is not actually completely deleted. So leftover portions of the stale cache can still be used after the cache is updated again. The easiest way to get around this for now is just to manually delete the caches, as we'll have to redesign some of the logic so that it completely clears on expiration.

      Run the following MySQL queries:
      Code:
      DELETE FROM xf_data_registry
      WHERE data_key IN ('vw_class_cache', 'vw_file_cache')
      Code:
      TRUNCATE TABLE xf_vw_accelerate
      More notes: From what I am seeing in the code, the only way you would even have an existing cache with this issue, is if you freshly installed (not upgraded) VaultWiki using 4.1.7, then used it for a bit, then cloned that installation. Are you aware of another usage pattern that you might have performed?
      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 12:28 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.