Hi, the module works just fine, thanks for that,
but i have a little issue,

I have a multilanguage site, and the url for the image should be

http://www.***.com/sites/default/files/image.jpg

but it displays

http://www.***.com/NL/sites/default/files/image.jpg

so the link to the image is broken.

Comments

ptitb’s picture

Same here!

edit: Found a short term solution.
I changed line 262 in opengraph_meta.common.inc from:

$v = url(ltrim($v,'/'), array('absolute' => TRUE));

To:

$v = $GLOBALS['base_url'] .'/'. $v;
satch5841’s picture

GREAT!!!

You saved my day! Thank you!

heyyo’s picture

I'm looking a way to synchronize my og:image across all the languages enabled of a node. Any suggestions ?

hiddentao’s picture

Is this still an issue in the latest version?

ehudash’s picture

Version: 6.x-1.5 » 6.x-1.7

Yes it is.

The fix in #1 works but is missing something - the node image selector does not show a preview of the images.
To complete the fix in #1, change line 577 in opengraph_meta.common.inc from:
$abs_path = url(ltrim($image['url'],'/'),
to:
$abs_path = url($GLOBALS['base_url'] .'/'.$image['url'],

I hope this will be committed to the next version of OG.

hachreak’s picture

Substitute line #255 in opengraph_meta.common.inc:

<?php
$v = url(ltrim($v,'/'), array('absolute' => TRUE));
?>

With this:

<?php
$v = url($GLOBALS['base_url'] .'/'.$v, array('absolute' => TRUE));
?>

it works with me! :)

bgm’s picture

Version: 6.x-1.7 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new814 bytes

Here is a patch to fix the issue (c.f. attached for proper patch):

Near line 262 of opengraph_meta.common.inc of 7.x-1.x:

-            $v = url(ltrim($v,'/'), array('absolute' => TRUE));
+            $v = file_create_url(ltrim($v,'/'));
bgm’s picture

oops, i just noticed the message on the module description that this module is deprecated in favor of 'metatag' :-)

torotil’s picture

Status: Needs review » Fixed

This should be fixed in 7.x-1.x and 7.x-2.x … using file_create_url().

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.