Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Call to a member function children() on a non-obj

Featured Lock Resolved
When I try to chande settin on modules i get

Notice: Undefined property: JSimpleXMLElement::$positions in C:\wamp\www\glory\plugins\system\helix\helix.php on line 59

Fatal error: Call to a member function children() on a non-object in C:\wamp\www\glory\plugins\system\helix\helix.php on line 59


It goes from lines
	function genPos ($tmpl) {//Get all positions if an individual template
$file = JPATH_ROOT.DS.'templates'.DS.$tmpl.DS.'templateDetails.xml';
$output='';
$xml = JFactory::getXMLParser('Simple');
$xml->loadFile($file);
$positions = $xml->document->positions[0]->children();
foreach ($positions as $position) {
$output .= '<option value="' . $position->data() . '">' . $position->data() . '</option>';
}
return $output;
}

Joomla! 2.5.4
Php 5.3.0
Site on localhost

Any ideas?

8 Answers

Ehsan Riyadh

More than a month ago #Permalink
If possible plz, give me your ftp control.

Zeka

More than a month ago #Permalink
ShaperRiyadh, Thank you for your willingness to help, but I have found the cause of this error. It was the wrong syntax in the templateDetails.xml

chuki2

More than a month ago #Permalink
Hello there... i have same problem also..

How i can fix it?

Ehsan Riyadh

More than a month ago #Permalink
Which problem!

chuki2

More than a month ago #Permalink
Fatal error: Call to a member function children() on a non-object in C:\wamp\www\v1\plugins\system\helix\helix.php on line 59

Install on my laptop

I use notepad ++ to open, it show on this line

		$positions = $xml->document->positions[0]->children();		
foreach ($positions as $position) {
$output .= '<option value="' . $position->data() . '">' . $position->data() . '</option>';
}
return $output;
}

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
There might be a template in your template directory with error in templateDetails.xml file.

Sikelela Sigudhla

More than a month ago #Permalink
Hi,

What was the solution, can you write it down please

Sikelela Sigudhla

More than a month ago #Permalink
There might be a template in your template directory with error in templateDetails.xml file.


Hi,

I am have the same problem, can you kindly explain how to solve this issue in details


Regards,
Sike


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 121
Toufiq

Toufiq

Total Accepted Answers: 112
Mehtaz Afsana Borsha

Mehtaz Afsana Borsha

Total Accepted Answers: 58
Ofi Khan

Ofi Khan

Total Accepted Answers: 56
Rashida Rahman

Rashida Rahman

Total Accepted Answers: 35

121

Templates

314337

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us