Lost Albums

richg_1

Joined: 2002-08-30
Posts: 1
Posted: Fri, 2002-08-30 16:25

Hello,

I have had some problems in which a parent album is removed, and the child albums are essentially lost. They still exist if you search, or have the path however, the parent they are associated with does not exist hense t is impossible to include them in an album. I now have many albums that are stray that I need to reassociate with a parent album. The option to move the album is not available. Any ideas, or easy way to accomplish this?

Thanks

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Sat, 2002-08-31 08:58

There is no safe and easy way to edit the album.dat files.
It should be possible, but you'd have to be extremely careful.
I'm not sure that re-creating a dummy parent album with the same name
would do any good. You could probably go back from the child, but not
see it from the new parent.

You may just be better off pulling those directories
out of the albums directory, dumping all but the original files (ie, delete the data
files, the sized and thumb files) then re-uploading them into their new home.
Just note the path where they are and use the local directory option of add-photos.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-08-31 18:41

Unfortunately, this is a bug with older versions of Gallery. If you're really, really careful you can edit the album.dat files and fix this. Here's how to do it.

1. Make sure you can edit the files. Use the "cleanup"
script in the "contributed code" section of the website
to change the permissions, if you need to.

2. Back up the album.dat files

3. Edit the album.dat file with a text editor.

4. Locate a string in your album.dat that looks like this:

s:15:"parentAlbumName";s:6:"family"

in this example, it's saying that the parent of this
album is one called "family". It'll be different for you.
Replace it with:

s:15:"parentAlbumName";s:0:""

save the file. Don't change *anything* else.

Now, go to the top level of your gallery. The rescued album
should reappear at the end of the gallery. If it doesn't, or
you get a weird error then you probably made a mistake editting
the album.dat file. Try again. This *will* work.

 
pbyjp
pbyjp's picture

Joined: 2002-11-12
Posts: 260
Posted: Tue, 2003-03-04 16:54

Well, I am afraid I just had smth similar in 1.3.3b5 today.
Was shifting around albums and renaming them and suddenly, the whole top level album disappeared with all the sub albums... couldn t access them in direct URL but they were still on the server.
I was renaming a sub album of the top level and Gallery didn t take in account its new name and made it go blank, was appearing as an empty sub-album. So I though, well I will just rename it again to the previous name... Trick was... hehehe the name it now had (for some reason) was the one of the top level album it was in!!!! hehehe, and obviously I renamed it to its previous name, knowing I was about to kill the whole thing, and it did kill it.
So then freaked, found this thread, went into the album.dat of the top level album, did the trick, made sure, through the server the the sub-album had the correect previous name and reloaded the page and it came back!!
Great.
but then whenver I clicked on a sub album, it would go to it but show the path to it as being part of the sub album that had crapped... not a big deal, just messy... but instead of editing all the album.dat files, I just moved all those subalbums to the top level folder and then put them back into where I wanted and their paths got cleaned up and it all works again...
But that s kind of scary... IT WAS!!!
any comments?
p