• 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
    • attempted to instantiate non-existent classvw_UI_Tab_LikesCollect_Model

    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: attempted to instantiate non-existent classvw_UI_Tab_LikesCollect_Model

    • Issue Tools
      • View Changes
    1. issueid=6020 April 13, 2020 4:31 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      attempted to instantiate non-existent classvw_UI_Tab_LikesCollect_Model

      When opening an alert or viewing /account/alerts

      Fatal Error: attempted to instantiate non-existent class vw_UI_Tab_LikesCollect_Model
      [vw-core]/model/ui/tab/likescollect/vw.php does not exist or does not contain the specified class.

      #0: vw_Hard_Core::fetch_object() in [vw-platform]/library/vw/_hard/core.php at line 764
      #1: vw_Hard_Core::model() in [vw-core]/model/ui/vw.php at line 57
      #2: vw_UI_Model->check() in [vw-platform]/library/vw/XenForo/AlertHandler/Base.php at line 53
      #3: vw_XenForo_AlertHandler_Base->canViewAlert() in [vw-platform]/library/XenForo/Model/Alert.php at line 267
      #4: XenForo_Model_Alert->_getViewableAlerts() in [vw-platform]/library/XenForo/Model/Alert.php at line 78
      #5: XenForo_Model_Alert->getAlertsForUser() in [vw-platform]/library/XenForo/ControllerPublic/Account.php at line 33
      #6: XenForo_ControllerPublic_Account->actionAlerts() in [vw-platform]/library/SV/AlertImprovements/XenForo/ControllerPublic/Account.php at line 41
      #7: SV_AlertImprovements_XenForo_ControllerPublic_Account->actionAlerts() in [vw-platform]/library/XenForo/FrontController.php at line 369
      #8: XenForo_FrontController->dispatch() in [vw-platform]/library/XenForo/FrontController.php at line 152
      #9: XenForo_FrontController->run() in [vw-platform]/index.php at line 13
    Issue Details
    Issue Number 6020
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Page Output
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 RC 2
    Fixed Version 4.1.0 RC 2
    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. April 13, 2020 7:55 PM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs in XenForo 1, if the user has received an alert because someone liked a page the user contributed to.

      In library/vw/XenForo/AlertHander/FakeLike.php, add the following method:
      Code:
      	public function canViewAlert(array $alert, $content, array $viewingUser)
      	{
      		$content = vw_Hard_Core::controller('Fetch')->get($content['collecttypeid'], $content['collectid']);
      
      		return vw_Hard_Core::model('UI')->check('can_main_tab', $content, vw_Hard_Core::model('User')->unvalidate($viewingUser));
      	}
      Reply Reply  
    2. April 14, 2020 5:19 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I added it to the end of the file and got this error:

      An exception occurred: syntax error, unexpected 'public' (T_PUBLIC), expecting end of file in /library/vw/XenForo/AlertHandler/FakeLike.php on line 29

      XenForo_Autoloader->autoload()
      spl_autoload_call()
      class_exists() in XenForo/Model/Alert.php at line 586
      XenForo_Model_Alert->_getAlertHandlerFromCache() in XenForo/Model/Alert.php at line 226
      XenForo_Model_Alert->_getContentForAlerts() in XenForo/Model/Alert.php at line 77
      XenForo_Model_Alert->getAlertsForUser() in XenForo/ControllerPublic/Account.php at line 74
      XenForo_ControllerPublic_Account->actionAlertsPopup() in XenForo/FrontController.php at line 369
      XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 152
      XenForo_FrontController->run() in /public/index.php at line 13
      Reply Reply  
    3. April 14, 2020 10:14 AM
      pegasus pegasus is offline
      VaultWiki Team
      You probably did not add it inside the class.
      Reply Reply  
    4. April 14, 2020 2:30 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      You are correct.
      Reply Reply  
    5. May 17, 2020 4:35 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      For some reason this issue re-appeared today. I tried to fix it by upgrading to the latest build but no dice.
      I have disabled VW for now.
      Reply Reply  
    6. May 17, 2020 12:36 PM
      pegasus pegasus is offline
      VaultWiki Team
      The code discussed above which was already confirmed working by you is present in RC 3, so it is probably not the same exact issue. There is most likely a different stack trace. Please provide the updated stack trace.
      Reply Reply  
    7. May 18, 2020 5:30 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      It went away miraculously. Weird.
      Reply Reply  
    8. June 9, 2020 6:10 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Someone liked a wiki article I started so I got the error again:
      Fatal Error: attempted to instantiate non-existent class vw_UI_Tab_LikesCollect_Model
      [vw-core]/model/ui/tab/likescollect/vw.php does not exist or does not contain the specified class.

      #0: vw_Hard_Core::fetch_object() in [vw-platform]/library/vw/_hard/core.php at line 766
      #1: vw_Hard_Core::model() in [vw-core]/model/ui/vw.php at line 57
      #2: vw_UI_Model->check() in [vw-platform]/library/vw/XenForo/NewsFeedHandler/Base.php at line 65
      #3: vw_XenForo_NewsFeedHandler_Base->canViewNewsFeedItem() in [vw-platform]/library/XenForo/Model/NewsFeed.php at line 376
      #4: XenForo_Model_NewsFeed->_getViewableNewsFeedItems() in [vw-platform]/library/XenForo/Model/NewsFeed.php at line 137
      #5: XenForo_Model_NewsFeed->fillOutNewsFeedItems() in [vw-platform]/library/XenForo/Model/NewsFeed.php at line 112
      #6: XenForo_Model_NewsFeed->getNewsFeed() in [vw-platform]/library/Milano/LiveFeed/Model/NewsFeed.php at line 7
      #7: Milano_LiveFeed_Model_NewsFeed->getNewsFeed() in [vw-platform]/library/XenForo/ControllerPublic/RecentActivity.php at line 30
      #8: XenForo_ControllerPublic_RecentActivity->actionIndex() in [vw-platform]/library/Milano/LiveFeed/ControllerPublic/RecentActivity.php at line 7
      #9: Milano_LiveFeed_ControllerPublic_RecentActivity->actionIndex() in [vw-platform]/library/XenForo/FrontController.php at line 369
      #10: XenForo_FrontController->dispatch() in [vw-platform]/library/XenForo/FrontController.php at line 152
      #11: XenForo_FrontController->run() in [vw-platform]/index.php at line 13

      Please forward this error to VaultWiki technical support at https://www.vaultwiki.org/support/4X/ or email
      support@vaultwiki.org.

      Recent-activity no longer works for me.
      Reply Reply  
    9. June 10, 2020 12:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs in XenForo 1, if the user's page-like is trying to appear in Members > Recent Activity, or a user's news feed of people they follow.

      In library/vw/XenForo/NewsFeedHandler/FakeLike.php, add the following method inside the class:
      Code:
      	public function canViewNewsFeedItem(array $item, $content, array $viewingUser)
      	{
      		$content = vw_Hard_Core::controller('Fetch')->get($content['collecttypeid'], $content['collectid']);
      
      		return vw_Hard_Core::model('UI')->check('can_main_tab', $content, vw_Hard_Core::model('User')->unvalidate($viewingUser));
      	}
      Reply Reply  
    10. July 28, 2020 7:58 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Will this fix be included in RC4?
      It seems to be already included in RC3PL1 but it doesn't fix it. If I add the above to the file then the recent activity page will stop working.
      Is there another way to resolve this? For example by removing VW from recent activity or removing like functionality from VW?
      Reply Reply  
    11. July 28, 2020 1:02 PM
      pegasus pegasus is offline
      VaultWiki Team
      The above code fixes the issue in NewsFeedHandler only. You may be getting a similar issue which is located in a different file. Please post the trace for the error message you are receiving.
      Reply Reply  
    12. July 29, 2020 10:02 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Is it possible to remove VW from the newsfeedhandler?
      Reply Reply  
    13. July 29, 2020 6:20 PM
      pegasus pegasus is offline
      VaultWiki Team
      No, but you can disable liking of pages, which is what uses the FakeLike handler. In Options > VaultWiki: Content Types > Wiki Content Users Can Like. If users can't use those kinds of likes, then they should stop appearing in the news feed.

      However, disabling the feature wouldn't be too helpful as you seem to make use of it. Instead, we should try to resolve the error you are receiving. You have not posted an updated error message since the fix was applied, and you previously said the fix worked. That tells me that either you have a new error (which might be similar but would be a different message) or your server has started running off an older version of the files for some reason. Remember, whenever you upload new files or make edits, you tend to need to clear your server's opcode cache. This has been a common issue for your site.
      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 7:29 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.