Jump to content
DevFuse Forums
  • Errors - uncaught exceptions


    Loren
    • Fixed IP.Board Version: IP.Board 4.3.x
    Error: Call to undefined method IPS\collections\Item::parents() (0)
    #0 /home/public_html/forums/system/Content/Controller.php(238): IPS\Content\_Controller->_setBreadcrumbAndTitle(Object(IPS\collections\Item\Image), false)
    #1 /home/public_html/forums/applications/collections/modules/front/collections/image.php(43): IPS\Content\_Controller->manage()
    #2 /home/public_html/forums/system/Dispatcher/Controller.php(96): IPS\collections\modules\front\collections\_image->manage()
    #3 /home/public_html/forums/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
    #4 /home/public_html/forums/applications/collections/modules/front/collections/image.php(32): IPS\Content\_Controller->execute()
    #5 /home/public_html/forums/system/Dispatcher/Dispatcher.php(146): IPS\collections\modules\front\collections\_image->execute()
    #6 /homeg/public_html/forums/index.php(13): IPS\_Dispatcher->run()
    #7 {main}

    Thanks for any help.

    Loren



    User Feedback

    Recommended Comments

    Here is the backtrace...

    #0 /home/public_html/forums/init.php(533): IPS\_Log::log('Error: Call to ...', 'uncaught_except...')
    #1 [internal function]: IPS\IPS::exceptionHandler(Object(Error))
    #2 {main}

     

    Share this comment


    Link to comment
    Share on other sites

    I'm still having trouble reproducing this though, I've setup a test item with a few test images and modifications.
    Is there any page or url your visiting that you can reproduce this on?

    Share this comment


    Link to comment
    Share on other sites

    Temporary patch:

    Open applications/collections/modules/front/collections/image.php

    Find:

            /* Get IMAGE */
    	    $image = parent::manage();   
    
            exit(); 

    Replace With:

            /* Get image */
            try
            {
                $image = \IPS\collections\Item\Image::load( \IPS\Request::i()->id );
                $file = \IPS\File::get( 'collections_ItemImages', $image->url );
    
                $headers	= array_merge( \IPS\Output::getCacheHeaders( time(), 360 ), array( "Content-Disposition" => \IPS\Output::getContentDisposition( 'inline', $file->originalFilename ), "X-Content-Type-Options" => "nosniff" ) );
    
                /* Send headers and print file */
                \IPS\Output::i()->sendStatusCodeHeader( 200 );
                \IPS\Output::i()->sendHeader( "Content-type: " . \IPS\File::getMimeType( $file->originalFilename ) . ";charset=UTF-8" );
    
                foreach( $headers as $key => $header )
                {
                    \IPS\Output::i()->sendHeader( $key . ': ' . $header );
                }
                \IPS\Output::i()->sendHeader( "Content-Length: " . $file->filesize() );
    
                $file->printFile();
                exit;
            }
            catch ( \OutOfRangeException $e )
            {
                \IPS\Output::i()->error( 'node_error', '', 404, '' );
            }
            catch ( \UnderflowException $e )
            {
                \IPS\Output::i()->error( 'node_error', '', 404, '' );
            }

    Save.

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Status Definitions

    Pending = We are still working on this report.

    Fixed = The issue has been fixed and the resolution will be available in the next version.

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

×