EDIT: So originally I posted the below, but I've found other issues and I have some more information. I noticed today that sometimes the links are wrong as well but correct when I view the feed. I looked at the XML being sent by the feed we're bringing in and for one thing, the extra timestamp is being sent in a tag called <updated>. I'm not sure why it's being appended to the body text though. Similarly, other tags are being interpreted/appended in such a way as to mess up some other things.

So my new question is: is there any way to have more control over how feed aggregator is arranging this incoming stuff? I want to get rid of that stuff from <updated> and a couple of other tags and tell it to link the header with the appropriate link (right now it doesn't always do that).

Previous Post text:

In Drupal 7 I've got a view to show some news items that another developer set up through aggregator. The fields are Link, Title, Timestamp, and Body (although Link is hidden; long story that doesn't seem to affect this). Everything looks good except there's an extra timestamp at the end of the body text. Here's an example:

Orange County (CA) Register SEILER: Legislature could ignite rush to smuggle cigarettes

Wednesday, August 19, 2015 - 11:19

But higher taxes here would push us in the direction of New York City, meaning more smuggling, more crime and less policing... California already has the nation’s second-lowest rate of tobacco use, after Utah. It should leave higher taxes and other nann 2015-08-19T15:19:16+0000

The '2015-08-19T15:19:16+0000' is what I want to get rid of. I have looked all around but I'm not able to figure out what's causing this. I thought maybe it had something to do with the feed we're using but I looked at the link (http://www.tobacco.org/tagged/new-york.atom) and it doesn't seem to include this.

I'm fairly new to Drupal but I did try to figure this out on my own and I'm at a loss. After extensive Googling I can't even find another example of this happening so I know I'm missing something. Any help is greatly appreciated; thanks.


OK, so I'm considering deleting this but it was such a source of frustration for me I guess I'll leave it up in case someone else ever comes across this. This answer, to me, seems like more a workaround (mainly because I am still lacking a basic understanding of why it's happening) so if anyone else has a better answer or more information please do post your own answer.

It seems like you can't have complete control over how Views or Aggregator arranges elements from the XML feed. It also seems (from my fruitless Googling) that this isn't usually a problem. I don't really know if this is an issue with how the RSS feed we have to use is configured or if it's a Drupal thing but I know the answer is in gaining control over where and when the different XML elements appear.

Most people seem to use a module called Feeds to gain control over this type of thing (and do other stuff). From superficially looking into it, it seems like it could fix my problem but it creates a separate node for each incoming item, which is not ideal for my special case. The feed on the site I'm working on just keeps up with the latest 20 items and then discards them so I didn't want to have to deal with a separate node for each thing.

I've decided to try a different module called Views RSS which sounds like it can simply solve my problem (here's some more info). I haven't tried it yet but it looks promising. Thanks to anyone who read this and to anyone who might be able to contribute in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.