Closed (fixed)
Project:
SimpleFeed
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2008 at 18:12 UTC
Updated:
23 Jul 2008 at 10:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
xiffy commentedSome extra information I think this only happens when two or more feeds have fresh items. The first feed does get it's taxonomy assigned, but the second and third not always. I'll dive into the code again to see if this makes sense.
Comment #2
xiffy commentedI think I found the problem.
$type is declared static. Now if $type is not set, $vid will get set to the appropriate vocabulary. But $vid is not static, and will loose it's value when we re-enter simplefeed_item_feed_parse. Since $vid lost it's value, taxonomy parsing is not done for any subsequent feed that has items in the same cron run.
Either $vid needs to be static as well, but I think it's best to take the small performance hit and perform the lookup of both $type and $vid once outside the for($i ...) loop.
I'll patch my installation and try both sugestions ($vid static as well or outside the loop non-static declaration).
I'll be back.
Comment #3
xiffy commentedTested my own suggestion; declaring $vid as static as well; after static $type; resolves the issue when more tehn one feed needs taxonomy assigned and are present in the same batchrun.
Comment #4
laurencemercerHi xiffy,
I'm having the exact same issue using SimpleFeed 5.x-2.2.
I see that you've found a solution for 6.x - inserting :
static $vidinto the simplefeed_item.module file.
Could you tell me exactly where you insert the new code. When you say 'after static $type' do you mean literally the very next line?
Thanks.
Comment #5
xiffy commentedYes, laurence_m,
Where you have:
inside simplefeed_item.module. You should have:
and the taxonomy issue should disappear.
Comment #6
laurencemercerThanks for the clarification xiffy, I'll give it a go and post the results back here later.
Comment #7
mfer commentedlooks like $categories needs to be static as well.
Comment #8
mfer commentedHere are a couple patches. One for D5 and one for D6. It looks like the $categories variable needs to be static as well. I'm going to test these out. If there are no issues I'll commit them.
Comment #9
mfer commentedThis seems to work in my tests. I'll commit tomorrow unless someone sees any issues.
Comment #10
m3avrck commentedThanks guys, I've applied this to 5.x and 6.x branches!
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.