Closed (won't fix)
Project:
Open Graph meta tags
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2010 at 11:18 UTC
Updated:
10 Jul 2015 at 16:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hiddentao commentedIs this still an issue?
Comment #2
el_reverend commentedHello Hiddentao,
Yes, it is. I am using a custom CCK image field and in-body images in my nodes. The image used in the CCK field is properly seen by the module, however the images listed in the body of the node are not.
Looking at the HTML source it renders the img tag like this:
It seems to be related to the img tag in the opengraph_meta on one line 119. Why is the $path recorded differently than $abs_path used in the beginning of the img tag?
After a bit of trial and error it seems that the in-body images load after altering the line like this:
BUT does not load the image referenced in the CCK imagefield now since it's missing a part of it's URL (see attached images).
Can we process the URL and remove the leading '\' and add that as needed to the actual img tag?
Comment #3
timmetj commentedI also found this problem..
In my case it worked on a multilanguage website using domains.. But now it doesnt seem to work on multilang website using Prefix..
So when you go and look in the HEAD of the source, you'll see something like:
meta content="http://website/nl/sites/default/files/image.png" property="og:image">
And it should be:
meta content="http://website/sites/default/files/image.png" property="og:image">
It may not add the language prefix in its src..
Also in the node edit itself (like mentioned above) the image src also shows "nl/sites/default/files/image.png" instead of "(/)sites/default/files/image.png".
But has this something to do with the language plugin? Cause i use this same module on another site with domain switching instead of prefix, and there the image src shows the full url, not the path: "http://website/sites/default/files/image.png" And on this other site then, it only shows the path.
Comment #4
maciej.zgadzaj commentedI had similar problems as well.
What fixed it for me, and so far seems to be working well, is adding call to file_create_url() in _extract_image_fields_from_node() in opengraph_meta.common.inc.
Diff attached.
Comment #5
hiddentao commentedThanks for the patch. Will take a look at this.
Comment #6
pribeh commentedThe patch in #4 doesn't seem to resolve the issue for me.
Comment #7
maciej.zgadzaj commented@pribeh - perhaps. By no means I wanted to say that this is panacea for the issue in question. I had one very specific problem in one very specific place (which seemed to be at least very similar) and this patch resolved it for me. I have not conducted though any extensive testing using different installs/scenarios to be able to say that this is an ultimate fix. Just decided to share my solution in case it would work for someone else too.
Comment #8
pribeh commented#maciej.zgadzai, I still thank you for your efforts. I just wanted to report that it did not resolve my issues in regards to CCK imagefields not being picked up. I'm noticing that it is picking up some of them but only of course after I choose which image for it to pick up and then only some of the time. The website in question that I have open graph tags installed and setup on is here: http://londonfuse.ca/
Comment #9
weri commentedThe description #3 describes the problem correctly. On multilingual sites, the language prefix is added with the url() function. Instead the function file_create_url() should be used. See the attached patch.
Comment #10
hiddentao commentedDoes the patch in #9 by @weri work for people?
Comment #11
claudiu.cristea#9 works as expected. RTBC!
Comment #12
claudiu.cristea#1332154: Thumbnail and i18n is duplicating this.
Comment #13
maciej.zgadzaj commentedAttached patch for version 1.7. (Hopefully no-one minds changing issue version to the most recent stable one?)
Comment #14
maciej.zgadzaj commented...and promised attachment. ;)
Comment #15
torotil commentedHi,
I'm the new maintainer of opengraph_meta. Sorry for the long silence in the issue queue.
Sadly I don't have the resources to care for the Drupal 6 version. Unless and until someone steps up to maintain it I'm therefore closing all D6 issues as WONTFIX.
Feel free to re-open the issue if it is still valid in one of the Drupal 7 branches.
Thanks!
Comment #16
torotil commentedHi,
I'm the new maintainer of opengraph_meta. Sorry for the long silence in the issue queue.
Sadly I don't have the resources to care for the Drupal 6 version. Unless and until someone steps up to maintain it I'm therefore closing all D6 issues as WONTFIX.
Feel free to re-open the issue if it is still valid in one of the Drupal 7 branches.
Thanks!