Incorrect image paths after moving the blog

Found a bug? Tell us!!
Post Reply
ksr
Posts: 3
Joined: Mon Apr 10, 2006 7:50 pm

Incorrect image paths after moving the blog

Post by ksr »

I can't tell if it really is a bug, but it sure makes my life as a blog administrator harder:

I closed the domain that I used for installation of a blog. Now I use a different Domain which points to the same webspace. I changed paths in order to fit to the new home of the blog. Text and everything works fine - yet all images in postings still point to the old path - containing the old domain. That means they are not displayed.

Is there a way to change paths of images in Postings to relatively?

Or:

How can I update all the paths to images in old postings to fit to the new domain?

Cheers,
Karsten
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

try the option:

rebuild thumbs in the admin panel.

This will update image paths of all images found in the uploads folder and subfolders within
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

BTW; usually full paths (with http://...) should not find their way into entries! IF they do, it would be a WYSIWYG editor messing things up). Serendipity itself only emits path structures.

As RobA mentioned, there is no feature for this yes. But I'm actually working on that for 1.1 right now on this!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ksr
Posts: 3
Joined: Mon Apr 10, 2006 7:50 pm

Post by ksr »

RobA wrote: Or, perhaps the easiest, export the full entries table with a sql admin tool (and static pages if required) and then do a search and replace with your favourite text editor/command line tool then delete the table contents and input the data back in.

-Rob A>
This is what worked for me. 5 Minutes Time and all images were visible again. Thanks a lot!
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

you do have deleted the old content then right? or is everything double now :)
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
ksr
Posts: 3
Joined: Mon Apr 10, 2006 7:50 pm

Post by ksr »

SHRIKEE wrote:you do have deleted the old content then right? or is everything double now :)
Right.
  • 1 export entries table
    2 save it for backup
    3 edit paths. Paths were absolute, not relative which I don't quite understand since I run another blog with the same version of serendipity which uses relative paths
    4. import altered table
    5. Ta-daaah
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

im jus asking...

because in phpmyadmin an export does not delete your content (atleast not for me) :) so when you export it. and then import the altered data it actually adds it to the existend posts. resulting in having everything double.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
Post Reply