Loading...
 
Features / Usability

Features / Usability


relative images path and importing dumps

posts: 4 France

Hi,

I want to be able to move my tiki around whenever needed (change its place on the filesystem of the server, or even to move it on another server and hence to change its network address).
Unfortunately, I just noticed that every images paths are stored as absolute URLs in the database, so that when I move the tiki directory on the filesystem, every images links are broken.

I thought that using the export/import feature would be useful in order not to lose the images, but the images path just keep the same across this operation.

Is there a way to move an entire site without losing every images ?

Thanks in advance for your answers.
Sorry if I missed something to do it right, but I search the whole afternoon to find a solution without success.

posts: 224 Ireland

What tables are you talking about? I just had a look at the tiki_images and tiki_images_data tables and I see no hardcoded paths?

Regards,

Pat.


posts: 4 France

Thanks for the quick answer.

I'm talking about the data field in the tiki_pages table.
Every images are referenced this way :
img src="http://my.address.com/path/to/tikiwiki/show_image?id=21"

What I'd like to get is this :
img src="path/to/tikiwiki/show_image?id=21"

but these references being automatically generated when saving a page, I don't know how to get around.

Regards,
Seb.


posts: 224 Ireland

Okay so you are talking about the wiki pages. Yes it seems you are right. Currently I don't think there is any other way than hack the data in the 'tiki_pages' table. This is not necessarily as difficult as it sounds. What you could do is export the table and run a script against it (e.g. an awk script) that changes all path references; then re-upload your changed data in the table.

Regards,

Pat.


posts: 4 France

As a last resort, I was thinking of an UPDATE sql request, but your solution sounds a lot more practical.

Thanks for your attention.

Regards.


posts: 224 Ireland

Good luck with the conversion!

Regards,

Pat.