• 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
    • user profile now gives php error

    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: user profile now gives php error

    • Issue Tools
      • View Changes
    1. issueid=3174 July 7, 2013 10:25 PM
      rizwank rizwank is offline
      New Member
      user profile now gives php error

      VW Beta 2
      XF 1.1.5

      browsing to the member page gives :
      Code:
      Fatal error: Call to a member function getParams() on a non-object in /var/www/html/forum/library/vw/XenForo/Template/Hook/MemberView.php on line 60
    Issue Details
    Issue Number 3174
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category User Profiles
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.0 Beta 2
    Fixed Version 4.0.0 Beta 3
    Milestone VaultWiki 4 Beta X
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. July 7, 2013 11:50 PM
      pegasus pegasus is offline
      VaultWiki Team
      In library/vw/XenForo/Template/Hook/MemberView.php, find:
      Code:
      $params = self::getParams('vw_profile_tab');
      Replace with:
      Code:
      $params = self::getParams('vw_profile_tab', $templater);
      Find:
      Code:
      $params = self::getParams('vw_usercp_nav');
      Replace with:
      Code:
      $params = self::getParams('vw_usercp_nav', $templater);
      Find:
      Code:
      	public static function getParams($templateName, $params)
      	{
      		if (!self::can_view($params))
      		{
      			return array();
      		}
      Replace with:
      Code:
      	public static function getParams($templateName, $params_or_templater)
      	{
      		if (!self::can_view($params_or_templater))
      		{
      			return array();
      		}
      
      		if (is_array($params_or_templater))
      		{
      			$params = $params_or_templater;
      		}
      		else
      		{
      			$params = array();
      		}
      Reply Reply  
    2. July 8, 2013 9:22 PM
      rizwank rizwank is offline
      New Member
      Your patch is missing a curly start after the else.

      Also problem not fixed.
      Code:
      Fatal error: Call to a member function getParams() on a non-object in /var/www/html/forum/library/vw/XenForo/Template/Hook/MemberView.php on line 59
      Code:
                      if (is_array($templater))
                      {
                              $params =& $templater;
                      }
                      else
                      {
                              $params = $templater->getParams();
                      }
      Reply Reply  
    3. July 8, 2013 10:01 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please post the definition of the getParams function as it appears in your file.
      Reply Reply  
    4. July 8, 2013 10:07 PM
      rizwank rizwank is offline
      New Member
      Code:
             public static function getParams($templateName, $params)
              {
                      if (!self::can_view($params_or_templater))
                      {
                              return array();
                      }
      
                      if (is_array($params_or_templater))
                      {
                              $params = $params_or_templater;
                      }
                      else {
                              $params = array();
                      }
      
                      $params['vw_index'] = vw_Hard_Core::controller('Fetch')->get('Index', 0);
      
                      if ($templateName == 'vw_profile_interact' OR $templateName == 'vw_profile_stats')
                      {
                              $params['vw_last'] = array('lastactivity' => $params['user']['vw_lastactivity']);
                              $params['vw_contributions'] = array();
      
                              vw_Hard_Core::model('Plugins/Profile')->prepare_profile_block($params['vw_last'], $params['vw_contributions']);
                      }
      
                      if ($templateName == 'vw_profile_interact')
                      {
                              $params['vw_can_interact'] = (
                                      !empty($params['vw_last']['itemid']) OR
                                      !empty($params['vw_contributions'])
                              );
                      }
      
                      return $params;
              }
      }
      Reply Reply  
    5. July 8, 2013 10:35 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please compare the first line you posted with the very last replace code I posted in this thread.
      Reply Reply  
    6. July 8, 2013 10:40 PM
      rizwank rizwank is offline
      New Member
      Doh. Fixed.
      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 11:56 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 © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.