Nico Knoll Posted March 19, 2014 Share Posted March 19, 2014 Hey, it's always the same: I'm builing a local version of a webseite using TinyMCE fields in the backend with images etc. But after uploading to the live server the relative path to images and pages change (of course). It would be lovely to have a module or a function to refresh this relative paths in TinyMCE / textareas What do you guys think? / Nico Link to comment Share on other sites More sharing options...
Nico Knoll Posted March 19, 2014 Author Share Posted March 19, 2014 A good approch would be to store the installation path somewhere and when you load the admin path to compare it (maybe automatically) to the actual path. If the path is changed you could show a note "The path has changed - check for broken links?" directing to a page where you see all broken links with possible - working - fixes and a way to manually update them Maybe only check after login like this "the password-system is updated bla bla" note in 2.3 Link to comment Share on other sites More sharing options...
Soma Posted March 19, 2014 Share Posted March 19, 2014 If you set the textarea to content type html, in the field settings, PW will take care of it. If you set the textarea to content type html, in the field settings, PW will take care of it. 2 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 19, 2014 Share Posted March 19, 2014 What do you guys think? I always develop on the same directory level as the site would be when live, so never had to deal with those issues. Every new site has it's own vhost. 3 Link to comment Share on other sites More sharing options...
SiNNuT Posted March 19, 2014 Share Posted March 19, 2014 I always develop on the same directory level as the site would be when live, so never had to deal with those issues. Every new site has it's own vhost. Yep, been doing this for a while now as well, and never looked back. It just saves you a lot of headaches. Link to comment Share on other sites More sharing options...
Nico Knoll Posted March 19, 2014 Author Share Posted March 19, 2014 But how do you do this? I mean for example if I'm building a site locally I've got a url like "localhost/example/" and after uploading the path changes to "/" respectively "http://example.com/" ? Link to comment Share on other sites More sharing options...
Soma Posted March 19, 2014 Share Posted March 19, 2014 I don't do this, PW does this. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeTextarea.module#L114 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 19, 2014 Share Posted March 19, 2014 I will do that URLs at my local environment look like: http://processwire/ http://domainname/ http://testsite/ Here's some content what may help 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted March 19, 2014 Author Share Posted March 19, 2014 @Soma: Sorry for the misunderstanding - I really meant the local domain thing Martijn described @Martijn: I use XAMPP for developing so I guess I just have to change the hostname table, haven't I? And btw. it's "private/etc/hosts" on mac Link to comment Share on other sites More sharing options...
SiNNuT Posted March 19, 2014 Share Posted March 19, 2014 Indeed, you have to setup apache vhosts and your OS hosts file to match. 2 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 19, 2014 Share Posted March 19, 2014 And btw. it's "private/etc/hosts" on mac It is, but I don't know any mac where you can't access it directly. (alias) in the hosts file you bind the name to the host. the vHosts should pick it up. ( look for servername ) Link to comment Share on other sites More sharing options...
Nico Knoll Posted March 19, 2014 Author Share Posted March 19, 2014 Ahhhh I got it. Now I've got "clients.dev" etc. running 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted March 19, 2014 Author Share Posted March 19, 2014 Combined with the lovely theme made by renobird: 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now