1. I create a category "A" 2. I create a category "B" 3. I add files to category "A" (using ftp import and regenerating links ofcourse, although that shouldn't matter) 4. I move category "A" to category "B" ("B" becomes a subcategory of "A") 5. I regenerate links again.
Now a folder is created within folder "A", called "B". However it doesn't contain any of the files of category "B". When viewing category "B" all files are listed as not present. Luckily the files are still present in the old "B" directory, so if I move the category back, the files work again.
It's really a bad idea to use the bug tree at this time, as mention in the WSN KB thread. I'll probably revise the current version to remove the option.
I wonder if renaming a directory would work when the path of it is being renamed. Edit: Ah, the php manual says it would. In edit.php, try changing if ($switches[attachmentstree] && $ourcat->name != $old->name) rename($settings->uploadpath . $old->staticpath(), $settings->uploadpath . $ourcat->staticpath()); to if ($switches[attachmentstree] && ($ourcat->name != $old->name || $ourcat->parent != $old->parent)) rename($settings->uploadpath . $old->staticpath(), $settings->uploadpath . $ourcat->staticpath());
Note: This has been included in 3.14.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Moving categories with files
Forum Regular
Usergroup: Member
Joined: Jul 01, 2003
Total Topics: 38
Total Comments: 164
Are you sure this is working correctly?
1. I create a category "A"
2. I create a category "B"
3. I add files to category "A" (using ftp import and regenerating links ofcourse, although that shouldn't matter)
4. I move category "A" to category "B" ("B" becomes a subcategory of "A")
5. I regenerate links again.
Now a folder is created within folder "A", called "B". However it doesn't contain any of the files of category "B". When viewing category "B" all files are listed as not present. Luckily the files are still present in the old "B" directory, so if I move the category back, the files work again.
Forum Regular
Usergroup: Member
Joined: Jul 01, 2003
Total Topics: 38
Total Comments: 164
This one is most annoying as it means I'm stuck with roughly 300 files on the wrong level of my tree .
Forum Regular
Usergroup: Member
Joined: Jul 01, 2003
Total Topics: 38
Total Comments: 164
Managed to work around this with the chmod script. Tnx. --> Alot lower priority now for me.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It's really a bad idea to use the bug tree at this time, as mention in the WSN KB thread. I'll probably revise the current version to remove the option.
Forum Regular
Usergroup: Member
Joined: Jul 01, 2003
Total Topics: 38
Total Comments: 164
Which WSN KB thread? (hadn't seen that one yet & can't seem to find it)
Does this mean it'll be 'removed' and then re-added in 3.20? Where does that leave everyone that's already using it?
(personally i can probably wait / get around the bugs where needed)
Forum Regular
Usergroup: Member
Joined: Jul 01, 2003
Total Topics: 38
Total Comments: 164
An alternative may be using 3.13, adding chmod.php to it, expand the functionality in chmod.php and call that thing combined 3.14.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
www.webmastersite.net/forum...orums/comments.php?id=4555
Does this mean it'll be 'removed' and then re-added in 3.20? Where does that leave everyone that's already using it?
Possibly. Leaves them using it if they insist, or reversing it.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I wonder if renaming a directory would work when the path of it is being renamed. Edit: Ah, the php manual says it would. In edit.php, try changing if ($switches[attachmentstree] && $ourcat->name != $old->name) rename($settings->uploadpath . $old->staticpath(), $settings->uploadpath . $ourcat->staticpath()); to if ($switches[attachmentstree] && ($ourcat->name != $old->name || $ourcat->parent != $old->parent)) rename($settings->uploadpath . $old->staticpath(), $settings->uploadpath . $ourcat->staticpath());
Note: This has been included in 3.14.