Open graph - domain twice in image url

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Open graph - domain twice in image url

Post by snick »

Running the open graph on two sites, one works perfectly the other one has wierd urls for the image. The domain is written twice, domain.tld/domain.tld/pathtoimage.jpg".. so the url is wrong.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open graph - domain twice in image url

Post by Jan »

Hi, try to check the configuration of both files, maybe some of them has some base url set, or there is other server settings of path, etc :idea:

Jan
If you find Phoca extensions useful, please support the project
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Re: Open graph - domain twice in image url

Post by snick »

Think I found the cause, seems if the image has an absolute url the domain name is still prepended.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open graph - domain twice in image url

Post by Jan »

Hmm, in the plugin code, there is no feature which somehow change or repair or add or remove the image path :idea:
If you find Phoca extensions useful, please support the project
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Re: Open graph - domain twice in image url

Post by snick »

Not sure I understand you? Do you mean there is no way to check if its an absolute path (starting with http://)?
On the two sites mentioned above one used images with relative urls and had no problems, while the other one had absolute urls and then the domain is written twice.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open graph - domain twice in image url

Post by Jan »

Hi, the problem is, the plugin does not set the path, it just take the information form Joomla! and its settings - and after it gets such information, it will use it. And what I have written above, means, that if it gets such information, it does not manipulate it, it just uses it (means there is no code to somehow add other part to path or change it, or similar) :idea:
If you find Phoca extensions useful, please support the project
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Re: Open graph - domain twice in image url

Post by snick »

I see, so Joomla has a call that returns the first image?
Then it seems like a joomla-bug
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Re: Open graph - domain twice in image url

Post by snick »

Still having the same problem, when image has relative path all ok. When image has full path, double domain..?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open graph - domain twice in image url

Post by Jan »

Hi, hmm, then the code needs to be somehow customized, to discover if it includes double path and when yes, then to remove one of them :idea:

Jan
If you find Phoca extensions useful, please support the project
snick
Phoca Member
Phoca Member
Posts: 10
Joined: 12 Jun 2014, 00:00

Re: Open graph - domain twice in image url

Post by snick »

Yes, thatdbe grreat.
I did try another og plugin and it has the exact same problem. So I guess its a Joomla issue, worth reporting?
Post Reply