0

I have a videos protal system that I just udated and I am getting this error:
[24-Feb-2013 02:48:44] PHP Fatal error: Call to a member function portalIndex() on a non-object in /home/user/public_html/admin/applications_addon/other/videos/modules_public/display/index.php on line 152

The line that is on contains ths:

$this->output .= $this->registry->output->getTemplate('videos')->portalIndex( $categories, $memberVideos, $featuredVideos );

This is the code around it:

        //-----------------------------------------
        // Portal or category layout?
        //----------------------------------------- 

        $featuredVideos = $this->registry->getClass('video_functions')->getFeaturedVideos();
        $memberVideos   = $this->registry->getClass('video_functions')->mainMemberVideos();

        if( !$this->request['showcats'] AND $this->settings['vs_portal_layout'] )
        {
            $this->output .= $this->registry->output->getTemplate('videos')->portalIndex( $categories, $memberVideos, $featuredVideos );      
        }
        else
        {
            $this->output .= $this->registry->output->getTemplate('videos')->categoryIndex( $categories, $memberVideos );            
        }

        $this->output .= $this->stats(); 
    }
3
Contributors
2
Replies
18
Views
4 Years
Discussion Span
Last Post by diafol
0

I have a videos protal system that I just udated and I am getting this error:

You define these

$featuredVideos = $this->registry->getClass('video_functions')->getFeaturedVideos();
$memberVideos = $this->registry->getClass('video_functions')->mainMemberVideos();

The reason you got the error because you didn't define $categories.

These 2 code you should look a like even though it's different index: portalIndex() & categoryIndex()

Instead of this:

//portalIndex()
$this->output .= $this->registry->output->getTemplate('videos')->portalIndex( $categories, $memberVideos, $featuredVideos );
//categoryIndex()
$this->output .= $this->registry->output->getTemplate('videos')->categoryIndex( $categories, $memberVideos ); 

It should look like this:

//portalIndex()
$this->output .= $this->registry->output->getTemplate('videos')->portalIndex( $categories, $memberVideos, $featuredVideos );
//categoryIndex()
$this->output .= $this->registry->output->getTemplate('videos')->categoryIndex( $categories, $memberVideos, $featuredVideos ); 

You are missing $featuredVideos in the categoryIndex()

0

Is this your code or one you picked up?
It's a bit messy with all those nested bits.
Show the relevant methods and say which classes they're in.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.