We have a site on a rackspace server that has been working just fine for the past 2 months. Suddenly yesterday morning only the few pages without flexicontent are showing up. Pages with Flexicontent are empty in FF or in Chrome they return a 500 error.
The link is here:
staging.cortina-systems.com/
To see the error simply click on any link in the main menu save for "Home".
Strangely, we were not working on the site when it started behaving this way and the server guys told me they did nothing on the server either.
The error we get from the logs is:
Code:
mod_fcgid: stderr: PHP Fatal error: Cannot access empty property in [snip]/web/components/com_flexicontent/classes/flexicontent.helper.php on line 2158, ref
erer: https://staging.cortina-systems.com/
Line 2158 is this line here:
Code:
$language_tag = $languages->$user_lang->code;
Contained in this function:
Code:
function loadTemplateLanguageFile( $tmplname='default', $view='' )
{
// Check that template name was given
$tmplname = empty($tmplname) ? 'default' : $tmplname;
// This is normally component/module/plugin name, we could use 'category', 'items', etc to have a view specific language file
// e.g. en/en.category.ini, but this is an overkill and make result into duplication of strings ... better all in one file
$extension = ''; // JRequest::get('view');
// Current language, we decided to use LL-CC (language-country) format mapping SEF shortcode, e.g. 'en' to 'en-GB'
$user_lang = flexicontent_html::getUserCurrentLang();
$languages = FLEXIUtilities::getLanguages($hash='shortcode');
$language_tag = $languages->$user_lang->code;
// We will use template folder as BASE of language files instead of joomla's language folder
// Since FLEXIcontent templates are meant to be user-editable it makes sense to place language files inside them
$base_dir = JPATH_COMPONENT_SITE.DS.'templates'.DS.$tmplname;
// Final use joomla's API to load our template's language files -- (load english template language file then override with current language file)
JFactory::getLanguage()->load($extension, $base_dir, 'en-GB', $reload=true); // Fallback to english language template file
JFactory::getLanguage()->load($extension, $base_dir, $language_tag, $reload=true); // User's current language template file
}
This is the error I get in Chrome:
Code:
The website encountered an error while retrieving https://staging.cortina-systems.com/index.php?option=com_flexicontent&view=item&id=1&Itemid=117. It may be down for maintenance or configured incorrectly.
I am really hoping someone can help us because after all this work it's frustrating to end up without a website.