The Location module along with the googlemap module has been working nicely for me until suddenly it stopped working.

RSS feeds which contain geographical data has a whitespace before the first which breaks the feed...

 <geo:Point><geo:lat>
  55.585000</geo:lat>

  <geo:long>13.019000</geo:long>
</geo:Point>

I tried alot of newbieish measures, emptied the cache, turned off modules, removed my url aliases etc etc for a few hours - and suddenly it worked again for half an hour or so... and now, again suddenly it doesn't, and I can't seem to figure out what is messing it up, I backtracked, did the same as before but.. 0..

Help would be greatly appreciated.

Staffan
http://merlib.org

Comments

cybe’s picture

Maybe this is the problem? : http://drupal.org/node/20795

bluecobalt’s picture

Help!

I am having the same problem. Worked fine this morning, now it I am getting the same error. 4.6.3

Any ideas, anyone?

thanks,
blue

geodaniel’s picture

Have you tried removing the line break after ?

You could just remove all \n's from the code that generates those tags and it should help...

bluecobalt’s picture

Removing the line breaks and extra spaces didn't do anything.

I found out that this error is a result of upgrading to the new Firefox 1.5. I am on Mac OS X. I do not get this error in Safari.

Kevin Severud’s picture

My solution for now is to comment out the if statement of the case 'rss item': statement.

cybe’s picture

Again my google map stopped working, without any apparent reason, the same error on the RSS feed with the geo tags, the solution provided by Kevin doesn't seem to help in my case...

walkah’s picture

you can include the namespace in HEAD / 4.7 by adding a 'namespace' element to your array returned for 'rss item' nodeapi hook.

this will cause the namespace to be merged in for node_feed generated feeds.

ankur’s picture

A fix has been committed to HEAD. However, the same patch does not apply to DRUPAL-4-6, so I'll leave this open until I can apply a 4.6 patch or until it is confirmed that the problem cannot be fixed for 4.6.

-Ankur

Anonymous’s picture

I had this same problem within firefox 1.5 and it is discussed on mozilla.org:

http://www.mozilla.org/projects/svg/faq.html#xml-parsing-error

I was recieving this error inside the \podcast.module,v 1.0 2005/08/02 10:49 by Wouter Caeldries. After reading about it on mozilla and then on apple.com I edited the code

from:

  $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  $output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]>\n";
  $output .= "<rss version=\"". $channel["version"] . "\" xml:base=\"". $base_url ."\">\n";
  $output .= format_podcastrss_channel($channel['title'], $channel['link'], $channel['description'], $channel['developer'], $channel['pubDate'], $channel['lastBuildDate'], $channel['image'], $channel['itunes_author'], $items, $channel['language']);
  $output .= "</rss>\n";

to:

  $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  $output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]>\n";
  $output .= "<rss version=\"". $channel["version"] . "\" xml:base=\"". $base_url ."\" xmlns:itunes=\"http://www.itunes.com/dtds/podcast-1.0.dtd\">\n";
  $output .= format_podcastrss_channel($channel['title'], $channel['link'], $channel['description'], $channel['developer'], $channel['pubDate'], $channel['lastBuildDate'], $channel['image'], $channel['itunes_author'], $items, $channel['language']);
  $output .= "</rss>\n";

Now the feed will display properly in firefox 1.5. Hope this is of any help.

thinkinkless’s picture

bump

Any word on this fix?
We're having the same issue.
Not good that promoted location enabled nodes break the feed for the whole site...

I have no idea how to patch this but am willing to test!

nk126’s picture

I just installed the module to add google maps to my site (drupal 4.6) and am having the same issue.

Works fine in Safari. Doesn't work on Firefox 1.5 on Mac or IE on Windows.

Any advice/fixes would be greatly appreciated ... I'm a Drupal/PHP newbie, at best! :-)

cheers,
nk

discursives’s picture

Bump, same issue here:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

Reference to undeclared namespace prefix: 'geo'. Error processing resource 'http://mydomain.com/node/feed'. Line 145, Position...

38.906778-77.041480
---...

kmartino’s picture

The solution to this is unacceptable since it involves changing the RSS header and adding the appropriate name spaces, which requires changing node.module line 1171 to:

$output .= "<rss version=\"". $channel["version"] . "\" xml:base=\"". $base_url ."\"   xmlns:geo=\"http://www.w3.org/2003/01/geo/wgs84_pos#\" 
xmlns:icbm=\"http://postneo.com/icbm/\" 
xmlns:geourl=\"http://geourl.org/rss/module/\">\n";

This will work, and you need this if you are using Feedburner (which will report an invalid feed otherwise), and I'm doing this right now, but there has to be a better way.

geodaniel’s picture

If you're able to upgrade to 4.7, I believe it's working there without having to alter code anywhere.

geodaniel’s picture

Status: Active » Closed (won't fix)

If anybody needs working GeoRSS in their feeds, you could use the GeoRSS module which adds a couple of different 'official' types of GeoRSS to outgoing feeds based on the data provided by the location module API.

I'm going to set this as a won't fix for 4.6.