0
votes

Attempted install of converted 1.5 template in Joomla results in 500 Server Error. Turns out to be caused by PHP error:

Trying to get property of non-object in libraries/joomla/installer/adapters/template.php on line 54

and

Fatal error: Call to a member function attributes() on a non-object" on the next line.

Any Joomla experts out there with ideas?

2
hmm, this is definitely due a php file in the template folder. I have a feeling it might be the index.php but could be wrong. hard to say without looking at any code. would you be able to provide the index.php code if it isnt too long? - Lodder

2 Answers

0
votes

This typer of error is the result of the templates mainfest (XML) file being malformed. i.e. it's not correctly structured.

As you're converting a 1.5 template I would check the docs.joomla.org article "Upgrading a Joomla 1.5 template to Joomla 2.5"

If you post your templates manifest file we can probably help.

0
votes

Lines 53 and 55 of the Joomla libraries/joomla/installer/adapters/template.php relate to loading the language file. The specific lines are below. As you can see this is just relating to finding the name of the language file from the manifest

$this->manifest = $this->parent->getManifest();
$name = strtolower(JFilterInput::getInstance()->clean((string) $this->manifest->name, 'cmd'));
$client = (string) $this->manifest->attributes()->client;

I would suggest that line 53 is failing to find $this->parent->getManifest() and thus attributes is being called on a empty object (the $this->manifest part) and the instance can't be found of the $this->manifest again because it doesn't exist.

Read up on this Joomla Wiki Article if you don't know what a manifest is. I advise if you are permanently upgrading your template that you read through this and update your templates XML file to make sure it applies to all of this. As cppl says above as well also try reading through the upgrading a Joomla 1.5 template to 2.5 here. Specifically in your case the language section as this seems to be producing the error - however as the manifest is a very general thing through Joomla I would suspect this is just the first instance that is found - and would be systematic through the install!