- Posts: 1
- Thank you received: 2
Kunena 6.2.5 & module Kunena Latest 6.0.7 released
The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2
Question Call to a member function getAttribute() on a non-object while installing Kunena 1.5.14
13 years 1 month ago #11
by hkp
Replied by hkp on topic Re: Call to a member function getAttribute() on a non-object while installing Kunena 1.5.14
The installation process for K 1.5.14 kicks in from these lines in the file kunena.install.php
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
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
Less
More
- Posts: 5
- Thank you received: 0
13 years 1 month ago #12
by pralhad.rajgor
Replied by pralhad.rajgor on topic Re: Call to a member function getAttribute() on a non-object while installing Kunena 1.5.14
Thanks, hkp..
It works fine now.
It works fine now.
Please Log in or Create an account to join the conversation.
12 years 8 months ago - 12 years 8 months ago #13
by o-sup
Replied by o-sup on topic Re: Call to a member function getAttribute() on a non-object while installing Kunena 1.5.14
Hi!
getAttribute() Error occurs when reading kunena.install.upgrade.xml
<?xml version="1.0" ?>
<comupgrade version="1.0">
<install version="1.5.14" versiondate="2011-01-31" build="1907" versionname="Comunit (Italian for: Community)">
<query>CREATE TABLE IF NOT EXISTS `#__fb_announcement` (
`id` int(3) NOT NULL auto_increment,
Perhaps getAttribute() method can't read Italian character.
I replaced versionname to "Community".
getAttribute() Error occurs when reading kunena.install.upgrade.xml
<?xml version="1.0" ?>
<comupgrade version="1.0">
<install version="1.5.14" versiondate="2011-01-31" build="1907" versionname="Comunit (Italian for: Community)">
<query>CREATE TABLE IF NOT EXISTS `#__fb_announcement` (
`id` int(3) NOT NULL auto_increment,
Perhaps getAttribute() method can't read Italian character.
I replaced versionname to "Community".
Last edit: 12 years 8 months ago by o-sup.
Please Log in or Create an account to join the conversation.
Time to create page: 0.526 seconds