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.
Show people "liked this" link not show users if users not upload avatar.
In file heartbeat/modules/heartbeat_plugins/includes/heartbeatflagplugin.inc, I found this:
$result = db_query("SELECT u.name, files.uri, f.uid FROM {file_managed} files INNER JOIN {users} u ON u.picture = files.fid INNER JOIN {flag_content} f ON f.uid = u.uid WHERE content_id = :uaid AND content_type = 'heartbeat_activity' ", array(':uaid' => $uaid));
Query above isn't select users if user haven't picture. How to fix this issue?
Comment | File | Size | Author |
---|---|---|---|
#3 | no_picture_people-1896256-1.patch | 996 bytes | duynguyen |
show liked this 1.png | 10.04 KB | duynguyen | |
show liked this.png | 19.8 KB | duynguyen |
Comments
Comment #1
duynguyen CreditAttribution: duynguyen commentedMy solution is change INNER JOIN users and file_managed to LEFT JOIN
Comment #2
thehong CreditAttribution: thehong commentedDuy, you please provide patch.
Comment #3
duynguyen CreditAttribution: duynguyen commentedThis my patch
Comment #3.0
duynguyen CreditAttribution: duynguyen commentedupdte description