Hi,
I am an intermediate drupal 7 user. I am within a bit of troubled water with my site now.
I have used sharethis module for my custom content type. Its working perfect. But my site is being hosted in a demo server for the time being. My site resides now in a folder within that domain and the path is similar to "mydemoserver.com/folderconsistingmysite". Whenever i share any content in social sites like FB, the link from the social site when clicked redirects to the destination site's 'page not found' page. I inspected the url and got that the url is wrong. Its printing the url like this "mydemoserver.com/folderconsistingmysite/folderconsistingmysite/content/node" . That repeated folder name in between the url is causing all the nuisance. This should have been "mydemoserver.com/folderconsistingmysite/content/node". Is there anything to be done with the $base_url?? i tried declaring it locally by removing the 'global ' keyword and defining it to be only 'http://www.mydemoserver.com' without trailing slash. But of no use. Rather my sites's images got blank after doing this. I just rolled back to default. Is this scenario gonna change once my site goes live?? I read in a thread in www.stackoverflow.com that if the site doesnot reside into root of the domain, then such wrong url might occur. What am i supposed to do now? Any help or support is highly appreciated.
Comments
Comment #1
delioni am having this exact issue. is there a fix for this or something i can take out of the code to get this to function properly?
Comment #2
sritanu commentedHi pharoh, I asked some experts about tweaking $base_url or trying out the $base_root in the module file but that's modifying the module core and is not the right approach in drupal. Still no precise solution to this have i got. Just let me know if you dig out something useful.
Comment #3
delioni was able to get it working properly after fixing the subfolder in the url issue. i had to play with both htaccess files, root and drupal directory, and the settings.php to make sure that the base_url was http://www.mysite.com instead of http://mysite.com/drupal(which is how it was setup). problem was all stemming from the $base_url
Comment #4
sritanu commentedYeah i thought the same and i had the same logic to carry on with this issue, which is actually not being an issue with the module but just that stemming problem. Your conclusion added to my confidence. Thanks.
Comment #5
vladimirausIssue was inactive for more than 9 years. Closing.
Feel free to reopen if you feel that it is still relevant. ⏳