I know this really looks like a Facebook problem and maybe it is somehow - but it only happens when I try to drop a widget into a modX document.
PROBLEM: In Revo, and only when placed within Revo, a double slash is added for any resource URL causing the "Like" widget to return the #$%#$% "The url cannot be reached" error. I’ve tested it with a static file placed in document root and it doesn’t do it - even though this sounds like a FB problem, it’s only when I place the widget in a modX resource.
Man this is driving me nuts. I’m hoping someone can see what I’m doing wrong, been searching at poking at it for three hours (bigger stick required?).
Revo 2.0.8pl adv, CentOS server, working only in FF, everything else functions properly.
.htaccess - you will see it’s a little more efficient version of the usual.
RewriteEngine On
# both WITH and WITHOUT RewriteBase set to /
RewriteCond %{REQUEST_URI} !^\/*manager\/*$
RewriteRule ^([^.]+)$ index.php?q=$1 [L,QSA]
Base:
<base href="[[++site_url]]">
Correctly resolves to example.com/ = and yeah, slash noted. Looked everywhere for places it was possibly doubling it up, but isn’t.
FB code:
<iframe src="
http://www.facebook.com/plugins/like.php?href=[[++site_url]][[~[[*id]]]]&layout=standard&show_faces=true&width=240&action=like&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:240px; height:80px;" allowTransparency="true"></iframe>
href correctly resolves to example.com/test-page
As soon as you hit "Like" you can see the widget reports the URL as "example.com//test-page" and it returns the error.
What else I’ve tried:
Static file, to example.com/wtf.html, which of course, works just fine.
Removing base href
Encoding / as %2f
Both the iframe and the XFBML methods
A dozen other tweaks I can’t even remember
When I hit "like" Live HTTP Headers shows we’re sending the correct url, one slash for both the href and the referer (edited):
.....
href=http%3A%2F%2Fwww.example.com%2Ftest-page&node_type=link&edge_type=like&page_id&layout=standard&is_personalized=false&connect_text=0&ref&now_connected=true&post_form_id=cf54be0fbd8a20792c7116fd39156074&iframe_referer=http%3A%2F%2Fwww.example.com%2Ftest-page&scrap......
So I don’t know what’s up, anyone got any ideas where to look next?