-
AuthorPosts
-
jwellman Friend
jwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 5, 2012 at 1:26 pm #466251<em>@arucardx 337131 wrote:</em><blockquote>Sorry for the late reply. Was too busy fixing my own site that I forgot about this. Anyway, I found the link to your site so was able to run it through facebook debugger.
Your problem is very simple actually. The reason why facebook is unable to grab the thumbnail is because the image url it’s picking up is wrong. http://www.yourdomain.com/http://yourdomain.com/images/Blooms/Flowers/flowers_crate.jpg
I removed your domain name in case you wanted to keep it private. As for the fix to that, I need to first figure out what causes it and how Joomla generate that first image. If you were using K2, this would be easy but still doesn’t matter. Give me some time to look at your site in more details and I’ll try to get back with a solution.</blockquote>
Thanks for looking arucardx. It’s odd because I even tried to hard code it in the editor (versus using the Joomla features) and it still won’t work.Despite the few glitches I’ve had, I really love Wall. I can’t wait until they bring out more features.
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 5, 2012 at 1:46 pm #466252ok I think the problem lies with this code in jalazyload.php
[PHP] //allow max $sharelimit items
if($shareCount < $sharelimit){
$shares[] = $fullPath . $orgSrc;
$shareCount++;
}[/PHP]My guess is, you can try changing it to this. Then see what’s the generated og tag afterwards.
[PHP] //allow max $sharelimit items
if($shareCount < $sharelimit){
$shares[] = $orgSrc;
$shareCount++;
}[/PHP]1 user says Thank You to arucardx for this useful post
jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 5, 2012 at 2:35 pm #466255If I am in the right location (??) plugins/system/jalazyloader/ – I changed the following but it is still not working. Now it doesn’t give the option to even choose a thumbnail. Maybe it’s a cache issue or Chrome. Can you try pasting this article to Facebook to see what if it works for you? (Click Here)
//allow max $sharelimit items
if($shareCount < $sharelimit){
$shares[] = $fullPath . $orgSrc;
$shareCount++;
}
Changed to://allow max $sharelimit items
if($shareCount < $sharelimit){
$shares[] = $orgSrc;
$shareCount++;
}arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 5, 2012 at 2:47 pm #466256Facebook has a cache so it’s rather annoying to debug this. I have passed the link to the debugger and it has reindex the image for that link
But from what I can see, you have disabled lazyload on your site.
1 user says Thank You to arucardx for this useful post
jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 5, 2012 at 2:47 pm #466257<em>@jwellman 337138 wrote:</em><blockquote>If I am in the right location (??) plugins/system/jalazyloader/ – I changed the following but it is still not working. Now it doesn’t give the option to even choose a thumbnail. Maybe it’s a cache issue or Chrome. Can you try pasting this article to Facebook to see what if it works for you? (Click Here)</blockquote>
I thought I would try one more time and now it’s working!!! Let me go try another article to double check.jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 5, 2012 at 2:59 pm #466259<em>@arucardx 337140 wrote:</em><blockquote>Facebook has a cache so it’s rather annoying to debug this. I have passed the link to the debugger and it has reindex the image for that link
But from what I can see, you have disabled lazyload on your site.</blockquote>
No, I haven’t disabled it.I just inserted another image into an article (other than the one I linked above) and so far it’s not working. I’ll try it in a few minutes because I agree… I think it’s the cache on Facebook. The album feature is not made by JA so I can live with the fact that it’s not allowing me to choose one of those thumbnails, but I would like it to at least give me the option to post my article images.
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 6, 2012 at 7:02 am #466311Hi jwellman,
After looking at the code in more details, I realize that a mistake was made in lazyload which means that it weren’t working with facebook in the first place. Remove the code modification I suggested earlier and set the intro image as per normal without embedding it in the article. From the code, it only looks like lazyload is generating the meta properties from intro images, not sure if it works for embedded images but my guess is no.
Open up jalazyload.php and look for this code.
[PHP] if($shareCount > 0){
$sharesHtml = ”;
foreach($shares as $shareImg){
$sharesHtml .= ‘<meta name=”og:image” content=”‘ . $shareImg . ‘” />’ . “n”;
}
$body = str_replace (‘</head>’, $sharesHtml . ‘</head>’, $body);
}[/PHP]Replace it with this
[PHP][PHP] if($shareCount > 0){
$sharesHtml = ”;
foreach($shares as $shareImg){
$sharesHtml .= ‘<meta property=”og:image” content=”‘ . $shareImg . ‘” />’ . “n”;
}
$body = str_replace (‘</head>’, $sharesHtml . ‘</head>’, $body);
}[/PHP][/PHP]Now facebook will index the images properly. Facebook cache last for about 24 – 48 hours, a quick way to test it is to create a new article or just change the alias of the article if using SEF url. It will cause facebook to treat it as a new link.
1 user says Thank You to arucardx for this useful post
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 6, 2012 at 7:34 am #466319Opps, seems there’s an extra [PHP] forum tag in code i embedded above. This is the correct one.
[PHP] if($shareCount > 0){
$sharesHtml = ”;
foreach($shares as $shareImg){
$sharesHtml .= ‘<meta property=”og:image” content=”‘ . $shareImg . ‘” />’ . “n”;
}
$body = str_replace (‘</head>’, $sharesHtml . ‘</head>’, $body);
} [/PHP]1 user says Thank You to arucardx for this useful post
jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 6, 2012 at 2:12 pm #466371<em>@arucardx 337211 wrote:</em><blockquote>Opps, seems there’s an extra [PHP] forum tag in code i embedded above. This is the correct one.
[PHP] if($shareCount > 0){
$sharesHtml = ”;
foreach($shares as $shareImg){
$sharesHtml .= ‘<meta property=”og:image” content=”‘ . $shareImg . ‘” />’ . “n”;
}
$body = str_replace (‘</head>’, $sharesHtml . ‘</head>’, $body);
} [/PHP]</blockquote>
IT IS WORKING!!!!!!! You are a PHP genius! :-*You are awesome!!!!! Thank you, thank you!!!
P.S. It’s even picking up the photo gallery now!!!!! Woot!!!!
jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 6, 2012 at 2:46 pm #466375I lied… it won’t let me choose the gallery images, but that’s okay. It’s not a JA product so it’s not a concern, but for some strange reason if the images are in a category (like this one) it won’t work at all.
Overall, it fixed single article images so that’s better than it was before!
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 6, 2012 at 3:08 pm #466379Ah… didn’t know lazyload create og tags for category links as well. Anyway, I look at the source code of your page and I see that all the og tags are being generated properly. The facebook debugger is able to phase all the images from that link you just posted and your gallery as well.
But I noted that there is some problem when sharing the link(especially with multiple images) to facebook. Somehow the images indexing doesn’t work when it’s shared that way but when phasing with the debugger, it works. So far, I’m not too sure what the problem is but if I’m not mistaken, it’s because of a double slash in the og:image’s url.
<meta property=”og:image” content=”http://yourdomain.com//cache/widgetkit/gallery/6/10_5_11_Izzy-cc576007bf.jpg” />
The reason why that double slash happen is because the url is combined this way.
http://yourdomain.com/ + /cache/widgetkit/gallery/6/10_5_11_Izzy-cc576007bf.jpg which result in double slash.Which is actually caused by the use of JURI::base() which needs to be changed to .substr(JURI::root(),0,-1).str_replace(JURI::root(true) but I have no idea how to get that working cause it keep returning an error. I have submitted a ticket to support regarding this problem as well as the previous fix. Hopefully that will fix the indexing problem on links with multiple og:image tags. If there is just 1 og:image tag, facebook is able to index the page properly.
1 user says Thank You to arucardx for this useful post
jwellman Friendjwellman
- Join date:
- April 2008
- Posts:
- 543
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 115
- Thanked:
- 59 times in 21 posts
September 6, 2012 at 3:21 pm #466382Makes perfect sense arucardx! Thank you for all your hard work. I’m just happy I’m getting a few of them to go through!
September 9, 2012 at 9:25 am #466521I haven’t found the solution for my site yet
www. faidatehobby. it
Sharing articles’ url on Pinterest and Google+ it doesn’t show any thumbnail…:((
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
September 9, 2012 at 9:43 am #466522Looking at your site, you have no meta name:image defined and your og:image is still meta name instead of meta property. Please refer to my previous post for the solution to fix your issue.
http://www.joomlart.com/forums/topic/image-issues/#post-466311
http://www.joomlart.com/forums/topic/image-issues/#post-466319Without any meta defined, there’s no way to index the correct image with lazyload enabled due to some very disappointing work about being used to fix this jalazyload & social thumbnail problem. I should point out that there’s no way to fix rss image as well, so remember to disable your rss image if using jalazyload.
If you look at other 3rd party joomla lazyload plugin and wordpress lazyload plugin, their lazyload script is disabled upon detection of social sharing & rss feed thus no indexing problem there. Which should be the proper way to fix this as well as was my original request along with example but instead the implementation of og tags were used instead. So now it works 50% here(for sites that supports opengraph), and doesn’t work 50% there(for sites that doesn’t support opengraph). *shurge*
1 user says Thank You to arucardx for this useful post
September 9, 2012 at 11:30 am #466528Yeah, it works! 😀
Actually that 50% is more than sufficient.
Thanks so much! -
AuthorPosts
This topic contains 30 replies, has 5 voices, and was last updated by Roberto Sala 12 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum