Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-17 18:14:45

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Broken link to images when moving live site to local server

Hi!

I have just moved my live textpattern-site to a local server, using the method posted on Wion Design.

It all seems to work well expect for the images; they dont show. The path to the images-folder is wrong ( localhost/images instead of localhost/mysite/images ). I have tried changing the img_dir in the preferences, but the path to the images is still the same when I view the site in Safari.

Here´s my diagnostic, hope someone out there have a solution to my problem:

Textpattern version: 4.0.2 (r1076)
last_update: 2005-12-17 16:13:26/2005-11-01 14:01:30
Dokumentroden: /Applications/MAMP/htdocs
$path_to_site: /Applications/MAMP/htdocs/textpattern_live
Textpattern sti: /Applications/MAMP/htdocs/textpattern_live/textpattern
Permanent link: messy
upload_tmp_dir: /Applications/MAMP/tmp/php
Midlertidig mappe: /Applications/MAMP/htdocs/textpattern_live/textpattern/tmp
Site URL: localhost:8888/textpattern_live
PHP version: 4.4.0
server_time: 2005-12-17 19:12:52
MySQL: 4.1.12
Lokal: en_GB
Server: Apache/2.0.54 (Unix) PHP/4.4.0 DAV/2
Apache version: Apache/2.0.54 (Unix) PHP/4.4.0 DAV/2


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

#2 2005-12-17 21:31:59

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Broken link to images when moving live site to local server

It all seems to work well expect for the images; they dont show.

Which images? How are you linking to them?


Alex

Offline

#3 2005-12-17 22:23:17

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Re: Broken link to images when moving live site to local server

It is all the images for the front-end part of the site, I have uploaded all of them to my site via txps images-tab – so the links should be relative and thus also work on my local server, or so I would think.


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

#4 2005-12-17 22:38:47

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Broken link to images when moving live site to local server

Are these CSS images?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-12-17 23:24:06

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Re: Broken link to images when moving live site to local server

It is all the images, the CSS-background-images, the ones I’ve used in the page-template and the ones I’ve used in my posts. Here is a screendump of the whole affair, the CSS is also dancing around a bit, I dont know what that is all about. I am newbie so it could be some banal thing that is wrong.


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

#6 2005-12-17 23:36:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Broken link to images when moving live site to local server

Okay, and how are you linking to your images in your CSS and pages?

Last edited by Mary (2005-12-17 23:36:21)

Offline

#7 2005-12-18 00:00:22

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Re: Broken link to images when moving live site to local server

I am using relative links that points to the images-folder.


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

#8 2005-12-18 01:03:29

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Broken link to images when moving live site to local server

I am using relative links that points to the images-folder.

Please be specific, show us some examples. Relative links in what – HTML tags, Textpattern tags, textile, articles, forms, page templates? And, relative to what?


Alex

Offline

#9 2005-12-18 16:09:45

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Re: Broken link to images when moving live site to local server

Sorry, I’ll try to be a bit more specific:

Here is an image that i use in the page-template:
<code><img id=“masthead” src=”/images/21.jpg” alt=“Sukkerspray” /></code>

When I use images in posts i use Textile:
<code>!/images/28.jpg (Koncertharpe)!</code>

And this is how I link images in the CSS via the style-tab:
<code>background-image:url(/images/19.jpg); </code>

I have textpattern installed in my public.html-folder, so the links should point to the images-folder in the root of public.html. When I copy the site to my local server it should point to the same images-folder on my local server.

I redid the whole process again this afternoon, except that I didnt update textpattern to the latest revision after I had moved the site. Now I can see the images that are included in the CSS, but none of the other images.

Last edited by timkl (2005-12-18 16:20:09)


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

#10 2005-12-18 21:53:37

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Broken link to images when moving live site to local server

The paths you’re using are absolute, not relative – a relative path would look like <img src="images/21.jpg" /> (which has its own problems). All of those examples point to http://yoursite.com/images/21.jpg or similar. That’s not a Textpattern problem, it’s the way you’ve written the links.

If you’re linking to images by number, try the txp:image tag.

Textpattern 4.0.2 includes a second tag, <txp:img />, that will link to an image relative to the Textpattern root – e.g. <txp:img src="images/21.jpg" />.


Alex

Offline

#11 2005-12-18 22:43:20

timkl
Member
From: Copenhagen
Registered: 2005-10-09
Posts: 12
Website

Re: Broken link to images when moving live site to local server

I removed the slash and now it all works! Didn’t think the slash meant anything.

Thank you for helping out a newbie : )


Podcaster, webdesigner, stencilist, libertarian, soccer fan, atheist, dreamer of dreams

Offline

Board footer

Powered by FluxBB