Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
images are stuck in the localhost path
i found a thread similar to this but didn’t answer the question, just recommends you setup your localhost to mimick the online server.
i made something on the localhost, and when i moved to a live site, all the images are giving the path localhost/mysite/images
in txp admin, the site root is set properly, and then the image directory is just “images” how it should be.
anyone had this problem before?
Offline
Re: images are stuck in the localhost path
Have you made sure you’ve specified the right paths in your page and form templates. It’s good practice to use txp:site_url in your paths so that when you upload and change the admin settings the paths in your source code change accordingly. Similarly try to use relative paths in background images in your css.
smd_where_used can help you track down any last instances but won’t check your css. The network pane in the firebug plugin for firefox can help you track down the paths of images that won’t load.
i found a thread similar to this but didn’t answer the question, just recommends you setup your localhost to mimick the online server.
Doing this – especially setting up virtual hosts with their own development domain address – does indeed avoid some problems, particularly if you’re working out of subfolders on your localhost as you don’t need to be so careful with paths.
TXP Builders – finely-crafted code, design and txp
Offline
Re: images are stuck in the localhost path
well i’m not really handcoding images in to the page templates, i’m more referring to images that i’ve uploaded in the tab. will hang on to that smd_where_used plugin though.
if i set up virtual hosts, i don’t know if it will solve the problem though cause eventually the site will move to another location which will be its final destination.
Offline
#4 2008-12-26 00:30:28
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: images are stuck in the localhost path
Is this about images in articles? Might be related to this subject.
Offline