Page 1 of 1
moving mediadata leeds to wrong url path in static pages
Posted: Thu Sep 04, 2008 8:18 am
by konus
Hello,
I had some images in the root of /uploads and moved it within the mediamanager to /uploads/sonstiges
The media manager took care of changing the paths in the pages using this images, fine.
After viewing the static page, i found out, that media manager also changed the urls of other images, which where already in the correct position. So it changed
Code: Select all
from /uploads/sonstiges/googleearth.gif
to /uploads/sonstiges/sonstiges/googleearth.gif
and this of course is not correct anymore.

Moving several images leeds to several insertion of the subdirectory in the url of other images within static pages.
Re: moving mediadata leeds to wrong url path in static pages
Posted: Thu Sep 04, 2008 11:43 am
by garvinhicking
Hi!
Could you see if the same happens to blog entries? Or are paths fixed properly in blog entries for images in the same path, but not with the same filename?
Regards,
Garvin
Posted: Fri Sep 05, 2008 2:00 pm
by konus
... I will test this tonight...
Posted: Fri Sep 05, 2008 2:54 pm
by konus
It is not exacly what you where asking for, but I just found out, that the urls in the static-page generated by event_contactform plugin are never changed during moving images within the mediamanager.
I am still testing the other pages.
Posted: Fri Sep 05, 2008 3:19 pm
by garvinhicking
Hi!
You mustn't test this especially. Everything else than usual staticpages created with the staticpage plugin and blog entries are not changed. No HTML nuggets, no other event plugins, no contact forms, guestbooks, comments.
So basically, does it work in blog entries? The code is similar, and if I know that it works in blog entries, I can try to easier find the bug.
Regards,
Garvin
Posted: Mon Sep 08, 2008 8:38 am
by konus
OK i did some tests:
preparation
I used three pages, one normal page (A) and two static pages (B and C) and inserted three gif-images (a,b,c) in page (A) and (B) and left Page (C) untouched.
Two of the images (a,b) where placed in the root media directory ("/uploads") and the third image (c) where placed in the directory "/uploads/sonstiges"
One question: Is it important for the test that all images have "<!-- s9ymdb:207 -->" because using the button for the media manager in the editor for static page (B) does not work.
execution
Now I used the mediamanager in the administration surface and moved image (a) one directory deeper from "/uploads" to "/uploads/sonstiges"
The results
The moved image (a) has a new correct url in normal page (A) and static page (B)
The url of the image (b) which is still in media root "/uploads" is mistakenly changend to "/uploads/sonstiges" in both pages (A and B) and therefore not visible anymore.
The url of the image (c) which was already in "/uploads/sonstiges" is still correct in the normal page (A)
but is changed to /"uploads/sonstiges/sonstiges" in the static page (B)!
In static page (C) which did not contain any of the images (a,b,c) but some other urls (a linked iframe) with content from "/uploads" and some images from "/uploads/sonstiges"
ALL of the urls are wrong now, because in all urls is inserted the subdir "../sonstiges/...".
OK, i am away to fix my pages now manually

I hope it helps you.
Posted: Fri Sep 12, 2008 1:18 am
by konus
Garvin, I know, you have much to do. Could you just give me a short feedback? Are my tests good enought to describe the problem?
It is not security related, should only occur in rare occasions and no data is lost. So if it is something witch is not to fix within 5 Minutes work, i suggest to postpone it now and that I submit a bug report for repairing it later?
Posted: Fri Sep 12, 2008 12:53 pm
by garvinhicking
Hi!
Yeah, your tests should be fine. However when I view at the code for moving staticpage images and blog entry images, it seems to be completely the same. I don't know why it makes a difference, but I have no time to debug this, it's very time consuming. To setup a reproduce environment and replay those things, I'd need 2-3 hours of time, which I currently do not have.
So yes, you can feel free to post this as a bug in the tracker!
Regards,
Garvin
Posted: Fri Sep 12, 2008 1:16 pm
by konus
it can be found at
sourceforge bugtrackernow