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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 16:34 Go to next message
wsaxon is currently offline  wsaxon   United States
Messages: 3
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 14:01 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Thanks. Your patch was committed.

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

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

Current Time: Mon Dec 18 17:34:32 EST 2017

Total time taken to generate the page: 0.00472 seconds