CMSMS 1.10.2 (but I also have the problem in earlier versions)
I am trying to add a link to a page on a site to Facebook (status update). I expect to see the page title, url, description, and thumbnails of the images from the CMSMS page.
If I do not use url rewriting, the images on the page are found by Facebook, and I see the link that I was expecting.
If I turn on any url rewriting, it doesn't work. I want to use mod_rewrite, and when I do Facebook sees the title, but not the description or thumbnails. When I run it through the Facebook Debugger, it returns the proper url and title, but the image that it looks for adds "/uploads/images/image_name.jpg" to the Pretty URL. So, instead of finding the image here:
mysite.com/uploads/images/image_name.jpg
it looks for it here:
mysite.com/pretty-url-page/uploads/images/image_name.jpg
and returns a 404.
I found that I could fix the problem by changing TinyMCE so it doesn't generate relative url's, but there are two problems with that:
1) CMSMS 1.10 ships with MicroTiny and doesn't allow for generating absolute urls
2) If I develop a site and move it, the pages have the development url hardcoded
So, my question is: is there a way I can set up the site or the config.php file so that Facebook sees the actual url for the image(s) in question? Or am I stuck using the out-of-the-box urls, or downloading/configuring TinyMCE on every site?
I know I may be comparing apples to oranges, but I don't have this problem with Joomla sites, which also use relative urls and mod_rewrite. I don't know enough about .htaccess files to figure out a potential solution, but I suspect that's where the answer lies.
Thanks!
Problem Linking PrettyURL CMSMS Pages on Facebook
Re: Problem Linking PrettyURL CMSMS Pages on Facebook
And you have <base href="http://www.your-domain.com/" /> in your <head>? It's included with {metadata} tag.
Re: Problem Linking PrettyURL CMSMS Pages on Facebook
Yes. All of the sites include the {metadata} tag, and have the <base href="http://www.your-domain.com" /> set.
Re: Problem Linking PrettyURL CMSMS Pages on Facebook
****Fixed. I thought I had a {metadata} in my template but after looking again I did not. That fixed it.****
I am running into a very similar issue. I have pretty urls turned on on a site where I also have some pages in "subdirectories" like "http://www.example.com/mobile/contact-us.htm" which I created by placing pages as children of the page "mobile".
Whenever I try to edit these pages using microTiny it changes the image url to something like "uploads/images/example.jpg". With pretty urls turned on a visitors browser will then look for the file in "http://www.example.com/[b]mobile[/b]/uploads/images/example.jpg" instead of"http://www.example.com/uploads/images/example.jpg". I would love to find a way to get this to work properly as it makes it hard to deploy a site to a client who doesn't know how to edit the html to fix the image links to be "../uploads/images/example.jpg"
I am running into a very similar issue. I have pretty urls turned on on a site where I also have some pages in "subdirectories" like "http://www.example.com/mobile/contact-us.htm" which I created by placing pages as children of the page "mobile".
Whenever I try to edit these pages using microTiny it changes the image url to something like "uploads/images/example.jpg". With pretty urls turned on a visitors browser will then look for the file in "http://www.example.com/[b]mobile[/b]/uploads/images/example.jpg" instead of"http://www.example.com/uploads/images/example.jpg". I would love to find a way to get this to work properly as it makes it hard to deploy a site to a client who doesn't know how to edit the html to fix the image links to be "../uploads/images/example.jpg"
Re: Problem Linking PrettyURL CMSMS Pages on Facebook
That's the same problem I'm having - on any page other than the home page, when using PrettyURLs and relative urls for the images, Facebook looks for the image at http://www.mysite.com/pagename/uploads/ ... e_name.jpg. I don't think it's being caused by MicroTiny, as I'm using TinyMCE in all but two sites, and the problem exists in all of them. At least with TinyMCE I can specify absolute urls, and that fixes the problem.
My question is how can I make this work while using relative urls.
I set up a clean installation - everything is on default settings (NCleanBlue template - definitely using {metadata} ) and I'm experiencing the same Facebook problem. So, I know it's (probably) not something I modified that messed it up. In fact in browsing one of those CMSMS Showcase sites, I find very few that work as I expect them to.
As I mentioned, Facebook linking works fine when I'm using Joomla with relative urls, so I'm guessing that there must be something different in the generated url that is being passed from CMSMS to Facebook, but I can't see where that is.
My question is how can I make this work while using relative urls.
I set up a clean installation - everything is on default settings (NCleanBlue template - definitely using {metadata} ) and I'm experiencing the same Facebook problem. So, I know it's (probably) not something I modified that messed it up. In fact in browsing one of those CMSMS Showcase sites, I find very few that work as I expect them to.
As I mentioned, Facebook linking works fine when I'm using Joomla with relative urls, so I'm guessing that there must be something different in the generated url that is being passed from CMSMS to Facebook, but I can't see where that is.