Home Download Buy Blog Forum Support

SideBarEnhancements Project URL not working?

SideBarEnhancements Project URL not working?

Postby ausprog on Mon Nov 19, 2012 3:26 am

Hi,
I followed a tutsplus guide on getting started with ST2 and one of the points made was being able to launch a file via the actual server url (http), rather than the file directory (file://), straight from ST2 so php scripts and such will work.

The method taught (the old 'way' i beleive) was to add:

Code: Select all
"url" : "http://urlhere"

to the top of the ST2 project file, however this hasn't worked, so i did some looking and found this thread here: viewtopic.php?f=2&t=9381

It says the method changed, and now I'm supposed to go to Project>Edit preview URLS (after right clicking a file on the sidebar) and enter the following:

Code: Select all
{
   "/C/Users/dev/Documents/My Web Sites/Regular Dev/AdvancedWebDevelopmentPractical" :
   {
      "url_testing": "http://localhost:24630/AdvancedWebDevelopmentPractical/",
      "url_production": "http://localhost:24630/AdvancedWebDevelopmentPractical/"
   }
}


I added that, and it still wants to open the browser to the directory location of the file, rather than the server URL (in other words it still opens the file via the file:// path, rather than http://)

I can only imagine i interpreted the instructions incorrectly, though i don't know what else to do now. My only thought is that they didn't specify what is suppose to be contained in the directory prior to the listed urls, and i could have this wrong.

Can anyone spot anything wrong with that code. It's the exact code I've entered into the SidebarEnhancements.json file.
Note that my F12 hotkey won't launch anything at all (suppose to trigger the url_testing), however alt+F12 works as well as ctrl+o (which was a hotkey used in the tutorial i was following).

Be great if someone has an idea.
Thanks.
ausprog
 
Posts: 13
Joined: Sun Oct 14, 2012 7:58 am

Re: SideBarEnhancements Project URL not working?

Postby dabvid on Mon Nov 19, 2012 11:00 am

I followed the same guide as TC with the same result.
My project settings looks like this:
{
"url": "http://localhost:8888/mySite/",
"url_production": "http://www.mySite.com/",
"folders":
[
{
"path": "/Users/me/mySites/mySite"
}
]
}
dabvid
 
Posts: 1
Joined: Mon Nov 19, 2012 10:55 am

Re: SideBarEnhancements Project URL not working?

Postby tito on Mon Nov 19, 2012 11:18 pm

Hello

{
"/C/Users/dev/Documents/My Web Sites/Regular Dev/AdvancedWebDevelopmentPractical" :
{
"url_testing": "http://localhost:24630/AdvancedWebDevelopmentPractical/",
"url_production": "http://localhost:24630/AdvancedWebDevelopmentPractical/"
}
}


I added that, and it still wants to open the browser to the directory location of the file, rather than the server URL (in other words it still opens the file via the file:// path, rather than http://)


Instead of

/C/.........

Use

C:/........

Regards
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 706
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: SideBarEnhancements Project URL not working?

Postby ausprog on Mon Nov 19, 2012 11:35 pm

tito wrote:Hello

{
"/C/Users/dev/Documents/My Web Sites/Regular Dev/AdvancedWebDevelopmentPractical" :
{
"url_testing": "http://localhost:24630/AdvancedWebDevelopmentPractical/",
"url_production": "http://localhost:24630/AdvancedWebDevelopmentPractical/"
}
}


I added that, and it still wants to open the browser to the directory location of the file, rather than the server URL (in other words it still opens the file via the file:// path, rather than http://)


Instead of

/C/.........

Use

C:/........

Regards


That fixed it!
Thanks for your help, for some reason ST2 wanted to keep the file directories as "/C/..." rather than "C:/".
Interestingly the project will show up file if the directory starts with either, however the browser will only launch the file correctly @ http:// if its the latter. Maybe a bug or unintended operation of ST2 / the plugin, given its pickiness. Eitherway its fixed. Thanks again kind sir.
ausprog
 
Posts: 13
Joined: Sun Oct 14, 2012 7:58 am


Return to Technical Support

Who is online

Users browsing this forum: Majestic-12 [Bot], Yahoo [Bot] and 24 guests

cron