Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to a member function elapsed_time()
#1

[eluser]monkster[/eluser]
Hi all,

I'm getting the below message:
Code:
hello world!
Fatal error: Call to a member function elapsed_time() on a non-object in /Applications/MAMP/htdocs/Album4me/components/com_comprofiler/plugin/user/plug_Album4me/codeigniter/system/libraries/Output.php on line 164

And this is my controller file's contents:
class Album4me extends Controller {
Code:
class Album4me extends Controller {

    /*function Album4me()
    {
        parent::Controller();
    }*/
    
    function index()
    {
        //$this->load->view('hihi');
        echo "hello world!";
    }
    
    function _output($output)
    {
        echo $output;
    }
}

Any ideas please?
#2

[eluser]Unknown[/eluser]
uncomment this part of code

Code:
/*function Album4me()
    {
        parent::Controller();
    }*/
#3

[eluser]monkster[/eluser]
[quote author="Digital God" date="1199803131"]uncomment this part of code

Code:
/*function Album4me()
    {
        parent::Controller();
    }*/
[/quote]
Hi,

It was originally uncommented. When the error happened, I start to comment things out to isolate the problem, without success.
#4

[eluser]tonanbarbarian[/eluser]
I notice from the filepath of the error that you are trying to create a plugin in Joomla! for the Community Builder component.
The issue that you are having may be how you are integrating code igniter with CB/Joomla!

I would recommend that you first build your app/plugin to run stand alone and get it working in a normal CI environment, then work on getting the integration to work

If you have already got the app to work stand alone then ... not sure how much more i can help ... yet.
I say yet because i plan to be integrating a CI app in Joomla! over the next week or so
#5

[eluser]monkster[/eluser]
[quote author="tonanbarbarian" date="1199809862"]I notice from the filepath of the error that you are trying to create a plugin in Joomla! for the Community Builder component.
The issue that you are having may be how you are integrating code igniter with CB/Joomla!

I would recommend that you first build your app/plugin to run stand alone and get it working in a normal CI environment, then work on getting the integration to work

If you have already got the app to work stand alone then ... not sure how much more i can help ... yet.
I say yet because i plan to be integrating a CI app in Joomla! over the next week or so[/quote]

Hi tonan,

Thanks for your reply.

I've already gotten it to work with a standard Joomla extension. I'm currently trying to convert it into a CB plugin.

Wink

Still no luck.
#6

[eluser]eggshape[/eluser]
I think that error occurs because the benchmark class is not instantiated; I remember an elapse_time() method lives there. Basically your controller works, and upon termination, the elapse_time() method is being called. This call is often found in default view files and renders how long the script took.
#7

[eluser]monkster[/eluser]
I suspect I know the cause.

What I was doing was, I had a class A that has a method called "A_method" do a require("codeigniter/index.php")

Perhaps because the calling method was in a class already, that's why these error messages occur.

Is there a way to do this require() while losing the class, given that A_method must reside in another class?

As long as A_method does the require, it won't work. I tried creating another function outside of class A just to do the require(), but it still doesn't work.

Any ideas?




Theme © iAndrew 2016 - Forum software by © MyBB