I am not sure which version this started happening with. The feed in question is http://northernplainsathletics.com/events/rss.xml

Using CTools alpha4 and Views beta3.

CommentFileSizeAuthor
#7 location-rss_namespaces-1122638-7.patch1.8 KBrooby
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

This is not added by views.

Perhaps you could search in all files in your installation for "georss". Please file an issue against this module.

Views just uses the core methods here.

Letharion’s picture

Status: Active » Closed (won't fix)

I think this qualifies as closed then, no? :)

mattbk’s picture

Project: Views (for Drupal 7) » Location
Version: 7.x-3.0-beta3 » 7.x-3.x-dev
Component: feed displays » Location_views
Status: Closed (won't fix) » Active

Moving to Location module to see if anyone can help me. "georss" shows up in search under this module and the gmap module.

This is the problem area as identified by Opera 11:

Error: undeclared XML namespace prefix used in attribute name
Specification: http://www.w3.org/TR/xml-names11/#nsc-NSDeclared

36:  <dc:creator>matthewbk</dc:creator>
 37:  <guid isPermaLink="false">108 at http://northernplainsathletics.com</guid>
 38:  <comments>http://northernplainsathletics.com/node/108#comments</comments>
 39:  <georss:point>44.894405 -93.412953</georss:point>
 40:   </item>
 41:   <item>
 42:     <title>6th Annual Run Into Spring</title>
mattbk’s picture

I solved this problem by setting "RSS mode" for that content type ("Competitive Event" in my case) to "None," but the fact remains that with the GeoRSS-simple setting, the georss tag makes some feed readers choke (in my case, Opera 11 and Apple Mail). Google Reader didn't seem to have a problem with it.

chamyalsunil’s picture

Same problem here ....

chamyalsunil’s picture

this is the preview of rss feed

plz help me.

<?xml version="1.0" encoding="utf-8" ?>

j

http://localhost/road/drupal-7.0/j
en

Unclaimed Baggage Center http://localhost/road/drupal-7.0/content/unclaimed-baggage-center <div class="field field-name-field-image field-type-image field-label-above"><div class="field-label">Image:&nbsp;</div><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="http://localhost/road/drupal-7.0/sites/default/files/IMG1738A.preview.jpg" alt="" title="Sundernagar" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>The countrys largest final stop for lost luggage. Unclaimed at the airports, given a decent waiting period, UBC is a bargain free-for-all.’</p>
</div></div></div><div class="field field-name-field-chain field-type-list-boolean field-label-above"><div class="field-label">Chain:&nbsp;</div><div class="field-items"><div class="field-item even">No</div></div></div><div class="field field-name-field-category field-type-taxonomy-term-reference field-label-above"><div class="field-label">Category:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/road/drupal-7.0/category/attractions" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Attractions</a></div></div></div> Thu, 19 May 2011 12:08:14 +0000 admin
2 at http://localhost/road/drupal-7.0
http://localhost/road/drupal-7.0/content/unclaimed-baggage-center#comments
34.673694 -86.040594




Museum of Wonder http://localhost/road/drupal-7.0/content/museum-wonder <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Way back in the hills and dales of Alabama near a town called Seale, (population around 400 plus a coupla herds of cows) Butch Anthony has set up shop with a collection of some of the oddest stuff you have never seen. For the past 6 years or so hes been making a living as a folk artist and curator of his self-made Alabama Museum of Wonder.’</p>
</div></div></div><div class="field field-name-field-chain field-type-list-boolean field-label-above"><div class="field-label">Chain:&nbsp;</div><div class="field-items"><div class="field-item even">No</div></div></div><div class="field field-name-field-category field-type-taxonomy-term-reference field-label-above"><div class="field-label">Category:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="/road/drupal-7.0/category/attractions" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Attractions</a></div></div></div> Thu, 19 May 2011 12:05:40 +0000 admin
1 at http://localhost/road/drupal-7.0
http://localhost/road/drupal-7.0/content/museum-wonder#comments
32.322894 -85.167063




rooby’s picture

Component: Location_views » Code
Status: Active » Needs review
FileSize
1.8 KB

Yep, there is a problem with the location_node rss functionality.
It does not properly set the $node->rss_namespaces.

Can you try this patch and see if it fixes your problem?

Th_puch’s picture

Thanks! Worked for me.

rickmanelius’s picture

I can confirm that patch #7 does ADD the georss namespace... but it also deletes/removes other namespaces.

Testing now to create an updated patch to get both...

rickmanelius’s picture

So technically this patch solves the issue of adding the georss namespace. However, adding that element to $node->rss_namespaces has the following effect.

<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://mysite/rss.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" content="http://purl.org/rss/1.0/modules/content/" dc="http://purl.org/dc/terms/" foaf="http://xmlns.com/foaf/0.1/" og="http://ogp.me/ns#" rdfs="http://www.w3.org/2000/01/rdf-schema#" sioc="http://rdfs.org/sioc/ns#" sioct="http://rdfs.org/sioc/types#" skos="http://www.w3.org/2004/02/skos/core#" xsd="http://www.w3.org/2001/XMLSchema#" owl="http://www.w3.org/2002/07/owl#" rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rss="http://purl.org/rss/1.0/" site="https://mysite/ns#">

goes to

<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://mysite/events/rss.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss">

Printing out the node via dpm shows that prior to this patch, $node->rss_namespaces is empty and adding an element to $node->rss_namespaces causes the other to disappear. I think this might not be an issue with the location module at this point, so I'm willing to mark as RBTC because it seems that this change is really an issue with the node module... and merely a surprising result (at least to me).

Thoughts?

rooby’s picture

That does seem strange.
In this patch:
+ $node->rss_namespaces += location_rss_namespaces($mode);
In drupal core node_feed() function:

<?php
    // The node gets built and modules add to or modify $node->rss_elements
    // and $node->rss_namespaces.
    $build = node_view($node, 'rss');
    unset($build['#theme']);

    if (!empty($node->rss_namespaces)) {
      $namespaces = array_merge($namespaces, $node->rss_namespaces);
    }
?>

Everything gets merged in so it shouldn't overwrite.

In your example code you have a number of namespaces.
By default in drupal I believe you would only have <rss version="2.0" xml:base="http://d7.rt" xmlns:dc="http://purl.org/dc/elements/1.1/">

Maybe whatever code is inseting your other namespaces is not doing it correctly?
I still don't know how you would end up with the result you got though.

Another possibility I guess is that node_feed() is not what is generating your particular RSS feed?
And whatever is is not doing things right?

rickmanelius’s picture

I think what happens (at least based on what I'm seeing) is that if NO $node->rss_namespaces are provided, the RDFx module throws in everything... and only when you set a namespace does it revert to just what is needed.

Again, this isn't looking like a location.module issue and it might warrant a new ticket in either Drupal core or RDFa/RDFx. Technically the patch works perfectly, it's just the behavior from other modules/core that is somewhat surprising.

rickmanelius’s picture

Hi rooby,

I think this is somehow related to a default Drupal behavior instead of anything that this module and/or patch is doing (see my comment in #12).

What would you like me to do in order to test this theory? I could use a different module that adds $node->rss_namespaces and RSS namespace and see if it does the same thing. I actually had the same problem recently using Drupal Gardens in that (by default) they were throwing in all the namespaces even if they were not valid/needed. I think that happens here is that when one is set, it no longer throws in the kitchen sink :)

I'd like to get this tested and committed to the main branch, so let me know what would be sufficient to remove the concerns I brought up in #9/#10?

podarok’s picture

Status: Needs review » Active

#1931088: [META] Fixing tests tests were broken, so triggering to active

podarok’s picture

Status: Active » Needs review

bot

podarok’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

any updates here
looks like this needs tests due to #1931088: [META] Fixing tests

rooby’s picture

Sorry I haven't got back to this one for ages.

In theory the patch in #7 should be good.

As rickmanelius mentions, the extra issues are probably a drupal core quirk.
Testing another module that provides rss namespaces to see if the same quirk happens would be a good idea.

Also, location module tests as per #16 would be great to make sure we get what is expected.

podarok’s picture

Status: Needs work » Fixed

#7 commited pushed to 7.x-3.x
thanks!!!

podarok’s picture

http://drupal.org/node/1942736 tagged in alpha release

Automatically closed -- issue fixed for 2 weeks with no activity.