0
votes

A website my friend owns is experiencing an issue and doesn't load anymore, I'm trying to assist but don't know a lot about PHP and websites.

The error that comes up when the page is opened is

Fatal error: Uncaught exception 'RuntimeException' with message 'JLIB_APPLICATION_ERROR_APPLICATION_LOAD' in /home/vandlar1/public_html/libraries/cms/application/cms.php:329 Stack trace: #0 /home/vandlar1/public_html/libraries/joomla/factory.php(124): JApplicationCms::getInstance('site') #1 /home/vandlar1/public_html/index.php(38): JFactory::getApplication('site') #2 {main} thrown in /home/vandlar1/public_html/libraries/cms/application/cms.php on line 329

In the PHP file that it refers to this is the function

public static function getInstance($name = null)
    {
        if (empty(static::$instances[$name]))
        {
        // Create a JApplicationCms object.
        $classname = 'JApplication' . ucfirst($name);

        if (!class_exists($classname))
        {
            throw new RuntimeException(JText::sprintf('JLIB_APPLICATION_ERROR_APPLICATION_LOAD', $name), 500);
        }

        static::$instances[$name] = new $classname;
    }

    return static::$instances[$name];
}

I haven't dealt with run time errors in my experience much so any help would be appreciated.

1
Why in the world is the argument $name optional (defaultet to null) if all the code in the the method requires it to be set? But that might be Joomla-code? - M. Eriksson
I'm not sure, it's code from a go daddy website. - vashirick

1 Answers

0
votes

Don't know much about Joomla, but it looks like this function is trying to find a class called JApplicationSite and is failing to find it. It could be an autoloading problem, i.e. the application doesn't know where to look for the file/class. Or it could be that the class doesn't exist.