0
Welcome Guest! Login
0 items Join Now

SOLVED GANTRY5_THEME_LOADING_FAILED when initializing Joomla externally.

    • Mike Feng's Avatar
    • Mike Feng
    • Sr. Rocketeer
    • Posts: 197
    • Thanks: 1

    SOLVED GANTRY5_THEME_LOADING_FAILED when initializing Joomla externally.

    Posted 9 years 11 months ago
    • So I have an external file that tries to initialize Joomla like this:

      if (!defined('_JEXEC')) {
      	$joomlaPath = dirname(__FILE__)."/../../../..";
      	define('_JEXEC', 1);
      	
      	if (file_exists($joomlaPath . '/defines.php')) {
      		include_once $joomlaPath . '/defines.php';
      	}
      	
      	if (!defined('_JDEFINES')) {
      		define('JPATH_BASE', $joomlaPath);
      		require_once JPATH_BASE.'/includes/defines.php';
      	}
      	
      	require_once JPATH_BASE.'/includes/framework.php';
      	// Instantiate the application.
      	$app = JFactory::getApplication('site');
      	// Initialise the application.
      	$app->initialise();
      	jimport('joomla.filesystem.file');
      }

      This works if I'm not using Gantry/RT template, but when I do, it throws a blank page with the error "GANTRY5_THEME_LOADING_FAILED". How can I initialize/include Gantry, presumably to resolve this problem?
    • My extensions: http://www.simbunch.com/
      http://twitter.com/simbunch
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED GANTRY5_THEME_LOADING_FAILED when initializing Joomla externally.

    Posted 9 years 11 months ago
    • As Gantry 5 is a release candidate and you are not a currently subscribed member - please could you ask your question in the Gantry 5 git chat https://gitter.im/gantry/gantry5 - Our developers are there and I'm sure they will b e able to help you.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Mike Feng's Avatar
    • Mike Feng
    • Sr. Rocketeer
    • Posts: 197
    • Thanks: 1

    Re: SOLVED GANTRY5_THEME_LOADING_FAILED when initializing Joomla externally.

    Posted 9 years 11 months ago
    • Found the problem. Changing the line $app->initialise(); to $app->execute(); solves it. This isn't ideal though, since it means Joomla has to run all published plugins, even if they're not relevant, which will likely require more resources to load the page.
    • My extensions: http://www.simbunch.com/
      http://twitter.com/simbunch
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED GANTRY5_THEME_LOADING_FAILED when initializing Joomla externally.

    Posted 9 years 11 months ago
    • Ok thanks for sharing.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.075 seconds