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.
Not sure when this actually popped up, but just noticed tonight that with the latest dev release, the ImageCache Profiles module is no longer working when RealName is enabled. Normally, that module should be applying an ImageCache preset to the user's profile pictures that appear in nodes (full and teasers) and comments, but with the latest dev release of RealName, the unmodified user profile image is displayed. If RealName is disabled, ImageCache Profiles works again.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1070102-realname-no-not-destory-user-picture.patch | 2.48 KB | Dave Reid |
Comments
Comment #1
Dave ReidIt probably also conflicts with the Gravatar module (and likely this has never worked properly anyway). It's very hard to get multiple modules working together that want to all override template_preprocess_user_picture().
Comment #2
ChrisLaFrancis CreditAttribution: ChrisLaFrancis commentedI reversed the changes that were introduced with CVS commit #503494 (revision 1.4.4.75 of realname.module), and everything seems to be back to normal now.
Dave, do you think this is something that can be fixed, or is it just going to be an incompatibility between the two modules?
Comment #3
Dave ReidWell I doubt the ImageCache profile user picture uses the account's real name after you've reversed the changes.
Comment #4
ChrisLaFrancis CreditAttribution: ChrisLaFrancis commentedYep, RealName is working fine. The two modules have been working together without issue since at least August, 2010.
Comment #5
Dave ReidIt only worked because it accidentally overwrote the $account->name value which was fixed in #521312: Leaking real name in template_preprocess_user_picture_realname(). I'm working on a better patch.
Comment #6
Dave ReidHere's a patch that:
1. Only does a string_replace for the "@user's picture" string in $variables['picture']. This way we don't need to destroy the current data.
2. Intentionally clone $variables['account'] and set $variables['account']->name to the realname. This will not affect the original object from which $variables['account'] was set to a reference by default, but still allow further implementations of hook_preprocess_user_picture() to work naturally with $account->name.
@fivefrank: Please test this patch out to see if it resolves the problem for you.
Comment #7
Donaldd CreditAttribution: Donaldd commentedThanks Dave! Patch in #6 works for me.
D
Comment #8
ChrisLaFrancis CreditAttribution: ChrisLaFrancis commentedAlso working for me. Thanks for your hard work, Dave.
Comment #9
pvasener CreditAttribution: pvasener commentedThe patch fixed the problem for me too. Thanks a lot.
Comment #10
Dane Powell CreditAttribution: Dane Powell commentedPhew! Took me 2 hours to trace this problem back to RealName, but happy to report that this patch works. Thanks!
Comment #11
barraponto CreditAttribution: barraponto commentedI can confirm the patch works fine.
Comment #12
bohz CreditAttribution: bohz commentedConfirming patch works fine too.
Thanks!
Comment #13
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #14
joelstein CreditAttribution: joelstein commentedWorks for me.
Comment #15
andypostGreat idea. I only scare a bit about memory usage caused by cloning mostly for large user lists.
PS We need formalized approach to render user picture to allow contrib to alter parts of final HTML of the image
Comment #16
zanixI had the same issue as well, that patch in comment #6 works for me.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedfollowing.
Are there plans to incorporate this patch into a future version?
Thanks!
Comment #18
jzornig CreditAttribution: jzornig commentedPatch #6 worked for me.
Comment #19
wxman CreditAttribution: wxman commentedI'm glad I found this thread. I've been going crazy trying to figure out what was wrong. The patch works great here too.
Comment #20
Dane Powell CreditAttribution: Dane Powell commentedThis is obviously a pernicious bug affecting a lot of people- can we get this committed please before it wastes even more peoples' time?
Comment #21
gausarts CreditAttribution: gausarts commentedActually, not only affecting imagecache_profiles, but also imagecache for user pictures in views. Patch #6 works like a charm.
Thanks
Comment #22
metastate CreditAttribution: metastate commentedUpdated to RealName 6.x-1.4 and ImageCache presets stopped working for both the ImageCache Profiles module and user pictures in Views - the original, full size photos were showing instead. Patch in #6 fixed the problem.
Comment #23
Magnus CreditAttribution: Magnus commentedPatch in #6 works great. Thanks!
Comment #24
InTheLyonsDen CreditAttribution: InTheLyonsDen commentedPatch in #6 saved much angst. Thank you!
Comment #25
codekarate CreditAttribution: codekarate commentedI am using 6.x-1.4 and the patch in #6 worked for me. Thanks.
Comment #26
Dave ReidCommitted #6 to Git.
http://drupalcode.org/project/realname.git/commit/428b187
Comment #27
webkenny CreditAttribution: webkenny commentedTwo reasons why I love Drupal: Dave and Reid. Next time you're in Boston, beers on me. Took me a step debugger and several attempts to figure out why this was happening. Patch magically fixed it. You're the man.
-K
Comment #28
avolve CreditAttribution: avolve commentedCan confirm that patch#6 works, and that 6.x.1.4 did not work with imagecache profiles.'
Had minor issue with the patch (user error?), though it did work in the end
Much Thanks (tested this module for the first time today).
Comment #29
brunorios1 CreditAttribution: brunorios1 commentedThanks for the patch!
Comment #30
fuu CreditAttribution: fuu commentedAfter 1 week finally solved this problem.
Keep thinking it is imagecache or viewss problem.
Thanks for the patch.
Comment #31
rot3r1Hi!
i have wasted to many day's to understanding what happening to our user picture ,finally i track the issue of realname!
as the large number of, User Based Site using this two specified module (imagecache profile & realname) together , and may be they have this issue, please commit this patch in new version , it will be saving a lot of time and effort!
Comment #33
mudsurfer CreditAttribution: mudsurfer commentedSorry, I'm a bit confused because from above I think that the patch suggested in #6 has been incorporated in 6.x-1.4?
However I only just installed Realname for the first time yesterday, using 6.x-1.4, and I am getting the same issues as descibed above.
Using Realname 6.x-1.4
Imagecache_profiles 6.x-1.3
imagecache 6.x-2.0-beta12
Core 6.22
I suppose I should see if I can manually apply the patch at #6 and see if that works?
Comment #34
mudsurfer CreditAttribution: mudsurfer commentedI'm still trying to get used to the Issue queue and the statuses, So forgive me if I'm misplaced, but others may find this if they are searching. I'm definately running Realname 6.x-1.4 and Imagecache_profiles 6.x-1.3; imagecache 6.x-2.0-beta12; Core 6.22.
The patch offered in #6 definately solved my issues. But I had to apply it manually. (im not sure have to roll it into my module automatically yet - still learning!). PS: Great module Dave.
Comment #35
andypostPatch incl into 6-dev so 6.x-1.5 will be fine
Comment #36
lelizondo CreditAttribution: lelizondo commentedIt took me a few hours searching what was the problem until I found this. Please release 1.5 as soon as possible since many users will never know that this problem is RealName related and has nothing to do with Imagecache or Views. This module would be the last place anyone would look.
Comment #37
th.sigit CreditAttribution: th.sigit commentedI had the same problem. I have Drupal Commons installed on my localhost and enabled Real Name module (6.x-1.4) as well. The image won't resize under node pages and user's profile pages.
Upgrading to the last dev fixed this problem. Thanks!
Comment #38
Grzegorz Zbiński CreditAttribution: Grzegorz Zbiński commentedSee also:
http://drupal.org/node/1262572#comment-4964614
Kind of workaround with views, views customfield and imagecache.