FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » XML Aggregation fails if articles have no 'link' element
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
XML Aggregation fails if articles have no 'link' element [message #162148] Thu, 25 March 2010 20:34 Go to next message
wsaxon is currently offline  wsaxon   United States
Messages: 3
Registered: March 2010
Karma: 0
Junior Member
I tested the XML Aggregation feature against RSS feeds from the FinalBuilder build management tool. The xmlagg.php was failing with the following error:

Fatal error: Call to a member function getAttribute() on a non-object in C:\Inetpub\forum.mmrd.com\scripts\xmlagg.php on line 166


I noted that this line of the code was trying to pull out a link to fill in the {link} label in a feed post signature. In my case, there was no link.

I changed the relevant area of xmlagg.php from:

162		// Apply custom signature, may contain {link} tag.
163		if ( isset($node->getElementsByTagName('link')->item(0)->nodeValue)) {
164		    $link = $node->getElementsByTagName('link')->item(0)->nodeValue;
165		} else {
166		    $link = $node->getElementsByTagName('link')->item(0)->getAttribute('href');
167		}


to:

162		// Apply custom signature, may contain {link} tag.
163		if ( isset($node->getElementsByTagName('link')->item(0)->nodeValue)) {
164		    $link = $node->getElementsByTagName('link')->item(0)->nodeValue;
165		} else if ($node->getElementsByTagName('link')->length > 0) {
166		    $link = $node->getElementsByTagName('link')->item(0)->getAttribute('href');
167		}
Re: XML Aggregation fails if articles have no 'link' element [message #162149 is a reply to message #162148] Fri, 26 March 2010 18:01 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Thanks. Your patch was committed.

For details, see https://sourceforge.net/apps/trac/fudforum/changeset/4935
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: custom avatar
Next Topic: Unable to import into FUDForum2Go appliance
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 14:58:31 GMT 2024

Total time taken to generate the page: 0.02459 seconds