2 amoun Jun 19, 2018 18:12

If the photos were stored in the media folder of the collection you deleted, then yes it is normal that they were deleted along with it.
There is a message that says so.
This is done so that people don't end up with huge unused folders on their web hosting accounts.
If the photos were stored in the media folder of the collection you deleted, then yes it is normal that they were deleted along with it.
François, may be you missed the fact that I changed the name of the url to "images" instead of "photos". I thought that it means that the new default dir would be "images" NOT "photos" ! there is at least an ambiguity in the process... If not a bug.
If the "normal" behavior of b2 is to link any new photoblog to the dir "photos" whatever the settings choosen by the user, then it is a real problem ! Think : if you just want to try a new photo blog, then you never can delete it unless you loose all your media/photo files :(
regards.
Jacques
Maybe you linked your new site to the old media files and if they were therefore still in the original directory, you deleted them when you dumped the new collection. Scary!
It's a bit late now but the back office does say where the media files for each collection is stored.
@lefataliste
Hi again
I've created and deleted many collections without problems with the media files.
I'm using 6.10.1 to try and replicate your issue.
The problem I have is that no /media/blogs/photos/ was created for the first 'Photo Blog' so how such a folder existed I don't know unless you created it, or there is an error in it's omission. But when I created one by ftp manually and then deleted the collection it did remove the manually created folder.
So something is bit odd with the fact that no /media/blogs/photos/ was created in the first place and somehow you must have conflicted the names in creation and thereby deleted the folder with your content.
Well that's some ideas ??
I am not in front of a computer and cannot test this right now but if someone could try to reproduce this it would be great:
(We’ll test that if you no one else does but I can’t say exactly when)
@lefataliste
Hi again
I've created and deleted many collections without problems with the media files.
I'm using 6.10.1 to try and replicate your issue.
[...] So something is bit odd with the fact that no /media/blogs/photos/ was created in the first place and somehow you must have conflicted the names in creation and thereby deleted the folder with your content.
I shall try to reproduce what I did as François sugests. But this will not be in the next hours since I'm engaged in another urgent job.
Thanks again. I'll come back to this a little bit later on.
regards.
Jacques
The problem is not quite as you imagine and I stated earlier.
At some point it seems you created a /media/blogs/photos/ which is recorded in the database.
5b/ as there was already a folder called photos,b2evo offered you /photos-1/
If the folder was created by ftp then as there would be no record it would have offered /photos/ which as I have mentioned doesn't get created.
I created a folder /media/blogs/photos/ by ftp
I created two collections with the same name Photos.
The first automatically used the URL Photos, which would NOT have been made if I didn't do it by ftp.
The second prompted a new URL as /photos-1/ which I accepted.
I then received a message that the files had been moved (first image)
The /media/blogs/photos/ I made by FTP has either been deleted or my likely the file name changed.
There is now no /media/blogs/photos/
So
The /media/blogs/photos/ was deleted ???? but I have two collections called Photos but only one /media/blogs/photos-1/
So if I delete the second collection I will delete all the files that have now been moved
@lefataliste It should be impossible to create a new blog using URL filename photos
if it's already in use by another collection. See screenshot below.
I don't understand how you can link 2 collections to the photos
media dir.
Are you running on Windows or some OS using non case sensitive filenames and maybe you have Photos
vs photos
?
@fplanque
yes this is what I have said in post #9 'Can not create a second collection called one whilst there is a media folder still called one'
but when creating a collection with an identical name, and having to use a new name for the media folder, b2evo changes the name of the original media file to the new name, so the original collection has no media folder. If you then delete the new collection, which has the same name as the original you delete the original media folder as it has been renamed to the new.
This only happens with a 'Photos' collection if I make a media folder 'photos', the second being named 'photos-1' as b2evo dosen't make the initial 'photos' folder.
Even if I use different case Photos or photos for the media the folder name is overwritten by photos-1 when I make a second collection called Photos
@lefataliste wrote earlier:
François, I wanted to test that.
1/ Site
2/ new collection
3/ Gallery
4/ select bootstrap gallery skin
5/ In the param page
a/ create empty collection
b/ I'm proposed with Title = Photos ; Short name = Photos ; "File name" URL = photos-1
c/ I want to keep "Photos" as the title
d/ I try "one" as the short name => this puts "one" in the url
e/ I try to keep "Photos" as short name => this puts "photos" in the url
f/ I revert to "one"
g/ I validate and get an error message saying that something was already in use (I'm sorry but I did not capture the message)
h/ RESULT => ALL MY FILES IN THE photos SUBDIR LOST AGAIN!
grrrr
I could not quickly reproduce this but we will check again.
Hello @lefataliste, you are right, it was a bug, we are sorry about this.
I could reproduce this and fixed in commit https://github.com/b2evolution/b2evolution/commit/480e07ba3e8d5a0ca685fc80465021464b0d4a0b.
Thank you for the report.
@yurabakhtin wrote earlier:
Hello @lefataliste, you are right, it was a bug, we are sorry about this.
[...] Thank you for the report.
This post has 2 feedbacks awaiting moderation...
Maybe you linked your new site to the old media files and if they were therefore still in the original directory, you deleted them when you dumped the new collection. Scary!
It's a bit late now but the back office does say where the media files for each collection is stored.