Hi

I am looking around for a way to add comments to aggregator feed-items.
seems that is not possible today.

the first who send me an working copy of the aggregator module, where comments are enabled and the amount of comments is displayed in all overviews, recieves US$ 100.

(if you take the challenge, please reply here or send me a mail. the work should not be done twice)

regards sandro

Comments

gordon’s picture

Take a look at the Node Aggregator module which makes the feeds first class nodes. Then you can add comments to feed items.

I do not think it is completely up to date, but I think that it is a start.
--
Gordon Heydon
Heydon Consulting

--
Gordon Heydon

Dublin Drupaller’s picture

Another possible option

Isn't there a module/patch on here somewhere for "blog it"....?

Which I assume could be adapted to "forum it"...type thing..

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

feuman’s picture

can not find that, do you have a link to this module/patch?

Dublin Drupaller’s picture

Not sure exactly where I saw it...if you have serached on here and not turned up anything it must have been somewhere else.

Sorry..best to disregard. Probably on another site I saw it.

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

conann’s picture

I was thinking about this yesterday when I was trying to beautify my aggregator pages, blog it is probably the best way to go, but there are a bunch of features that would be great.

Delete: I must have 6000 entries by now but I don't want to delete them all
Promote: Front page it
Comment: Comments whether its on the front page or not.

As I use drupal more and more the agg is becomming one of my fav pieces

feuman’s picture

This module (node aggregator) seems not to be working with actual releases. i tried with 4.52 and 4.6RC...

i still offer 100$ for a working solution.

regards sandro

ahwayakchih’s picture

I've sent You email through contact form from Your profile.
If Node Aggregator way (ie. aggregate RSS items as nodes) is ok for You i can make it.

feuman’s picture

Ok, You've got it.

regards sandro

roadies’s picture

Hi ahwayakchih,

Is the upgrade (v4.6) for this module available? I'd be willing to pay for it too.

Contact me for more info.

Anonymous’s picture

Would it be possible to add information about the RSS feed articles were collected from, such as the name as a link?

ahwayakchih’s picture

Do You want to have link to source site inside each item (or with other links, like "comment" and "full article")?
On my testing site i use combination of taxonomy and sticky (for feeds) flag, to make it looks similar to original aggregator content: http://neoni.net/drupal - i have two vocabularies ("type" with "feed" and "news" terms, and "topic" with different terms), feeds are not promoted, and are sticky. Items are promoted and not sticky. Feeds get term "feed" and items "news". Both get the same topic (for example, both feed and it's items get "operating systems" term). So when user click on topic's term, it goes to usual taxonomy page, but with feed being first with different background :). That way user can know from where news were aggregated.

boris mann’s picture

ahwayakchih -- it would be great if you could create a CVS account and work on this module directly at Drupal.org.

ahwayakchih’s picture

And didn't get any answer yet :(

Dane Morgan’s picture

To set the permissions so that users can contribute, but _not_ administer (ie rename, move, delete (especially delete)) feeds and or feed items?

Dane Morgan
thefreemarketer@gmail.com
http://thefreemarketer.com

ahwayakchih’s picture

User who creates feed is also "owner" of aggregated items, so he/she can also edit them.

At cron run aggregator2 module uses "fake login" as user who created feed. That way it can call save/delete functions of node module. Without it i would have to copy parts of code from node module, which is not what i'd like to do (because it duplicates code, makes code less readable, and harder to maintain).

Maybe i should add option to allow setting up one user account to be used at cron run? Then You would just setup "aggregator" user for cron functionality, and other users could create feeds but not edit them (i would have to add more types of permissions in that case).

Dane Morgan’s picture

What about using a default username and password in the db that coiuld run the cron if none were specified and a seperate form that only contained add fuctions and not admin funtions and did not pass the username and password?

I'm not really a coder, so, I don't know if that would be easier or make sense, but I'd really like to be able to give users, even unregistered users, access to adding feeds without allowing them to edit them. The concern originates from a site I am developing for a niche where some people can get very competative and let that cloud their judgement...

Dane Morgan
thefreemarketer@gmail.com
http://thefreemarketer.com

robert castelo’s picture

Also check out the News Page module:

http://drupal.org/node/13047

Which filters feeds by keywords, and allows both commenting and blogging.

------------------------------------------
Drupal Specialists: Consulting, Development & Training

Robert Castelo, CTO
Code Positive
London, United Kingdom
----

freyquency’s picture

"blog it" is a standard drupal feature... you have to give the users blog posting permissions and edit permissions and it will show up on the aggregated blocks on the sidebar...

neofactor’s picture

Have you considered the Reverse Bounty for this solution.
http://drupal.org/node/20301

If someone builds a module... please contribute it to the community, regardless if someone paid for it to be built or not

David McIntosh
neofactor.com

moshe weitzman’s picture

this is a 'bounty', not a reverse bounty. a reverse bounty is initiated by the developer, not the buyer.

boris mann’s picture

Looks like this has been taken care of but I wanted to clarify why this isn't simple.

All nodes can have comments, but aggregator feed items are not nodes. The node aggregator module allows you to (essentially) import aggregator items as nodes, and then you can comment on them.

HTH

ahwayakchih’s picture

Module was done some time ago, and feuman agreed to release it as opensource.
Earlier version already works on one site and AFAIK works fine. I've made some changes this weekend, but it shouldn't take long before it will be tested enough and released :)

Anonymous’s picture

I would like clarification...did you update node_aggregator for feuman?

ahwayakchih’s picture

Well.. it can be seen as update but i've changed a lot of things, so it can also be seen as new thing based on old thing :)
I've changed it so each news item is saved as drupal's node (of type "aggregator2-item") and each feed is also separate node (of type "aggregator2-feed"). This allows for much more possibilities, and IMHO integrates into drupal nicer way.

--- edit ---
I've read description of original node.aggregator module and it sounded like it also creates node for each news item, but IIRC when i looked into code i (maybe wrongly) understood that it creates node only for a feed, and that feed keeps news internally...
Anyway: even if original module already created new node for each news item, new module works for 4.6 :)

Anonymous’s picture

okay...how do we get this publically available? I'd gladly reimburse feuman so he's not out any money if we could move this to open source.

mariusagricola’s picture

This should be available, since the functionality is so intuitive. I had some idea that, should I be able to find the time, I would update node_aggregator to 4.6 compliance, but alas, I don't really have the time to do it. That said, I have no qualms about contributing to get this to open source.

Chris Johnson’s picture

This is something I need for a site, as well.

I could update the node_aggregater in contrib myself, but why reinvent the wheel?

ahwayakchih’s picture

I asked for CVS account (it seems i can't publish project without CVS access:( so i can publish Aggregator 2 module. As soon as i get answer from Drupal administration, i'll publish module (if i'll not get access i'll publish module somewhere else, but i wanted to do it "clean" way from the start).

ahwayakchih’s picture

Ok, since it takes time to get CVS account (and release new project) and many people are waiting to try aggregator2 module, i've uploaded files to my server. Please test it and let me know if all works for You too. Be sure to backup Your site first! Or even better: first use it on some test-only site.

Here's description i've prepared for project's page on Drupal site:

Offers functionality similar to the one offered by Aggregator module included by default in Drupal installations, only feeds and aggregated items are stored as Drupal nodes instead of different format - so it gives much more possibilities :).

SPONSORED BY feuman (http://drupal.org/user/18875).

Related links:

Module still lacks proper help page (and probably above description could be better too :), and explanations how to install and use it. I'm not native english speaker, and my english is far from good, so it would be great if someone could test it and write explanations/docs for it.

For those who want to try it:
- Install .mysql file like any other such files from other modules.
- There are no special settings needed to use module.
- Create new "aggregator2 feed".

Aggregated news items (drupal nodes) will be authored by the same person who created feed (unfortunetly Drupal doesn't allow "aliasing" of user names, which could be used to show original author's name :(.. News will use most of the settings You'll set for feed, so if You use some modules adding things to nodes, news item will get the same settings as feed. Things wchich will differ:
- creation date (will be set to the date "sniffed" from aggregated data)
- publish,sticky,etc... (defaults for aggregator2-item will be used)
- body
- link
News item will additionaly have original author's name stored ($node->aggregator2_author), but to show it when node is viewed You'll have to modify theme/template.
There are also two settings for taxonomy when You edit feed - one for feed itself and one for aggregated news items.

Hmm... i guess that should be enough for now. If You have questions just contact me.
Now grab the file, have fun and send big THX (with nice gifts? :) to feuman (http://drupal.org/user/18875) for sponsoring this module.

http://ahwayakchih.neoni.net/files/aggregator2-RC1.zip

PS: remember it's still RC1, and still has some minor changes (mostly cleanups, and internal changes) to do.

crea5e’s picture

I'm testing it out on a website and it works for the most part, except I can't chose which term (taxonomy) I want the feed to appear in. There is no selection to chose terms which may be because of the warning it gives me when I create a new aggregator2 feed.

warning: implode(): Bad arguments. in /public_html/zine/modules/aggregator2.module on line 251.

the line in question:

$output .= form_group(t('Feed item settings'), implode('', $temp)).'<br />';

my drupal install is 4.6.1

Oh you will need to have clean url's on or else When you click on full article link for the news item, it will add the url to the website base ie.
www.yoursite.com/?http://www.espn.com/espn.rss .

I'd also be happy to document this module for you.

ahwayakchih’s picture

It seems You have no terms available for items and that's why there was an error (but it was bug of course too :).

Add following line just before the one You mentioned;

if (is_array($temp) && count($temp) > 0)

As for links, i'll check that, but for now it looks like it's a bug in Drupal? I use:

$links[] = l(t('full article'), $node->link);

in module, so it's l() function which makes something wrong (most probably).

It would be great if You could document aggregator2 :)

crea5e’s picture

Oh I get it , you have to make the vocabulary work on the aggregator 2 feed (Admin->categories ->edit vocabulary ->select type aggregator 2. I don't know why I forgot to do that.

I will document it asap.

ahwayakchih’s picture

Yes, You have to make vocabulary work for aggregator2 feeds (to apply some terms from it to feed itself) and/or aggregator2 items (to be able to select which terms should be applied to aggregated news items).

THX for documenting it :)

crea5e’s picture

What else should I add to it?

Aggregator2 is a more powerful rss syndicator/news reader module than the aggregator module included in the default Drupal installation.
Aggregator2 News Feeds and Aggregator2 News Items are stored as nodes which allows users to comment on syndicated content and allows archiving of news items.

Installation:

1. Download the file: http://ahwayakchih.neoni.net/files/aggregator2-RC1.zip
2. Place aggregator2.module in the 'modules' directory of your drupal installation
3. Load the database definition using the tool of your choice. For mysql with
command line access use:
mysql -u user -p drupal < aggregator2.mysql
Replace user with the MySQL username, and drupal with the table being used.

4. Enable the aggregator2 module under administer > configuration > modules.

Usage:

1. Set Permissions:
(Administer->Access Control) Setup your permissions for aggregator2 access news, news feed, news items.

Access news- User can view news.
News Feed- User can contribute/administer Aggregator2 News feed.
News Items- User can contribute/adminster News Items.

2. Categories Associated with Aggregator2 :
Make sure a vocabulary (Administer->Categories) is associated with aggregator2. You can either create a seperate vocabulary for aggregator2 news feeds and news items, or use an existing vocabulary.

Use an existing vocabulary: Click on edit vocabulary, and make sure under "types" that aggregator2 news feed and aggregator news item are checked.

Create a new vocabulary: Click on add vocabulary, and make sure under "types" that aggregator2 news feed and aggregator news item are checked.

3. Create Content- Aggregator2 news feed.

Title -> Title of the News Feed
Topics -> Select categories that you want the feed itself to be categorized in.
URL -> url of Rss feed
Update interval-> Amount of time before news feed is updated
Discard Feed Items older than-> Whether or not you want the feed items to be discarded after a certain time interval
Feed Item Settings -> Topics-> Category or Categories you want the feed items to be associated with.

4. To edit or delete individual feed items, Go to Adminster->Content.

5. For the feed to update automatically you must run "cron.php" on a regular basis.

Go to Administer->help . Click on the System url under help topics and follow the instructions under the cron heading.

ahwayakchih’s picture

I've modified "usage:" part a bit and now it's included in module as help page.
Installation part will be included in README, and on project page (but it looks like i was not accepted by Drupal admins, so there will be no project page in close future :(.

Anonymous’s picture

Any chance this could be set up and/or made to work without the use of Clean URLs?

ahwayakchih’s picture

Is there any way to putput links in "clean" way (ie. by using Drupal's functionality, instead of generating html tags - so it's more compatible with everything else in Drupal)?

sofiya’s picture

Yes there is a Drupal function for that -- l(..). In fact you should use that function for all your links so that they (your links) will not be broken when the site is using 'clean url' or not, or move the documentroot from one folder to another. From Drupal API reference:

Definition
l($text, $path, $attributes = array(), $query = NULL, $fragment = NULL, $absolute = FALSE)
includes/common.inc, line 1595

"If you build it, they will come." -- Field of Dreams

ahwayakchih’s picture

Few posts above i posted the line of code i use in modue - i already use l() function :(.

smazsyr’s picture

I'm crazy about this module. It rocks. But I am getting whacky, and to me random sort orders of the resulting nodes. Any thoughts on how to make them sort by the time the nodes were created, as opposed to the time from the "sniffed" from the aggregated data?

ahwayakchih’s picture

I got mail about that, from one of user, and just finished applying change: now administrator can decide if module should use "sniffed" date or current one. Setting is done for each feed separately, so it's more fine-grained :).

pamphile’s picture

I'm also interested in funding this if a bounty is set.

http://01debug.com

ahwayakchih’s picture

I already received money from feuman so bounty is kinda finished :)
But if You (or anyone else) would also like to give something as a way to say "THX" contact feuman and/or me :)

philoxenia’s picture

This would be great. I'm really looking forward to it. Thanks for your work.

Has anybody seen http://lilina.sourceforge.net/ or http://gregarius.net/ ? They've got some great features for feeds. It would be excellent to see something like that as a Drupal plugin.

ahwayakchih’s picture

I don't know much about "feeds world" so i may be a bit ignorant about additional feautures. Can You describe what would You like to be added to Aggregator2 module? :)

ahwayakchih’s picture

Changes:
- some internal cleanups,
- now administrator can set the source of date for items ("feed" or "current"),
- now administrator can decide where to show links to "full article" ("always", "never", "only with teaser", "only with full page"),
- new help page (THX to crea5e - http://drupal.org/user/24791 , can You check new help page and fix errors? :)

In zip file there is also aggregator2-RC1toRC2.mysql file for those of You who tried RC1, and already have database table created (there were two fields added in RC2), so You don't have to use aggregator2.file.
Those who DIDN'T try RC1 please use only aggregator2.mysql file.

Try it and let me know about results:
http://ahwayakchih.neoni.net/files/aggregator2-RC2.zip

Brian@brianpuccio.net’s picture

This works great, hopefully you get a CVS account soon so you can add the changes back to node_aggregator. I'm probably going to make just once change and that is more theme then anything else. In the event I decide to promote an aggregator node to the front page, I want to make it more clear that I didn't write it (it currently adds the admin user as the author, this is clearly not accurate, maybe create a aggregator user that gets credit for all aggregator nodes).

Thanks for your contribution!

ahwayakchih’s picture

maybe create a aggregator user that gets credit for all aggregator nodes

But that's already possible, just add some user (for example "contributor") with rights to administer feeds and items, and make feeds belong to that user. All items will be set to have that user as creator :).

BTW Original author's name is stored in $node, so if You use PHPTemplate engine it should be easy to modify theme to show original author instead of "fake" one.

Brian@brianpuccio.net’s picture

I just noticed a small problem. Right now I have the permissions set so that anonymous users as well as authenticated users can access news, but not administer news feed items or administer news feeds. A user just said they can see the RSS news item node on the front page, can click the read full article link, however, clicking on the node title, which should bring them to the node on ym site gives them the you don't have permission to access this page error. I think I may have fixed it without allowing users to do more then they should, can you please look at this diff:

brian@alpha:~ $ diff -u aggregator2.module aggregator2.module.modified
--- aggregator2.module  2005-06-12 16:32:02.000000000 -0400
+++ aggregator2.module.modified 2005-06-12 19:00:35.949338176 -0400
@@ -134,7 +134,7 @@

   if ($op == 'view') {
     if ($node->type == 'aggregator2-feed')
-      return user_access(AGGREGATOR2_PERM_ADMIN_FEED);
+      return user_access(AGGREGATOR2_PERM_ACCESS_ITEM);
     else if ($node->type == 'aggregator2-item')
       return user_access(AGGREGATOR2_PERM_ACCESS_ITEM);
   }
@@ -816,4 +816,4 @@
   print $output;
 }

-?>
\ No newline at end of file
+?>
brian@alpha:~ $
ahwayakchih’s picture

Now, should i add one more permission ("access feeds") or just use item's permission, like in Your patch?

ahwayakchih’s picture

Added additional permission for accessing feeds. Also permissions names were changed (so they are more readable?) so please go to admin->access control and set aggregator2 permissions again.

http://ahwayakchih.neoni.net/files/aggregator2-RC2.1.zip

Anonymous’s picture

Dude...you rock

jsbthree’s picture

I'm not sure if this is a bug nor am i sure this is where one would submitt a bug. Normally ..not but I don't see a cvs account for this module yet. Anyway this is what I am getting in the path auto settings. I've tried everything but deleteing the category which i'll do next. I guess my question is this. What is key one in this instance and why is is duplicated? Or what is the dublication. Here is the screen readout and the log readout is below that.

user error: Duplicate entry 'Aggregator_Feeds_Items_Music_pathauto_cat_patter' for key 1
query: INSERT INTO variable (name, value) VALUES ('Aggregator_Feeds_Items_Music_pathauto_cat_pattern', 's:50:\"feed-items/[uid]/[week]/[day]/[hour]/[sec]/[title]\";') in /home/jojob/public_html/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /home/jojob/public_html/includes/common.inc:384) in /home/jojob/public_h

log readout

Duplicate entry 'Aggregator_Feeds_Items_Music_pathauto_cat_patter' for key 1 query: INSERT INTO variable (name, value) VALUES ('Aggregator_Feeds_Items_Music_pathauto_cat_pattern', 's:50:\"feed-items/[uid]/[week]/[day]/[hour]/[sec]/[title]\";') in /home/jojob/public_html/includes/database.mysql.inc on line 66.
Severity error

The above categorization of the auto path is but one of many versions. The path is not what is being duplicated. I"m wondering if the session isn't what its picking up.

ahwayakchih’s picture

I'm not sure if this is a bug nor am i sure this is where one would submitt a bug. Normally ..not but I don't see a cvs account for this module yet.

Yeah, i didn't get CVS account here so far. I'll probably create project on one of opensource sites, but i don't have much time currently so it has to wait.

The path is not what is being duplicated. I"m wondering if the session isn't what its picking up.

When do You get those errors? Can You give relative path to the page (like "admin/settings/blahblah")? Does it show after some automatic task (like cron run), or when You change something manually?

jsbthree’s picture

I was actually in the path auto module settings area when those errors showed. I was trying to fix an error that is showing up at the end of every cron run and I assume is what's stopping the cron jobs from actually updating the feeds. What's happening is that is says the path is already in use and then dies. Below is a sample of the screen output. So what I was doing when I got the errors you see is trying to create auto paths that would be unque for each item. I think that would work too but something esle is causing the initial errors I reported.

So to be clear there are two errors that are really part of the same problem I assume.
1. is the duplicated autopaths shown below
2. is the duplicated key I initially reported.

ALSO -- I should note that the first time it ran it worked beatufully. Its just that all subsequent crons are not elevating your aggregator2 module feeds to nodes as I suspect the reason being below. This brings me to a question however. The initial run I did was from a feed off of another dupal site with a alot of flexinode content that I'm offering. In one series of node types there is an image field that usually is offered up in the /node/feed -- the field is part of the teaser. Your aggregator 2 module picked up every flexinode field that is part of the teaser in the first run but there were no images being offered in that run so right now I've no way of knowing if they would come through as well. It seems to me that they will for I can see no reason why not. What do you think?? I can't btw kill the path auto right now to check any of this.

(what i was trying to do in the inial bug report was to have path auto create paths that spit out the /[month]/[day]/[hour]/[minute]/[second]/[item-title]. This would work to create unique paths I assume.)

# Failed to parse RSS feed NashvilleEzine: mismatched tag at line 37.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from NashvillesNews Feed feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.
# Errors in entry from Delicious video test feed: The path is already in use.
# The path is already in use.

jsbthree’s picture

I went in an dropped all the tables that had to do with aggregator2. I then tried again with the pathautos set as above. I don't know if it actually wored but this is the readout I got. Thought you would be intereested.

* pathauto: Alias item/cashes_tennessee_home_goes_up_for_sale/2005/06/wed/04/11/59 created for path node/123
* pathauto: Alias item/cashes_tennessee_home_goes_up_for_sale/2005/06/wed/04/11/59/feed created for path node/123/feed
* pathauto: Alias item/battle_over_confederate_symbols_in_tenn/2005/06/wed/04/11/59 created for path node/124
* pathauto: Alias item/battle_over_confederate_symbols_in_tenn/2005/06/wed/04/11/59/feed created for path node/124/feed
* pathauto: Alias item/california_town_disturbed_by_terrorist_arrests/2005/06/wed/04/11/59 created for path node/125
* pathauto: Alias item/california_town_disturbed_by_terrorist_arrests/2005/06/wed/04/11/59/feed created for path node/125/feed
* pathauto: Alias item/outbreak_in_the_u_k_linked_to_north_american_bug/2005/06/wed/04/11/59 created for path node/126
* pathauto: Alias item/outbreak_in_the_u_k_linked_to_north_american_bug/2005/06/wed/04/11/59/feed created for path node/126/feed
* pathauto: Alias item/american_idol_winner_a_nashville_idol/2005/06/wed/04/11/59 created for path node/127
* pathauto: Alias item/american_idol_winner_a_nashville_idol/2005/06/wed/04/11/59/feed created for path node/127/feed
* pathauto: Alias item/jeopardy_nashville_proves_to_be_the_right_place/2005/06/wed/04/11/59 created for path node/128
* pathauto: Alias item/jeopardy_nashville_proves_to_be_the_right_place/2005/06/wed/04/11/59/feed created for path node/128/feed
* pathauto: Alias item/brewers_summoned_julio_mosquera_from_class_aaa_nashville_to_provide_protection_for_chad_moeller/2005/06/wed/04/11/59 created for path node/129
* pathauto: Alias item/brewers_summoned_julio_mosquera_from_class_aaa_nashville_to_provide_protection_for_chad_moeller/2005/06/wed/04/11/59/feed created for path node/129/feed
* pathauto: Alias item/fifth_generation_of_country_music/2005/06/wed/04/11/59 created for path node/130
* pathauto: Alias item/fifth_generation_of_country_music/2005/06/wed/04/11/59/feed created for path node/130/feed
* pathauto: Alias item/facts_dont_show_rape_in_case_involving_nashville_pred/2005/06/wed/04/11/59 created for path node/131
* pathauto: Alias item/facts_dont_show_rape_in_case_involving_nashville_pred/2005/06/wed/04/11/59/feed created for path node/131/feed
* pathauto: Alias item/brooks_dunn_will_host_the_country_music_associations_awards_show_again/2005/06/wed/04/11/59 created for path node/132
* pathauto: Alias item/brooks_dunn_will_host_the_country_music_associations_awards_show_again/2005/06/wed/04/11/59/feed created for path node/132/feed
* pathauto: Alias item/confederate_in_south_rises_again/2005/06/wed/04/11/59 created for path node/133
* pathauto: Alias item/confederate_in_south_rises_again/2005/06/wed/04/11/59/feed created for path node/133/feed
* pathauto: Alias item/hillbilly_music/2005/06/wed/04/11/59 created for path node/134
* pathauto: Alias item/hillbilly_music/2005/06/wed/04/11/59/feed created for path node/134/feed
* pathauto: Alias item/titans_likely_finish_above_500/2005/06/wed/04/11/59 created for path node/135
* pathauto: Alias item/titans_likely_finish_above_500/2005/06/wed/04/11/59/feed created for path node/135/feed
* pathauto: Alias item/gene_watson_will_release_his_37th_album/2005/06/wed/04/11/59 created for path node/136
* pathauto: Alias item/gene_watson_will_release_his_37th_album/2005/06/wed/04/11/59/feed created for path node/136/feed
* pathauto: Alias item/test3/2005/06/wed/04/12/00 created for path node/137
* pathauto: Alias item/test3/2005/06/wed/04/12/00/feed created for path node/137/feed
* pathauto: Alias feed/aggregator2-feed/aggregator_2_feeds/nashvillesnew_feed_refeed/2005/06/wed/04/10/00 created for path node/122
* pathauto: Alias feed/aggregator2-feed/aggregator_2_feeds/nashvillesnew_feed_refeed/2005/06/wed/04/10/00/feed created for path node/122/feed
* Syndicated content from NashvillesNew-feed-refeed.
* pathauto: Alias feed/aggregator2-feed/aggregator_2_feeds/nashvillesnew_feed_refeed/2005/06/wed/04/10/48 created for path node/122
* pathauto: Alias feed/aggregator2-feed/aggregator_2_feeds/nashvillesnew_feed_refeed/2005/06/wed/04/10/48/feed created for path node/122/feed
* Your aggregator2 news feed was created.

jsbthree’s picture

I'm using that term to describe what I thought would happen but didn't unfortuneatly. These two sites are basically mirror images of each other. In fact I copied one site over to another domain. All the content from the node teasers that showed up in site A. is mapped perfectly to site B. in your modules feed. That is everything but the images. So why is that?? If it will map the titels and everything else perfectly why not the images.?? And from that I'm guessing that any media such as MP3 woudn't show up either. Personally I'd be glad to offer you a bounty to match the orriginal to make these things work.

Something else that is strange.

As I said the two sites are mirror images in essence. Flexinode types that were created before the copy over would be exactly the same and the fields would map one for one. That is what happens as they show perfectly . However I create a flexinode type after the copy over. It shows up in the /node/feed rss feed but the entire type seems to be missing from aggreegator2 . In other words aggregator2 seems to only pick up content types that it has a local reference for or something like that....

ahwayakchih’s picture

Did You try to use aggregator2 feed to get content from another site, through feeds?
If so then only title, author, body, and dates will be aggregated.

Or do You mean that feed has some images/files attached to it, and items do not?

Flexinode part is confusing. It's different module, for creating different types of nodes. So if You mean that on site A there is flexinode based content, exported by feeds, and aggregated by aggregator2 on site B, then there's no error. Feeds export only text data (or more exactly: title, author, description, date in text format, link, and maybe some additional fields), and that data must be understood by aggregator to be useful.
If You want to be able to "clone" nodes from site A to site B, than there's something more needed than standard RSS feed. I can try to implement such feauture, but don't expect it will work with other sites around the world - they would have to also implement exporting additional data.

Or maybe You mean that there is image html tag inside description on site A and it doesn't work on site B?

jsbthree’s picture

The fact that these two sites are mirror images of each other was superflous. No all I'm trying to do is feed RSS off of a site. What is happening is that the module is working for every node type save one. There are three Flexinode tpes being fed and only two seem to be working even though they are almost identical. The only difference in the on that isn't working is that it was created before I copied the sites. The three nodes are in the feed which is clear when I go to /node/feed but only two are being picked up by the other website and being refed if you will. I hope that's clear. I suspect its something to do with the path again.

The image thing is completely different in that no images are being refed by the other site. As far as I can tell the aggregator2 is either not feeding images or feeding an incorrect url. But it is only for images.

ahwayakchih’s picture

The only difference in the on that isn't working is that it was created before I copied the sites.

That shouldn't have any impact. There must be something else. Maybe data inside RSS feed is different for that one type?
Aggregator2 doesn't "recognize" types of nodes from other site. It just gets some text, title, author, date, etc.. "standard" things. So it can be that feed is somehow different than for two other types, or maybe Aggregator2 News Feed which "downloads" data from feed exporting that "special" type has some other problem (like with path aliases. BTW did You try that "fix" i posted?).

As far as I can tell the aggregator2 is either not feeding images or feeding an incorrect url. But it is only for images.

Are those images some kind of node types (from some gallery module, or something similar)?
Can You post some urls as example (or better send me mail through contact form here, so we don't spam forums here :).

ahwayakchih’s picture

Those errors look like there was duplicating of alias. Does Your feed have path alias set?
Try to change line 729 of aggregator2.module file to:

unset($edit['path']);

It should clear path of feed, so it's not duplicated in item. If i guessed right, that should remove errors.

Of course try change above on database before removed aggregator2 tables :)

jsbthree’s picture

Does Your feed have path alias set?

Not sure what you mean by that.

ahwayakchih’s picture

With path.module enabled You get "Path alias" field in node edition/creation form. It's used to change url to more "readable" state (for example: /node/123 to /my_family).
Do You have alias set for aggregator2 feed? Or maybe Pathauto module had set it for You?

jsbthree’s picture

I'm not sure this is what you wanted. I've tried to denote the linenumbers in brackets starting with 716 then skipping down to 729. Did you want me to replace that line below with the one above?

 [716] $edit['date'] = date('Y-m-d H:i:s', $timestamp);
      $edit['title'] = $title;
      $edit['link'] = $link;
      $edit['body'] = $item['DESCRIPTION'];
      unset($edit['teaser']);
      $edit['taxonomy'] = $feed->feed_item_taxonomy;

      $node = node_validate($edit);
      if ($errors = form_get_errors()) {
        drupal_set_message(t('Errors in entry from %site feed:', array('%site' => '<em>'. $feed->title .'</em>'))."\n".implode("\n", $errors), 'error');
      }
      else {
        $nid = node_save($node);
     [729]   if ($nid) {
          if ($nid != $edit['nid']) {
            watchdog('special', t('%type: added %title from %site feed.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => '<em>'. $node->title .'</em>', '%site' => '<em>'. $feed->title .'</em>')), WATCHDOG_NOTICE, l(t('view'), "node/$nid"));
          }
          else {
            watchdog('special', t('%type: updated %title from %site feed.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => '<em>'. $node->title .'</em>', '%site' => '<em>'. $feed->title .'</em>')), WATCHDOG_NOTICE, l(t('view'), "node/$nid"));
          }
        }
      }
    }
  }
jsbthree’s picture

I inserted it below line 723 as it didn't seem to make sense as above. It seemed to work. I'm still wondering why images don't seem to come through.

jsbthree’s picture

here's the deal. The content modified by another user is still comming through but -- big but here -- it posts the new feed anyway. So that's some improvement.

Here is what I mean about the images. If you look at this link in the next day or so you should be able to see this but the following RSS 2.0 is comming off the below blogdigger link.

http://blogdigger.com/media/mp3.xml

Look in the description for the first feed and you will see the image url in the descrition. That shows up on the formated Firefox rendering of the feed but doesn't show up in the feed comming throgh the page. I'm sure that doesnt make sense. What I am saying is that I can see the image through Firefox and a news reader but not when Agregator2 is used to elevate the same feed to a node in my page. Hope that makes sense. I 've yet to see an example of agregator2 showing the image through the pages. Is that possible? Sorry to be a pain.


<channel>
  <title>Blogdigger MP3 Media - Latest links for .mp3 files</title> 
  <link>http://www.blogdigger.com/media/</link> 
  <description>Recent .mp3 files found by Blogdigger</description> 
- <item>
  <title>Lesser Birds of Paradise</title> 
  <link>http://youaintnopicasso.blogspot.com/2005/06/lesser-birds-of-paradise.html</link> 
  <description><img src="http://www.lesserbirds.com/FieldGuide/img/AV/Galaxy_09.jpg"><br />What with all the noise or experimental stuff I'd posted lately, I figured it was time to do something more towards the folk end of the indie spectrum. <a href="http://www.lesserbirds.com/">Lesser Birds of Paradise</a> are a four piece from Chi-town who've been steadily gaining in popularity since their formation in '98. I suppose that they sound like Iron and Wine, if Sam were willing to stray from his own stereotype. While they do have the hushed vocals of I&W, they throw some curves every now and then. Sometimes their risks pay off, such as the inclusion of a wide variety of instruments; but other times they fall flat. All in all, this should be more than enough to satisfy your hunger for acoustic guitars and barely audible vocals.<br /><br /><strong>MP3s</strong>:<br /><a href="http://www.lesserbirds.com/MP3s/Bees/AMagnetInYou.mp3">A Magnet in You</a><br /><a href="http://www.lesserbirds.com/MP3s/Bees/ComeToTheCity.mp3">Come to the City</a><br /><a href="http://www.lesserbirds.com/MP3s/if_you_wanted.mp3">If You Wanted</a></description> 
  <pubDate>Sun, 19 Jun 2005 04:00:02 EDT</pubDate> 
  <source url="http://www.mp3blogs.org/rss.php">mp3blogs</source> 
  <enclosure url="http://www.lesserbirds.com/MP3s/if_you_wanted.mp3" type="audio/mpeg" /> 
  <media:content url="http://www.lesserbirds.com/MP3s/if_you_wanted.mp3" type="audio/mpeg" /> 
  </item>
- <item>
  <title>Lesser Birds of Paradise</title> 
  <link>http://youaintnopicasso.blogspot.com/2005/06/lesser-birds-of-paradise.html</link> 
  <description><img src="http://www.lesserbirds.com/FieldGuide/img/AV/Galaxy_09.jpg"><br />What with all the noise or experimental stuff I'd posted lately, I figured it was time to do something more towards the folk end of the indie spectrum. <a href="http://www.lesserbirds.com/">Lesser Birds of Paradise</a> are a four piece from Chi-town who've been steadily gaining in popularity since their formation in '98. I suppose that they sound like Iron and Wine, if Sam were willing to stray from his own stereotype. While they do have the hushed vocals of I&W, they throw some curves every now and then. Sometimes their risks pay off, such as the inclusion of a wide variety of instruments; but other times they fall flat. All in all, this should be more than enough to satisfy your hunger for acoustic guitars and barely audible vocals.<br /><br /><strong>MP3s</strong>:<br /><a href="http://www.lesserbirds.com/MP3s/Bees/AMagnetInYou.mp3">A Magnet in You</a><br /><a href="http://www.lesserbirds.com/MP3s/Bees/ComeToTheCity.mp3">Come to the City</a><br /><a href="http://www.lesserbirds.com/MP3s/if_you_wanted.mp3">If You Wanted</a></description> 
  <pubDate>Sun, 19 Jun 2005 04:00:02 EDT</pubDate> 
  <source url="http://www.mp3blogs.org/rss.php">mp3blogs</source> 
  <enclosure url="http://www.lesserbirds.com/MP3s/Bees/ComeToTheCity.mp3" type="audio/mpeg" /> 
  <media:content url="http://www.lesserbirds.com/MP3s/Bees/ComeToTheCity.mp3" type="audio/mpeg" /> 
  </item>
- <item>
  <title>Lesser Birds of Paradise</title> 
  <link>http://youaintnopicasso.blogspot.com/2005/06/lesser-birds-of-paradise.html</link> 
  <description><img src="http://www.lesserbirds.com/FieldGuide/img/AV/Galaxy_09.jpg"><br />What with all the noise or experimental stuff I'd posted lately, I figured it was time to do something more towards the folk end of the indie spectrum. <a href="http://www.lesserbirds.com/">Lesser Birds of Paradise</a> are a four piece from Chi-town who've been steadily gaining in popularity since their formation in '98. I suppose that they sound like Iron and Wine, if Sam were willing to stray from his own stereotype. While they do have the hushed vocals of I&W, they throw some curves every now and then. Sometimes their risks pay off, such as the inclusion of a wide variety of instruments; but other times they fall flat. All in all, this should be more than enough to satisfy your hunger for acoustic guitars and barely audible vocals.<br /><br /><strong>MP3s</strong>:<br /><a href="http://www.lesserbirds.com/MP3s/Bees/AMagnetInYou.mp3">A Magnet in You</a><br /><a href="http://www.lesserbirds.com/MP3s/Bees/ComeToTheCity.mp3">Come to the City</a><br /><a href="http://www.lesserbirds.com/MP3s/if_you_wanted.mp3">If You Wanted</a></description> 
  <pubDate>Sun, 19 Jun 2005 04:00:02 EDT</pubDate> 
  <source url="http://www.mp3blogs.org/rss.php">mp3blogs</source> 
  <enclosure url="http://www.lesserbirds.com/MP3s/Bees/AMagnetInYou.mp3" type="audio/mpeg" /> 
  <media:content url="http://www.lesserbirds.com/MP3s/Bees/AMagnetInYou.mp3" type="audio/mpeg" /> 
  </item>
- <item>
  <title>Israel, Pt. 1</title> 
  <link>http://webjay.org/by/eranrabl/israel2cpt_1</link> 
  <description><table width="100%" border="0"> <tr> <th align="left" width="33%">Music from Israel</th> <th align="right" width="66%">Newest Songs</th> </tr> <tr> <td valign="top" width="33%"> <p> Play all: <a href="http://webjay.org/by/eranrabl/israel2cpt_1.asx">WMP</a>, <a href="http://webjay.org/by/eranrabl/israel2cpt_1.smil">Real</a>, <a href="http://webjay.org/by/eranrabl/israel2cpt_1.m3u">WinAmp</a> </p> <p><br/> <span class="hpagestats"> updated June 19.</span></p> <p></p> </td> <td valign="top" align="right" width="66%"> <div><a href="http://omrilevy.com/basement/visitinghours/02_california.mp3">Visiting Hours - California</a> <a href="http://webjay.org/poster?media=http://omrilevy.com/basement/visitinghours/02_california.mp3">[copy]</a></div><div><a href="http://hasharat.co.il/mag/polaroid01/17%20naama.mp3">Na'ama - Elephant Skin</a> <a href="http://webjay.org/poster?media=http://hasharat.co.il/mag/polaroid01/17%20naama.mp3">[copy]</a></div><div><a href="http://stage.co.il/media/noabach318903.mp3">Que - Dots of Memories</a> <a href="http://webjay.org/poster?media=http://stage.co.il/media/noabach318903.mp3">[copy]</a></div> </td> </tr> </table></description> 
  <pubDate>Sun, 19 Jun 2005 03:52:15 EDT</pubDate> 
  <source url="http://webjay.org/feed">Webjay</source> 
  <enclosure url="http://webjay.org/poster?media=http://stage.co.il/media/noabach318903.mp3" type="audio/mpeg" /> 
  <media:content url="http://webjay.org/poster?media=http://stage.co.il/media/noabach318903.mp3" type="audio/mpeg" /> 
  </item>
- <item>
  <title>Israel, Pt. 1</title> 
  <link>http://webjay.org/by/eranrabl/israel2cpt_1</link> 
  <description><table width="100%" border="0"> <tr> <th align="left" width="33%">Music from Israel</th> <th align="right" width="66%">Newest Songs</th> </tr> <tr> <td valign="top" width="33%"> <p> Play all: <a href="http://webjay.org/by/eranrabl/israel2cpt_1.asx">WMP</a>, <a href="http://webjay.org/by/eranrabl/israel2cpt_1.smil">Real</a>, <a href="http://webjay.org/by/eranrabl/israel2cpt_1.m3u">WinAmp</a> </p> <p><br/> <span class="hpagestats"> updated June 19.</span></p> <p></p> </td> <td valign="top" align="right" width="66%"> <div><a href="http://omrilevy.com/basement/visitinghours/02_california.mp3">Visiting Hours - California</a> <a href="http://webjay.org/poster?media=http://omrilevy.com/basement/visitinghours/02_california.mp3">[copy]</a></div><div><a href="http://hasharat.co.il/mag/polaroid01/17%20naama.mp3">Na'ama - Elephant Skin</a> <a href="http://webjay.org/poster?media=http://hasharat.co.il/mag/polaroid01/17%20naama.mp3">[copy]</a></div><div><a href="http://stage.co.il/media/noabach318903.mp3">Que - Dots of Memories</a> <a href="http://webjay.org/poster?media=http://stage.co.il/media/noabach318903.mp3">[copy]</a></div> </td> </tr> </table></description> 
  <pubDate>Sun, 19 Jun 2005 03:52:15 EDT</pubDate> 
  <source url="http://webjay.org/feed">Webjay</source> 
  <enclosure url="http://webjay.org/poster?media=http://omrilevy.com/basement/visitinghours/02_california.mp3" type="audio/mpeg" /> 
  <media:content url="http://webjay.org/poster?media=http://omrilevy.com/basement/visitinghours/02_california.mp3" type="audio/mpeg" /> 
  </item>
ahwayakchih’s picture

When You go to newly created item, and edit it, do You see image html tag (img) in description/body field? If yes, then just edit feed and change configuration of filter there (like with other node types - by default in Drupal installation, first filtering/format method filters out all image tags).
But if You want also other tags to be kept, You'll have to wait few days.
Many tags are removed because i didn't implement full handling of format setting yet. Module still uses code from old aggregator module, which removes many html tags from aggregated data.
It's just for now and, hopefully, next RC will (at last! :), use format/filter setting from feed node, to filter aggregated data. That way administrator will be able to decide which tags, if any, to allow and which to filter out/change :).

The content modified by another user is still comming through but -- big but here -- it posts the new feed anyway. So that's some improvement.

Sorry, could You explain that a bit more? I don't know what You mean :(
Content modified by another user? You mean content from site A comes through feed to site B?
I have no idea what "posting new feed anyway" is about - what it should do? or not? :(

budda’s picture

When an RSS description contains mark-up - ie HTML, it should be enclosed in <![CDATA[ and ]]> to be safe.

The way aggregator2 parses the RSS XML it gets confused with the tags nested inside the tag.

--
www.gadgetspy.co.uk | www.bargainspy.co.uk

ahwayakchih’s picture

I plan to change parsing code after release 1.0.

Anyway not all (or maybe even most i've seen so far) RSS feeds use CDATA thing. So it's not "end of all problems" solution :).

el777’s picture

What if you feed accidently contain CDATA-specific characters blocks: <![CDATA[ and ]]> ?
If you are writing blog on maths it's very likely to contain chanracters ]]> in different parts of feed.

ahwayakchih’s picture

It handles CDATA (at least it should ;) by always wrapping content with CDATA around it. If there is already CDATA there it's first removed.

So, for now, worst thing which can happen is that if content has CDATA inside like:
CONTENT - CDATA - inside cdata - END CDATA - CONTENT
it will be changed to:
CDATA - CONTENT inside cdata CONTENT - END CDATA

el777’s picture

No, I haven't. I currently use 4.6.3

I see here 2 issues.
1) Generate feed with such characters. As you have noted, inside cdata is a problem, but there's one more problem. The text like:

 Example of PHP-code from Chapter 5:
   if ($result[$pointer[3]]>0) {
     .....
   }

Here's no CDATA but magic characters present. So this feed will be broken.
I've seen one interesting solution: to break this characters into 2 different groups.
Here it will be:

<![CDATA[
 Example of PHP-code from Chapter 5:
   if ($result[$pointer[3]]]]><![CDATA[>0) {
     .....
   }]]>

2) Aggregate such feed. You have to combine such blocks into one.

As far as I know, CDATA is not RSS but XML-specific. I think it will be right if all problems with parsing feed would be solved be xml-parser. I think rss parser should not deal with tags and cdatas - it's task is to get parsed feed and add into the tables.

ahwayakchih’s picture

1) is an example of generating feed - aggregator2 doesn't do that (at least for now).
2) Agregator2 already does that.

As for not being RSS - RSS is XML based, so it can use CDATA as any other XML syntax (tags, attributes). Since "&" character has to be escaped or wrapped in CDATA because it's special thing in XML, also CDATA can be used :)

Check this: http://blogs.law.harvard.edu/tech/rss#hrelementsOfLtitemgt
or more directly:
http://blogs.law.harvard.edu/tech/encodingDescriptions

I think rss parser should not deal with tags and cdatas - it's task is to get parsed feed and add into the tables.

Yes, but XML parser is only about syntax of XML - tags, attribs, entities, and cdata. So it's only kind of a translator - translating text into some structure.
So RSS parser has to recognize tags to know where is data it wants to put into tables :)

el777’s picture

Thank you for the link.

I don't mess the issues. For that I've separated them.

XML parser is only about syntax of XML

Yes. SO I think XML-parser must to parse xml file into some structure, and rss parser only gets something like this array:

$rss_input = Array(
  'title' => 'Bill & Co article title',
  'description' => 'The description',
 ....
);  

How does xml-parser get these fields? It doesn't matter. There may be different ways of encoding:
<title> Bill &amp; Co article title </title>
or
<title><![CDATA[ Bill & Co article title ]]></title>
or some another encoding.
All these versions are equivalent from the XML's point of view.

I think in this case abstraction level separation will work much better.

ahwayakchih’s picture

Well... mostly. It parses data into xml tree which later agg2 (and other modules) may use.

It does however do some special magic on fields known to contain html. It does that because we want to get clean tree, and html is not so clean because it mixes text with tags. We want to get clean data stricture which looks like:
tag - text - end
tag - tag - text - end - end

And html looks like:

tag - text - tag - text - end - text - end

Not to mention that often such html is broken and misses end tags, which prevents parsing it properly.

So it's easier to just wrap known tags with CDATA than to workaround all possible errors in html, and then make RSS/ATOM/whatever handler re-parse tree to check which tag is really what it needs, and glue it's content back together.

ahwayakchih’s picture

Great! I've added it to source here, next RC will have it included :).

THX for reporting bug and helping me finding it out!

jsbthree’s picture

Let me know when the RC is available. I've got alot of uses in mind when we can get the images, graphics etc working. Appreciate your time allot.

mikeryan’s picture

Pathauto saves patterns using Drupal variables which contain the specific item in the name, to distinguish them - do you have a vocabulary named something like "Aggregator Feeds/Items/Music"? Drupal variable names are limited to 48 characters, so the variable to save your pattern is too long and is getting truncated.

I'll look into a way to avoid that problem - in the meantime, could you report it officially as an issue at http://drupal.org/node/add/project_issue/17345?

Thanks,

Mike
Fenway Views

ahwayakchih’s picture

I reported it here: http://drupal.org/node/26154

Thank You for information (but i don't know why You wanted me to report it :).

ahwayakchih’s picture

http://ahwayakchih.neoni.net/files/aggregator2-RC3.zip

Changes:
- now input format setting is better used - aggregator2.module no longer filters out html tags from aggregated data, it's a job for drupal filtering mechanism :).
- now aggregator2-feed nodes show link to source site (only in teaser, only in full page, both, or none - the same setting is used for news items and feeds).
- fixed bug regarding path aliases conflicts - THX jsbthree (http://drupal.org/user/6450).

As always, please let me know how it works (or not ;).

jvincher’s picture

nicely done.

one question though, can someone explain the difference between a news feed and a feed item? I mean, I understand the difference as a feed being a collection of items and an item being an individual entity (part of a feed) but what is the purpose of being able to create a feed item?

this is a well needed feature, kudos to those who initiated and developed it.

ahwayakchih’s picture

None.
Module needs it to be able to create items for the same user who created feed (so user has to have permission to create both types of nodes). But creating such item is useless currently, as there's no way to specify feed to which item should belong. And if/when there will be such select list, item will be removed at 1st cron run most probably (but that depends on settings of course).

I would like to remove creating item from "create content" page, but it's not easly possible - i don't want to hack other parts of drupal, nor use CSS hacks to "hide" it from user.

jvincher’s picture

would be to allow assigning a feed/feed item to multiple categories. Currently, only one can be selected.

ahwayakchih’s picture

I checked it on my test site and it works. Items have 2 terms one from each vocabularly. But it should also work for many terms from the same vocabulary.
Are You sure Your vocabulary options are correctly set?

jsbthree’s picture

I've got one odd issue. Setting the filters for full html verse filtered html as the default. It seems to have less issues with the filtered as long as you go through and explicitly add the allowed tags. But why? Why doesnt it allow ALL tags in full html and be done with it? Some things are getting filtered in full html but that makes no sense unless I don't understand the filter system fully. I hope that mkes some sense.

Oh yea you can assign items to more than one category.. Its a bit of a conceptual hurdle. Here is how I overcame it. Go in and setup the following.. Feed Category A and Feed Category B . then do the same for item category a and b ect. Then assign them to the repective feeds and items and look at the results. It will begin to becomeclear..

ahwayakchih’s picture

Strange - it should leave all tags ok in full html. Maybe check filter settings? Maybe there's some additional filtering set there?

As for categories, both feed and item types should be "accepted" in vocabulary settings if You want to apply some term to both of them.

jsbthree’s picture

I"ve gotten this three times from three different feeds. It may be something I'm doing but was wondering if you had some idea.

My settings are to input full html by default. I can't figure out what it thinks is suspcious. Then there are not titles because it must filter the title or something.

* Failed to parse entry from Qucktime Blogdigger feed: suspicious input data.
* You have to specify a title.
* Errors in entry from Qucktime Blogdigger feed: You have to specify a title.
* Errors in entry from Qucktime Blogdigger feed: You have to specify a title.
* Errors in entry from Qucktime Blogdigger feed: You have to specify a title.

ahwayakchih’s picture

Can You send me links to those feeds? I'm guessing why it's like that, but i'd like to be sure.

Also You can try to modify module just a bit, and just for test, to see if that changes something:

Change line 692 from:

    if (!valid_input_data($item['DESCRIPTION']) || !valid_input_data($title)) {

to:

    if (!$item['DESCRIPTION'] || !$title) {

In errors You quoted there is "Quicktime" word, so i'm guessing that text in those feeds can include "embed" or "object" or other similar tags, which are not allowed in valid_input_data() function check.

Probably i should remove that check anyway. The same result (or even better) can be achieved through the use of Drupal filters :).

jsbthree’s picture

I made the change and will report. It was on line 685 if that makes any difference to you. thanks

Oh and by the way this is why I was asking about the html filter above. If you choose to filter and strip the tags you can specifically allow embed and object which I was doing. I did not know untill now for sure that the full html striped them so that explains some of this right there.

ahwayakchih’s picture

I did not know untill now for sure that the full html striped them so that explains some of this right there.

I ment that code in aggregator2.module (or exactly call to Drupal's function) stripped them. "Full HTML" filter shouldn't strip them as far as i know.
Sorry for misunderstanding, i probably wrote it badly - my english is not too good :).

budda’s picture

RC3 is functioning quite nicely in tests now. I was wondering if i could suggest a couple of small improvements?

(1) Support for RSS enclosures would be good, podcast RSS feeds contain an enclosure tag with a link to a media file (usually an mp3). Having this link at least passed to the theme function would be good, then I can handle the display and linking to them from my own phptemplate.

(2) Reading the RSS feed tags for each item and tagging the feed items with these tags, maybe using the folksonomy API or by actually creating the corresponding Taxonomy categories on the fly would be great to automatically categories things in a more granular fashion than the current "everything belonging to this feed shares the same taxonomy terms" method.

--
www.gadgetspy.co.uk | www.bargainspy.co.uk

ahwayakchih’s picture

THX.
Ad. 1. I will try to implement some way to handle specific tags in feeds.

Ad. 2. Yes, creating categories would be good thing to have. But maybe i'll find a way to implement it with some generic way (i'm thinking about something along the lines of php blocks - one could write small piece of php code to handle specific tag. Or maybe "addons", but that's less nice solution, less userfriendly).

budda’s picture

I'm not sure I understand your "php blocks" suggestion for handling categories. It sounds a bit messy to me.

I was thining of something simple such as each RSS feed item can add its own custom categories (drupal vocab terms) to the aggregator feeds chosen term.

I might make a patch against the current aggregaotr2 module to do this so you can check it out.

--
www.gadgetspy.co.uk | www.bargainspy.co.uk

ahwayakchih’s picture

I was thining of something simple such as each RSS feed item can add its own custom categories (drupal vocab terms) to the aggregator feeds chosen term.

But what if given term doesn't exist in Drupal's vocabs? Should it add it to some vocab then? Then we'll step on toes of some other modules...

What i ment by "php blocks" is that there would be a place to add php snippet for handling specific tag(s). That way we don't have to add code for each of specific tags into the aggregator2.module and keep it's codebase clean.
We could add popular "snippets" into README, or somewehere else easly accessible for users.
Of course it wouldn't be as easy as "built-in" for end-users, but with "built-in" handling of tags, sooner or later, we'll discover that half of the code is for handling specific cases, which are not so often used around the globe.
With "snippets" we would get also RSS enclosures You wanted :)

I might make a patch against the current aggregaotr2 module to do this so you can check it out.

Please do :)

thecod’s picture

Other then activating the module, how the heck does one use/configure this?

Seems like a good idea...

ahwayakchih’s picture

There is a help page for it where there is step by step instruction.

In short:
- activate module
- set up user permissions for module
- [optional] set default node settings for module (like promote, publish, etc..)
- [optional] setup categories (and maybe special vocabulary?) to be used for feeds, and other (or the same) for aggregated items.
- create aggregator2 feed
- wait for aggregated data to come (or hit "update items" tab, to fasten it ;).

jon@jony.net’s picture

First of all, thank you very much for your contribution. Scince your module is not in CVS yet, ill let you know whats going on here. Everything appears to in order, and I don't get any error messages, but when i create feeds under 4.6.x, the items never get aggregated, not by cron.php and not manually when i click update items tab. I've tested with a stock install of 4.6.0, 4.6.1, and 4.6.2. I also tested with a stock install of HEAD and I was able to get the items to aggregate with the update items tab, but never with cron.php. I'm surprised no one else has mentioned this issue, because I've tested it a bunch of times, with the same results each time.

ahwayakchih’s picture

Can You send me mail throguh contact form and write what modules do You use?
No one reported this before because it (probably) works ok for others. So it might be some module blocking saving nodes (You write that update items tab works, so i'm guessing that something doesn't work with fake login - maybe some module You use needs user to be really logged in).

Bèr Kessels’s picture

If you have problems with node aggrdgator, tell me so, in an issue. And please cnsider adding code patches and ideas to that module.

Why would anyone come up with something that is already done and working?
I just dont understand all this hassle about something that is there already.

---
if you dont like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]

Anonymous’s picture

I thank you for your contributions to drupal. You are an asset to this open source community. I relied on node_aggregator to provide a solution to my website when no other solution could be found. Again, I thank you.

When drupal v4.5 came out I notified you via email that node_Aggregator no longer worked. You replied that when your paying customer requested a fix, you would fix it. When I asked for a quote on how much it would cost to be a paying customer I got no reply.

If you have problems with node aggregator, tell me so, in an issue.. Search through your issues reports for node_Aggregator. You were told in March of 2005 that node_aggregator no longer worked. There was no reply from you until June. I DO appreciate the fact that this may be a volunteer effort on your part. That being said, a solution was needed. A solution has been provided.

Why would anyone come up with something that is already done and working? It stopped working, you stopped communicating. People who wanted the capabilities sought out someone who could/would/did provide a solution.

if you dont like the choices being made for you, you should start making your own. That's exactly what aggregator2 did.

Bèr Kessels’s picture

You are right about these choices :).

But, what I mean with my comments is that anyone COULD have sent me a patch to make it work. No-one did. Thus it remained broken.

And in addition, I think you are slightly wrong when you say that aggregator2 fixed the issues in node_aggregator. It replaces it, yes, but did not fix it. If your roof is leaking, you can build a new house, but you can also fix the roof.

And I did not stop communicating. I waited for people to send in patches. Really, telling me that it is broken is very good, for often I am not aware of it. But telling something is broken does not fix it.Fixin something fixes it. And again; you can only fix something if you know its broken, so bug reports are most welcome, just don't expect it to magically fix itself when it is reported broken.

---
if you don't like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]

ahwayakchih’s picture

As i just wrote in email reply to Your email, i have no problems with node_aggregator.

When feuman asked about comments to aggregated news i looked into node_aggregator module to check if i can update it. But from what i could read from source code it worked a bit different way (but please correct me if it's not true), so it's not exactly the same thing. And i needed aggregator2 way.
Even if node_aggregator worked exactly the same way all the time, and it was just me who couldn't see it, aggregator2 is up to date, and AFAIK made You work on node_aggregator again :)

I don't want to start any fights. If/when i get CVS account and maybe create project on Drupal.org i will surely link to node_aggregator (as i already did inside aggregator2.module) - i'm not trying to steal Your work or anything like that.

jsbthree’s picture

Aggregator2 allows for the automatic elevation of RSS feed to first class nodes. It works in Drupal 4.6 + (maybe 4.5 +too). Node aggregator did very much the same for Drupal 4.4 only it does not work for Drupal 4.5 and above. Isnt this where we are more or less?

ahwayakchih’s picture

So it seems i wrongly understood how node_aggregator is working.
I downloaded CVS version of it and "core" functionality is the same (i don't know why i was understanding it differently before... did it changed since last version?). Differences are on top of it.

So... should i resign from aggregator2 module and post differences to node_aggregator project? I'm not sure if all changes will be accepted :(

Bèr Kessels can You answer my mail? Maybe we can discuss possibilities?
I'm leaving town for two weeks in a few hours, and will be back for about two weeks.

I also would like to get CVS account first to be able to actively work on future versions, instead of just posting patches and waiting for them to be applied (if at all).

Bèr Kessels’s picture

But it works in HEAD, indeed.

I do not think you should drop your module. But I do think we should get them together in one module.
So either we move some code from node_aggregator to aggregator2 and then drop it, or the other way around.

And I beleive we should choose that based no what is the least work, yet remains all the posibilities.

---
if you dont like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]

jsbthree’s picture

I've used both Nodeaggregator and Agregattor2 extensively in test situations. Presently I've got a test of Aggregator2 up at www.nashvillesnews.com/drupal . There are good things about both these modules that should be combined.

I am going to do a detailed writeup to compare the two for you if you decide to combine the projects. I hope you do. I've got alot of thoughts on the matter.

I want to thank you both however as they are both well concieved and I beleive timely offerings for Drupal..

Bèr Kessels’s picture

Please mail (ber curlythingy webschuur dot com) me the lins to the writup once ready.

Actual work is highly preferreed above good ideas. Having a good idea does not solve anything. But doing something with that idea does.

Looking forward to seeing some results :)

---
if you dont like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]

ahwayakchih’s picture

Yes, such writeup wil be great!

THX in advance :)

ahwayakchih’s picture

Yes one module is a good solution.

Let's wait for writeup so we know what to move, etc.. :)

matt@antinomia’s picture

Could anybody point me in the right direction here? I want to move the $node->link to the top of the node, but I have no clue where to begin... I've been playing around for a couple of hours and can change the text, but can't seem to move it anywhere. Thanks!

ahwayakchih’s picture

PHPTemplate is easiest solution (both for moving links above text, and for using $node->link directly :).

Generic way:
aggregator2.module uses standard Drupal hook for links, so it's up to the theme where to show them.

If You really want to hack aggregator2.module You can, for example, try to add link to item's body in aggregator2_parse_feed() function in line:

$edit['body'] = $item['DESCRIPTION'];

so it could be:

$edit['body'] = '<a href="/'. $link .'">Source</a>' . $item['DESCRIPTION'];

But it's not nice soultion IMHO (although fast and easy). Better would be to use theming functionality for that. Or write simple filter which will do the same as above code, but in more "modular" and easly to manage way :)

budda’s picture

I noticed a bug in the last public posted version of the aggregator2 module.

When adding a 'description' to a feed node it will be forgotten after clicking a feed nodes refresh tab. Or at least i think thats when it loses its description.

Wuld be good to get this module in to the CVS repository then we can post proper bug reports and patches to the code.

I've nearly finished my auto vocabulary/category creator code for this module.

--
www.gadgetspy.co.uk | www.bargainspy.co.uk

ahwayakchih’s picture

When adding a 'description' to a feed node it will be forgotten after clicking a feed nodes refresh tab. Or at least i think thats when it loses its description.

Yes it looses description, because description is updated from RSS. That was what i wanted.
But maybe i should make it optional (ehh... more and more stuff gets to be optional, and setting up feed is getting more and more complicated :).

Wuld be good to get this module in to the CVS repository then we can post proper bug reports and patches to the code.

Yes, indeed.

I've nearly finished my auto vocabulary/category creator code for this module.

Send it to me (and/or post here) so maybe i can integrate it into aggregator2 code.

BTW This thread is getting too long, loading page takes a lot of time. Too bad comments are not paged :(.

svartling@svartling.hopto.org’s picture

I have installed the Aggregator2 module, but I get the source links like this when aggregated:
http://svartling.hopto.org/index.php?q=http://www.bandnews.org/

Why are my domain ("http://svartling.hopto.org/index.php?q=") added to the beginning of the source link?
How to remove it?

http://svartling.hopto.org/

joeblough’s picture

I noticed the same thing.

I'm rather new to drupal and suspect that it is a coding error on the author's part, but I'm not sure what the proper way to let them know is yet.

At all events what seems to be happening is this:

In aggregator2.module on or about line 153 in the function aggregator2_link the code states;

$links[] = l(t('full article ----- '), $node->link);

(Note: you can find the documentation for the function "l" at http://drupaldocs.org/api/4.6/function/l it lives in common.inc, it's job is to build drupal-friendly anchor tags)

When you inspect function "l" you see that it has a $path parameter and seems to assume that all the links it has to build are site-local.

The documentation states,
$path The Drupal path being linked to, such as "admin/node".

===========

My own solution to this was to build a nasty little kludge of my own as a substitute for "l" and stick it after "l" in common.include.

I then call my function rather than "l" from aggregator2.module on the offending line in aggregator2.module

===========

I cannot in good conscience recommend my code, especially as I do not understand all of what "l" is doing, most particularly the part that says:

if (isset($attributes['class'])) {
$attributes['class'] .= ' active';
}
else {
$attributes['class'] = 'active';
}

Theres probably a css class called "active" somewhere, but I basically don't get the point.

So I can't recommend my code as an adequate substitute for "l" or addition to the common.inc library.

============

At all events the aggregator2 module rocks.

My compliments to ahwayakchih.

I hope ahwayakchih sees this comment and addresses the link issue.

WBHL’s picture

I know this topic had been discussed widely in the aggregator module. However, it is a nice to have feature that the administrator could decide whether a new windows will pop when visitors click on the external links.

THks

ahwayakchih’s picture

Hi,

I didn't read any discussion about it but i think it's more a job for Drupal's l() function (which should also support external links IMHO) and/or theme function for links (PHPTemplate engine allows for theming node links - one could add checking if link is external or not, and if it is add "target=_blank" attribute to it).

I could of course add it to Aggregator2 module, but then it will be a bit inconsistend with other modules.

Regards
ahwayakchih

ahwayakchih’s picture

Hi,

It is fixed in not-yet-released version :)
Please wait a bit more for release, You won't regret it (hopefully ;).

Regards
ahwayakchih

ralnee’s picture

Hi all,

First off I'd like to say that I think ahwayakchih has done a great job on this module. I'm currently playing with this on a test site, and I really like it. Anyway, I started playing around with the code, (I hope no one minds) and came up with this hack. Go to around line 153 in the aggregator2.module and find the line that says:

<code>

$links[] = l(t('full article'), $node->link);


and change it to :

<code>

$links[] =  '<span class="source"><a href="/'. $node->link .' "target=_blank"">'. $node->title .'</a></span>';

This will take care of the external link and new window problems. I got this from the original aggregator.module, with some modifications

REMEMBER!!!! THIS A HACK. Before you make any changes, please back up!!!!

Thanks
ralnee

joeblough’s picture

Ahwayakchih,

Please see threads at:

BUG!? Aggregator2? Taxonomy-Theme? taxonomy.module? Node Deletion throws SQL Errors

and

BUG: Origin ??. SQL ERROR thrown on database.mysql.inc line 66 - Aggregator2? Taxonomy-Theme? taxonomy.module? Node Delete error

I'm hoping you can open a project for Aggregator2 here soon so these things can get the attention they deserve.

Aggregator2 rocks! Used with Taxonomy-Theme it's terrific.

Text of problem follows below. (I'd try to debug it myself if I knew drupal better).

===================================

When I try to delete an Aggregator2 feed or feed-item I get an SQL ERROR as follows:

user error: Not unique table/alias: 'tn'
query: SELECT COUNT(*) FROM node n
INNER JOIN term_node tn ON n.nid = tn.nid
INNER JOIN term_node tn ON n.nid = tn.nid
INNER JOIN users u ON n.uid = u.uid
WHERE n.type = 'aggregator2-feed'
AND tn.tid = 2
AND n.type = 'aggregator2-item'
AND tn.tid = 2
in C:\Inetpub\wwwroot\tapenews000\includes\database.mysql.inc on line 66.

user error: Not unique table/alias: 'tn'
query: SELECT n.*, u.name, u.uid
FROM node n
INNER JOIN term_node tn ON n.nid = tn.nid
INNER JOIN term_node tn ON n.nid = tn.nid
INNER JOIN users u ON n.uid = u.uid
WHERE n.type = 'aggregator2-feed'
AND tn.tid = 2
AND n.type = 'aggregator2-item'
AND tn.tid = 2
ORDER BY n.changed
DESC LIMIT 0, 50
in C:\Inetpub\wwwroot\tapenews000\includes\database.mysql.inc on line 66.

Please note that in both cases the lines "INNER JOIN term_node ... etc" are concatenated with no space as follows:
INNER JOIN term_node tn ON n.nid = tn.nidINNER JOIN term_node tn ON n.nid = tn.nid

The whole story:

I am using Aggregator2 with Taxonomy-Theme (a combination that rocks, by the way).

I just discovered that I added the same aggregator2 feed twice, with a different path-alias each time.

I started correcting by deleting one of the 2 feeds, on the mistaken assumption that all the feed-item chldren would be deleted automatically. Mistake!

Now I am deleting the feed items one at a time and getting the error messages above.

Clearly the SQL is malformed, but I cannot identify the point in the code where the bad SQL is constructed.

A scan of the source produces the following locations as suspect sites for the error:

=================================================

tapenews000\modules\node.module(806):
'options' => $terms,
'join' => 'INNER JOIN {term_node} tn ON n.nid = tn.nid');

tapenews000\modules\taxonomy.module(839): $sql =
'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n
INNER JOIN {term_node} tn ON n.nid = tn.nid
WHERE tn.tid IN ('. $str_tids .')
AND n.status = 1
ORDER BY n.sticky DESC, n.created DESC';

tapenews000\modules\taxonomy.module(840):
$sql_count =
'SELECT COUNT(DISTINCT(n.nid))
FROM {node} n
INNER JOIN {term_node} tn ON n.nid = tn.nid
WHERE tn.tid IN ('. $str_tids .')
AND n.status = 1';

tapenews000\modules\taxonomy.module(846):
$joins .= ' INNER JOIN {term_node} tn'. $index .' ON n.nid = tn'. $index .'.nid';

=============================================

I cannot figure out from where any of these lines would be getting called.

========================================

Poking through the source of Aggregator2 suggests that this all might be originating from hook_block, but I cannot assert that with any confidence.

I found it by tracking back from _db_query in database.mysql.inc, the function from which the error is thrown on line 66.

===================================

As matters stand, I have enough confidence in the module's general function and value that I intend to bring it live on a site within a couple of weeks.

But without having the feed and item delete working I will have to rebuild the prototype from scratch and recreate the feeds.

I hesitate to edit the database directly.

If there's any way I can help facilitate this please let me know.

Other than that, I can only request that you post a correction that I can edit in by hand as soon as convenient.

My compliments on an excellent module, thanks and good luck.

- Joe

ahwayakchih’s picture

Soon there will be project created n Drupal.org, so You'll be able to bug report everything there.

You may be right about hook_block. It's code wasn't touched for a very long time and probably needs some updating... Could You disable aggregator2 blocks and see if error still shows up?

Regards
ahwayakchih

joeblough’s picture

Looks like I was wrong

The aggregator2 blocks are all disabled, and they were all along.

Interestingly I get those SQL errors when I go to "content" in the navigation menu.

Does that tell us anything?

goggyy’s picture

I have this problem - when I update the feeds from cron.php, the creation time (I have it set to be equal to the actual time the content was created in my blog) is also updated. How can I make sure that when the nodes are updated, the original creation time is not overwritten?

goggyy’s picture

I made the change myself. Open aggregator2.module and find $edit['date'] = date('Y-m-d H:i:s', $timestamp);"

Just after it add this line: if (isset($edit['nid'])) { unset($edit['date']); } // if we update the feed item, do not change the creation date

This will fix the bug in the aggregator2.module that changes the creation date for updated items. Hope it helps somebody.

orican’s picture

i was able to assign them to multiple categories without any problem.

Gaming related drupal sites
-----------------------------------------------------------------------
Buy World of Warcraft Gold | Cheap Guildwars Gold | WoW Gold

dharprog’s picture

I would like to know whether this task has been completed or not?
If so ok otherwise i will develop for you and show you the demo. Have you enabled the aggregated module
Awaits your reply.
Thanks