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
Return to the default flat view 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 previous message
wsaxon is currently offline  wsaxon   United States
Messages: 3
Registered: March 2010
Karma:
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		}
[Message index]
 
Read Message
Read Message
Previous Topic: custom avatar
Next Topic: Unable to import into FUDForum2Go appliance
Goto Forum:
  

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

Current Time: Tue May 14 15:41:25 GMT 2024

Total time taken to generate the page: 0.04821 seconds