We have installed Agg2 on a fresh 4.7.3.

It works, but when we run cron or try to update the feeds it shows up the Error "This content has been modified by another user, changes cannot be saved" and doesnt leech the new items.

We unchecked the "update existing items" option, which didnt seem to work anyway.

Now it recieves some new items, but it still shows the Error.

I think it's very bad that Agg2 isnt supported by any Developers anymore... It is so great and if it would be merged with news_page.module it would be the rocker!!

Cant somebody pls. develop this wonderful module further?

Thanks a lot.

Comments

funana’s picture

Sorry, I forget to tell that we allready patched Agg2 with this here: http://drupal.org/files/issues/agg2.patch
The patch didnt seem to change anything.
But we kept the patched Agg2 when we unchecked the "refresh items" option and run the cron.

funana’s picture

It just leeched once. Now it's the same like before. No item updates...

Errors in entry from xyz feed: This content has been modified by another user, changes cannot be saved.

zis’s picture

I have the same problem. I comes from the node_validate call on line ~1569 in aggregator.module

See node_validate checks for a couple of things. one of them is

 if (isset($node->nid) && (node_last_changed($node->nid) > $_POST['edit']['changed'])) {
    form_set_error('changed', t('This content has been modified by another user, changes cannot be saved.'));
  }

line 1537 of node.module

I found a tweak that works but i think there must be another way to do it.. anyhow that's what i did:

in aggregator2.module, i added
$_POST['edit']['changed'] = time(); before the call for node_validate. for some reason the error started showing up soon after. So i did the following:

	$_POST['edit']['changed'] = time() + 1000;
	node_validate($feed);
	$_POST['edit']['changed'] = time();

It's working for now, but dunno if it's the best solution..

zis’s picture

now it seems in the latest cvs version the node_validate call was removed... Try updating

zis’s picture

Oops it seems the CVS update has been made to the 4.6 branch. What they did is just add a
$feed->validated = TRUE; instead of the node_validate call.. But it's not the best solution..

m3avrck’s picture

I have this same error too... hmm.

gmak’s picture

same problem here as well...

funana’s picture

StatusFileSize
new79.28 KB

Hi,

we used a combination of the work arounds as discribed above and it works now!
I attached the modified Agg2 Module we use on a production site, but usage is on your own risk.

Backup everything before you try it, and test it on your development environment first!

Im not a Drupal Developer, I just tried to do the best I could and it works now, I don't know if there are better ways to fix it...

If anyone got a better solution, pls. share your knowledge.

RobRoy’s picture

Please post a patch as described here: http://drupal.org/diffandpatch

zis’s picture

Status: Active » Needs review
StatusFileSize
new761 bytes

Here's a patch. It's supposed to work fine. I tried it and it's working but it needs some testing...

zis’s picture

StatusFileSize
new761 bytes

Here's a patch. It's supposed to work fine. I tried it and it's working but it needs some testing...

hanoii’s picture

StatusFileSize
new407 bytes

the patch idea was ok but I think it was missplaced. I first tried the previous patch uploaded by ziz but this error keep happeninig. I guess this was a validation added on the newest drupal core, because I recall this not happening on the previous versions.

Anyway, I attach the patch against the lastest -cvs.tar.gz package of the module (v1.43 cvs version of this file). Hope this helps.

a.=

hanoii’s picture

StatusFileSize
new1.61 KB

Ok.. what I talk about previously was wrong.. the fix was correctly placed, althouth that was for fixing the validation for the feed node type. I aslo found that the feed_item node types were failing too, so I added that same workaround on another place of the file.

I also found another error, which I might post on another issue, thus when the module tries to update an already stored item, it loads the taxonomy information twice, and because of t his warnings of duplicte keys on the taxonomy table appear on the administration page.

I found why this was happening. It is documented on the code that node_load() does not load the taxonomy information, so the module loads it itself, but node_load does include that information.

The patch I am attaching has the previous workaround for the validation error and also this error fixed.

Hope this helps, the patch was made agains the same aggregator2.module file I mention on my previous post.
a.=

zis’s picture

Hanoii, for the duplicate entries bug, there's a patch that's working and ready to be comitted: http://drupal.org/node/81085

jt6919’s picture

it's great to have the patches of aggregator2, but I believe the new version (leech_news) will replace it.

I got email from the assigned developer ("ahwayakchih") of aggregator2 and the author or leech_news and he is coming back Sept 18!! Just want a little over a week for development to begin again and the bugs to get worked out in a brand new version of leech_news...

funana’s picture

wow! Thats really great news! I was just talking about that with a friend today: "Oh, it's so bad that ahwayakchih doesnt support the module anymore".

great!

monkeythug’s picture

Hi, just applied the patch (aggregator2.module_4.patch) and it seems to work OK for me.

Small point - it looks like the patch is a reverse patch? Is this intentional? (It might be the norm for drupal patches but my very brief skim of the documentation suggests not ... ;-)

Cheers,

David.

spazio’s picture

Would it be possible to attach the patched module here, so I could download it as well?

Thank you!

Mario

orionvortex’s picture

Actually, could someone please post this module with this patch and the patch that will allow categorization of feeds. I was able to apply the categorization of feeds patch http://drupal.org/node/61474 but I couldn't get this patch to work after I applied that patch.