Closed (fixed)
Project:
Node Gallery
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 00:35 UTC
Updated:
29 Oct 2011 at 22:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
justintime commentedI'm sorry arturus, but I just can't understand what you're stating here. I'm bumping this down to a support request until a confirmed bug is found.
Comment #2
arturus-1 commentedI created a gallery and added to this gallery photos.
Author Gallery I am, but the author photos - "guest"
Comment #3
crea commentedConfirming. The bug is caused by loose comparison in the in_array() function.
Comment #4
crea commentedComment #5
crea commentedPatch attached.
Comment #6
crea commentedComment #7
justintime commentedI don't see how any bad can come from this, and frankly, I don't have the time to test it myself. Committed to dev.
@crea, FYI: your patches are created as -p0, since the git migration they've changed the standard to -p1.
Comment #8
scroogie commentedWe should filter these values out so we don't run the risk of commiting the comparison error again.
Comment #9
crea commented@justintime
When author element was not present in the form, in_array() gave false positive, so the code was loading anonymous and was using it for managed nodes.
On p0 vs p1, I don't know, I make patches with git :)
@scroogie
Probably you're right, let's leave that up to Justin
Comment #10
crea commentedActually, it's a shame. Thousands of websites are using this module, and this bug was still live.
Does anyone use manage images feature at all ?
Comment #11
scroogie commentedI think for the bug to occur there needs to be a zero value in the according drupal variable, which is probably the reason why so few people are hit by the bug.
Comment #12
fastforward commentedConfirming the bug. I have added new cck field (text - text field) to my gallery_image content type and decided to fill it out through "Manage Images" (great timesaver, by the way)) from one of my fake user account (i'm under construction now). After submitting the form all nodes from this user became "Anonymous" in node view, but still belong to this user in gallery view. I tried to reproduce this behavior with my second gallery_image content type. After submitting "Manage Images" form with pre existed cck-fields I didn't found any errors. But when I added the same new field (as in first case) "Anonymous" appears and "captured" all nodes in node view. Patch from crea worked (thanks a lot), but I had to edit every one node through "Manage Images" to return it to my user.
Comment #13
scroogie commentedThanks for the report fastforward. That brings us a step ahead when searching for the real cause. So we should check the code that retrieves the fields for the option checkboxes on the relationship settings.
Comment #14
scroogie commentedAh yes, I found it. We just save the whole result array of the checkboxes to the database, which contains zeros for all non-checked boxes. We should of course filter for values that are actually checked before saving them.
Comment #16
deviantintegral commentedThis is a pretty nasty bug in the 6.x-3.0 release. Any chance of rolling a 3.1 release so that users don't have to go back and reconstruct node authorship?
Comment #16.0
deviantintegral commentedadd info