Closed (fixed)
Project:
Rotor Banner
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2010 at 01:50 UTC
Updated:
17 May 2011 at 21:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
agileware commentedThe problem would appear to be occurring whenever a rotor item node is saved programmatically (ie. not via the node edit form).
- Changing status too as it now affects many more use cases than just views bulk operations.
It is because of this:
Because it only checks is_object($node->rotor_image) and $node->rotor_image is not going to exist unless you are using the node form.
Then $exists will be TRUE because there is a row for that node, so it will save the fid as 0.
It should just user $node->fid if it exists and $node->rotor_image is not there.
Comment #2
agileware commentedCombined with #932878: Node revisions don't work this poses a fairly significant problem as the revisions aren't there to save you so you have to go to backups.
Comment #3
mrfelton commentedThis should be resolved in http://drupalcode.org/viewvc/drupal/contributions/modules/rotor/rotor.mo...
Please confirm.
Comment #5
agileware commentedTook me a while to get back to sorry.
I just had a quick look at the commit and there seems to be an issue with the new code.
I can't do a patch right now but I can do one later.
The problem is in that function if $fid is set it does an update, else an insert but fid will always be set, so when creating new rotor items it tries to do an update on a row that doesn't exist.
This was caused by
being replaced with
Comment #6
agileware commentedHere is a fix.
Comment #7
mrfelton commentedFixed in git. Thanks.