thanks in large part to the formupdater module, i've managed to get the cvs version of aggregator2.module mostly ready for 4.7 forms api.

the patch i've attached is a rough start, and doesn't do anything with form_(s|g)et_errors calls, nor the aggregator2_autotaxonomy.module or aggregator2_logo.module. i've also left out the "original author" field, because it was conflicting with the author field provided in the authoring options

Comments

spiderman’s picture

obviously this is still incomplete, but it's made the code at least basically work on my 4.7 development site. the one odd thing, however, is that this patch caused one of my feeds (http://mostlywater.org/node/feed) to suddenly fail, with an error saying:

Failed to parse RSS feed mostly water: junk after document element at line 2

this is perplexing, since i've got a parallel 4.6.3 test site importing this feed perfectly, using the aggregator2.module (and xml parsing code) currently in cvs head- so this patch must've broke sumfin in the xml parsing, except this patch doesn't touch the xml parsing code! (of course, it is late, and i have been staring at this for awhile).

any help appreciated :)

ahwayakchih’s picture

Thanks for Your work! :D

I'll start testing it after 4.7 RC is released (or after they'll state there is API freeze and NOTHING in API will change), because i don't want to keep checking if anything changed and update things all the time (i want to work on other things instead).

Patrick Nelson’s picture

I applied this patch to aggregator2.module version 1.30 and still get an error:

Fatal error: Call to undefined function: form_checkbox() in /home/v/c/vcommunityaab/public_html/modules/aggregator2/aggregator2.module on line 436.

I take it that the version this patch applies to is not 1.30! Could someone let me know what version it does apply to?

Patrick Nelson’s picture

Apologies. I've done the Sherlock Holmes bit and worked out from the date of this post and the repository that this patch works with revision 1.23 which is here.

So, if anyone else wants to use aggregator2 with 4.7 whilst waiting for the full update, you will need to go back to this version if you want to use this patch.

Alternatively, spiderman, is there any chance of an update on your patch? Great work, by the way.

Regards

Patrick

dkruglyak’s picture

Sorry for such a vague question, but how far away is agg2 from "official" 4.7 release? In other words how complete / stable is CVS version on 4.7?

jon pugh’s picture

Is anyone working on this, not just forms api but a 4.7 version? I read somewhere that the developer was waiting for a 4.7 RC to finish aggregator2 4.7.

I am only asking because I am going to attempt to upgrade it myself and post a patch. If someone has already done some of the work that would be great.

colorado’s picture

GO GO GUNDALO!!

There are many of us non-coders waiting/watching in the wings for a functional Aggregator2. Please make it work with OG Organic Groups and you will be a HERO :-)

jon pugh’s picture

So no one knows anyone that is working on this?

Ok... i'm almost through it... once i get it working i'll let you know and post a new patch.

colorado’s picture

Woohoo!!

I'm ready to test and support in whatever (non-coder) ways I can :-D

THANK YOU

ahwayakchih’s picture

I've just uploaded new version to CVS. It was tested on beta2 so far, i'll test on beta4 next (i know they AT LAST made taxonomy module load terms by default, so agg2 will not have to do it all the time ;).

Thanks for patch, but in the end i just patched it myself implementing some changes by the way and "learning" new forms API :).
It didn't work well before because there were some changes in "core", and agg2 has to do some things a bit different way.

Regards
ahwayakchih

colorado’s picture

I just installed the new aggregator2.module from cvs on a fresh 4.7 beta4. Refreshing the feed does not seem to produce any items at all (although no errors are produced either.)

I also noticed that the categories I set for the feed items (in the settings for the feed) do not hold their setting (the categories for the feed itself do, however).

ahwayakchih’s picture

I just installed the new aggregator2.module from cvs on a fresh 4.7 beta4. Refreshing the feed does not seem to produce any items at all (although no errors are produced either.)

I also noticed that the categories I set for the feed items (in the settings for the feed) do not hold their setting (the categories for the feed itself do, however).

Ugh :(

That is why i wanted to wait for full official release of 4.7... they change things so often it's pain in the a** for 3rd party devs... and many things are undocumented, ro documentation is outdated....

Sorry, but it starts to be really annoying to try to keep up with API changes :(

I'll test and fix it sometime later this week or next week.

colorado’s picture

That would be REALLY, REALLY appreciated, to have ann agg2 that at least works minimally for 4.7 :-D

colorado’s picture

Did I say REALLY REALLY? I meant REALLY REALLY REALLY!!

jon pugh’s picture

Yeah, that was a problem for me when I was trying to update. Even when i got throught the forms, it never loaded items.... i think it probably has something to do with how nodes are saved, etc in 4.7.

Here is the page where it goes over all the changes for 4.7: http://drupal.org/node/22218

I'm completely lost at this point. With no errors and essentially nothing happening, i don't even know where to start with this one... but i'll try.

Isn't there someone out there that know's enough to update this module? I'm sure it's a really minor change, and I doubt there will be any more major changes in 4.7 at this point, at least not enough to warrent waiting to get it up and running.

oh well... let's hope some lightning strikes on this one.

jon pugh’s picture

BANG!

Lightning struc, folks. I was going through the process line by line, and i found the ONE LINE OF CODE preventing this module from working:

This is from the most recent CVS version posted.

on about line 1900 you will find this:

 // Ignore items older than allowed for feed
    if ($timestamp < $time_horizont) {
      continue;
    }

I couldn't figure out why this didn't work so I just commented it out, and it worked! like this:

 // Ignore items older than allowed for feed
/*    if ($timestamp < $time_horizont) {
      continue;
    } */

I know this isn't a perfect situation, but if you don't use the "items older than" feature it won't really matter.

Woo hoo! finally.... gosh.

PS. I got this to work on a 4.7 beta 3 install. I don't think there would be any reason it wouldn't work with the newer one, since the problem is not with drupal functions, but with this one line of code. but if you run into problems, let us know.

colorado’s picture

WOOHOO!!

Thanks Gundalo - You made my week!!

(I still get a blank page following refresh, but at least it grabbed the items, and that is what I needed right now.)

spiderman’s picture

hey, i just tested the latest cvs module on a 4.7b4 test setup, and it works great- what's more, the mostlywater feed (which still fails in the default aggregator module) parses perfectly!

one thing i'll try to put some energy into later on is to patch the aggregator2_logo and _autotaxonomy modules up to 4.7 compliance.

thanks for the updates and encouragements, folks!

colorado’s picture

Hmm using the current cvs version on a 4.7b4 install, I'm getting this error when I try to Refresh feeds:

Failed to parse RSS feed Test Feed: junk after document element at line 154.

Am I missing something again?

spiderman’s picture

colorado:

from that error message, i'd guess this is a problem related to the specific feed you are trying to parse. this does not necessarily mean that it's *not* a problem with aggregator2, but all the feeds i've tried are working fine (including one that was broken a few weeks back). you might want to try validating the feed you are trying to use (manually as well as via http://feedvalidator.org/check.cgi or similar), or post the feed's url here so others can give it a try.

colorado’s picture

Anyone know: Is there yet a working aggregator2 for version 4.7.0, or some patch that makes it work?

colorado’s picture

StatusFileSize
new80.73 KB

OK, I've got an aggregator2.module working on my 4.7.2, which I've attached:

PATCHES APPLIED:

- patch for item categories bug (http://drupal.org/node/61474)

- commented out 4 lines (http://drupal.org/node/38193)

- patched for flush bug (http://drupal.org/node/60396)

In order to make it work I had to:

1) disable the module

2) delete the aggregator_feed and aggregator_item tables

3) enable the module

4) reinstall the module (using the devel.module)

5) create a new feed

6) refresh the new feed

7) hit the back button when you get the page not found (at that point the feed page will still show "0 items")

8) refresh the page and you should now see that there are some feed items

I hope this helps someone :-)

jt6919’s picture

First of all - the one thing you didn't mention on your post was the patched working module version you attached - you hacked up!!
It wasn't that bad, but you did replace a bunch of things in it with "PODCAST" instead of "aggregator2" - so I couldn't even find the bloody thing on my admin menu - because you renamed it to 'podcast feeds'! In addition --all my feed nodes were listed as content type "podcast". I hacked the file back into shape - but this was not expected.

after installing - everything seems to work , but I still get "error in SQL syntax", "implode() bad arguments", "invalid argument supplied" and many other errors......at least (so far) the feed(s) I entered is getting in...

colorado’s picture

Sorry about the text replacements (i.e. "podcast" all over the place). I was just sharing something I actually got working in case it might be helpful to someone else. I'm now working with the New version of Aggregator2:

http://drupal.org/node/77451

jt6919’s picture

I'm going to try the new version (right now), because after the initial adding feeds and refreshing to aggregate items - it bombs and never updates (on cron) again without 10,000 errors......also - it removed all my promoted feed items from the homepage....

colorado’s picture

Yes old Agg2 is a real mess! Everyone who can should jump over and start helping with the new version while ahwayakchih is hot!

spiderman’s picture

Status: Needs work » Closed (won't fix)

old and crufty- closing for good :)

dkruglyak’s picture

Status: Closed (won't fix) » Closed (fixed)

Ditto. The best upgrade path is to convert Agg2 content to SimpleFeed: http://drupal.org/project/simplefeed