_emfield_update_fix_data() can loop infinitely
| Project: | Embedded Media Field |
| Version: | 6.x-1.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I'm trying to upgrade a site from emfield 6.x-1.7 to 6.x-1.15. When I run updates, _emfield_update_fix_data() never finishes. A few bits of information:
$result = db_query_range("SELECT * FROM {{$context['sandbox']['table']}} WHERE vid > %d ORDER BY nid ASC", $context['sandbox']['current_node'], 0, $limit); is called with vid being equal to the highest vid in the table.
This causes the while loop at line 190 to return FALSE, and means that the progress variable is never incremented.
Strangely enough, in my case progress is stopping at 365, while the max variable is 581. So perhaps the issue is deeper then I think. I think the fix might just be to check if no rows are returned and set the finished variable to 1, but I'm not really clear as to what the entire function is doing.
I checked -dev and it currently also has the same issue.

#1
whoops! looks like it's the order by nid, whereas we're filtering on vid. i've fixed this in the dev version. please re-open if you still have the problem.
thanks!
#2
Thanks - the latest -dev now properly updates for me.
#3
I am using 6.x-1.17 and experiencing this. When I run update.php it hangs at 98%..
#4
I tried the Dev from 2009-Nov-20. Same deal. Now I'm seeing the following in my logs : Could not connect to youtube, HTTP error 404
#5
I'm pretty sure that the update connects to various providers to update metadata. Perhaps your host is blocking external HTTP requests? When you SSH into your server, can you wget / curl files over HTTP?
#6
@deviantintegral
Thank you for replying. In my logs, where the error is being displayed, I see the locations as: /taxonomy/term/23/all/feed
I've been using emfield 6.x. 1.0 for close to a year now with no issues. This only came up after upgrading to 6.x.1.17
Example:
Type emfield
Date Saturday, November 28, 2009 - 09:49
User Anonymous
Location http://www..../taxonomy/term/23/all/feed
Referrer
Message Could not connect to youtube, HTTP error 404
Severity warning
Hostname 188.*.42.*
Operations