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.
Hello!
I want to use fb social like button for views and I have a problem. After making the view, the like button appears, but it doesn't link to the right place. It should link to mysite.com/content/1, and instead of this it points to mysite.com/1.
What can be the problem?
Thanks!
Comments
Comment #1
Oscar Illada CreditAttribution: Oscar Illada commentedSame problem !!!!!!
Comment #2
ferdi CreditAttribution: ferdi commentedFixed, http://drupal.org/cvs?commit=473098 . thanks!
Comment #3
gloomcheng CreditAttribution: gloomcheng commentedAccording reply #2, I guess that update fb social module to version 6.x-1.0-beta6 could solve like button URL error which generate by views field.
But after I upgrade, I encountered things worse, the fb like button could not appear. So I down version to 6.x-1.0-beta5 and try to hack the module.
I found the problem is in line 70 in fb_social/modules/fb_social_like/views/fb_social_like_handler_field_like.inc file, the source code is:
We need to change to:
You will get the correct URL with alias finally.
Comment #4
darthf1 CreditAttribution: darthf1 commentedi can confirm the above post. FB Social had some weird behaviour in views, but after changing the code it was fixed for me. Maybe it is better to use "drupal_get_alias" instead of "fb_social_url"?