I have a Joomla extension which is built for Joomla 1.5. At the moment I'm upgrading the extension to work with Joomla 3.0

I updated old deprecated php functions in the new version of the extension.

The problem is when I activate the extension on my Joomla 3 site and I try to login into the backend, I get the following error:

Fatal error: Call to a member function get() on null in [my joomla folder]/libraries/vendor/joomla/application/src/AbstractApplication.php on line 126

Does anybody had this error before? If so, how can this be solved?


Additional information:

I've read the documentation of Joomla 1.5 & 3. What I've seen during my research is that this error usually occurs when you try to load a Joomla 1.5 template into a Joomla 3 website. But in this situation it's totally different. The problem resides in the extension. But I can't figure out which function is causing the issue. It could be that the old J 1.5 code is still in the extension, too bad Joomla does not have a way of searching through deprecated Joomla functions.

When I add a debug_backtrace() I get all arrays printed on the screen, but after that I get: Error: Failed to start application: Failed to start the session because headers have already been sent by "[joomla dir]/libraries/vendor/joomla/application/src/AbstractApplication.php" at line 128.

I placed the debug_backtrace() before the return in the get method. (So I don't get to see a complete array list).

The last array I get to see before the error:

[5] => Array
        [file] => /[joomla dir]/index.php
        [line] => 46
        [function] => getApplication
        [class] => Joomla\CMS\Factory
        [type] => ::
        [args] => Array
                [0] => site

  • The last array entry in the back trace often isn't the source of the issue. Is a file from your extension one of the entries in the array? If so, I'd look at that file/line first. If not, maybe post the entire back trace array instead of just the last one. – Drew G Feb 2 '18 at 13:59
  • Try turning on error reporting to full and debugging they might help. Also check your php error logs which may give you a clue. – Eoin Feb 3 '18 at 15:58
  • If you are getting a headers error message then something is outputting some type of content prior to the Joomla application starting. Look at your old files and see what is being printed out and from where. More than likely it is in the file that is being referenced. – Terry Carter May 1 '18 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.