- Posts: 5
- Thank you received: 0
Kunena 7.0.5 & Kunena 6.4.11 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.0.5 [K 7.0.5] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.
The Kunena team is also pleased to announce the eleventh version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.
Question Call to a member function getAttribute() on a non-object while installing Kunena 1.5.14
- pralhad.rajgor
-
Topic Author
- Offline
- New Member
-
Can i try installing an lower version of kunena ?. If yes then were can they be downloaded from ?
Please Log in or Create an account to join the conversation.
How about you abandon the attempt to fudge a Joomla website on your PC using XAMPP and concentrate on testing things out with a real website. What would be your response to that suggestion?
You can have a fully functioning Joomla website, with K 1.6, up and running in less than an hour. That's what I would do in your situation. I would not feel happy spending days trying to get things working on my PC and have nothing to show for my efforts. It's your decision, however.
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
I've got exactly he same trouble on a REAL website.
PHP version: 5.1.3RC4-dev
MySQL version: 5.0.83
Joomla version: 1.5.22
I can't change the version of php. (my provider uses only this one).
I get the error 'call to a member function ...' when I try to install the forum.
It's a fresh install, from a folder on the server,
what can I do ?
thanks a lot for a reply.
Please Log in or Create an account to join the conversation.
- pralhad.rajgor
-
Topic Author
- Offline
- New Member
-
- Posts: 5
- Thank you received: 0
Whatever little bit of debugging i have tried sums up as.
we have a file in called "fx.upgrade.class.php" under the lib folder in the kunena package.
below is the code from the file
//initiate XML doc
$xmlDoc = new DOMIT_Lite_Document();
$xmlDoc->loadXML( $this->_upgradeDir .DS. $this->xmlFileName, false, true );
//load root element and check XML version (for future use)
$root = &$xmlDoc->documentElement;
$comUpgradeVersion = $root->getAttribute( "version" );
//here comes the real stuff
if($upgrade == 0) {
$installElement =& $root->firstChild;
$version = $installElement->getAttribute( "version" );
marked in red is the line for which i get the error.
i had a few observation.
1st. i wassn't able to locate the class "DOMIT_Lite_Document" in any of the file present in zip;
2nd. whether "$installElement" is an valid object at a point when it calls method getAttribute(). how do i figure that out..?
3rd. Do we actually have a method getAttribute()..?? dedfined for above mentioned class..??
Please Log in or Create an account to join the conversation.
88:
89: //install & upgrade class
90: $fbupgrade = new fx_Upgrade("com_kunena", "kunena.install.upgrade.xml", "fb_", "install", false);
91:
92: // Start Installation/Upgrade
93: $fbupgrade->doUpgrade();
So here they created an instance of this class fx_Upgrade, the definition of which can be found in fx.upgrade.class.php
The line which is the culprit in this file is located here (line 255)
254: $installElement =& $root->firstChild;
255: $version = $installElement->getAttribute( "version" );
256: $versiondate = $installElement->getAttribute( "versiondate" );
257: $build = $installElement->getAttribute( "build" );
258: $versionname = $installElement->getAttribute( "versionname" );
The error message says >> Call to a member function getAttribute() on a non-object in <<PATH TO YOUR JOOMLA INSTALLATION>>/fx.upgrade.class.php on line 255
Which means $installElement above is not a valid object, it is supposed to be initiated by the code on line 254, which means that the call to $root->firstChild returned an invalid object reference.
Looking at how $root is instantiated on these lines
243:
244: //initiate XML doc
245: $xmlDoc = new DOMIT_Lite_Document();
246: $xmlDoc->loadXML( $this->_upgradeDir .DS. $this->xmlFileName, false, true );
247:
248: //load root element and check XML version (for future use)
249: $root = &$xmlDoc->documentElement;
250: $comUpgradeVersion = $root->getAttribute( "version" );
we figure that $root is nothing but the handle to a XML document located in the file kunena.install.upgrade.xml in the install folder of the administrator component folder.
the above answers question 2 of pralhad.rajgor, question 3 is irrelevant, and as for question 1, the class "DOMIT_Lite_Document" is a generic class in the libraries/domit and is used for loading XML documents from XML files.
So finally based on the above analysis we are left with the following pointers, that the above mentioned XML file is missing or is corrupt. This could be the only reason why the XML document object was not correctly formed and which then answers why $root->firstChild did not return a valid object.
the file kunena.install.upgrade.xml is very much present, however on windows machines you will see that on line 3 & line 348 you find a special character (the character for spelling Community in Italian), this character is what is causing the XML parser used by DOMIT_Lite_Document to fail, remove this special character and you should be fine !
Regards,
HP
Please Log in or Create an account to join the conversation.
- pralhad.rajgor
-
Topic Author
- Offline
- New Member
-
- Posts: 5
- Thank you received: 0
It works fine now.
Please Log in or Create an account to join the conversation.