Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Node Gallery version = "6.x-3.0-beta2" and modul Plupload 6.x-1.x-dev
All photos by guest on page view photo, but on page gallery I author.
Turns out that the author has galleries, but there is no author photo
Comment | File | Size | Author |
---|---|---|---|
#5 | node_gallery_author_reset_1229396_5.patch | 738 bytes | crea |
Comments
Comment #1
justintime CreditAttribution: 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 CreditAttribution: arturus-1 commentedI created a gallery and added to this gallery photos.
Author Gallery I am, but the author photos - "guest"
Comment #3
crea CreditAttribution: crea commentedConfirming. The bug is caused by loose comparison in the in_array() function.
Comment #4
crea CreditAttribution: crea commentedComment #5
crea CreditAttribution: crea commentedPatch attached.
Comment #6
crea CreditAttribution: crea commentedComment #7
justintime CreditAttribution: 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 CreditAttribution: scroogie commentedWe should filter these values out so we don't run the risk of commiting the comparison error again.
Comment #9
crea CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: deviantintegral commentedadd info