My Albums reorder themselves
FellatedOne
Joined: 2003-12-15
Posts: 13 |
Posted: Mon, 2005-04-11 21:44 |
This is weird. For the past couple of months my albums have been realigning themselves to a specific order. It's always the same order but it's completely incorrect. It's almost a random order in how they are sequenced, with my dates all jumbled up, but it does it the same way each time. I have to manually go in and reorder the albums (about 250 or so) but in a week or two or three it will reorder itself back to this format. Anything that I have added recently is added to the end (instead of the beginning where it belongs). I am running: If this is not a common problem, thats understandable (it's just the way it is with me) but is there a fast way to reorder all my albums by the date they were entered? Boy, that would save me about 2 hours of drudgery..... |
|
Posts: 13
No one else has ever experienced this?
Man.... am I odd man out.
Posts: 3236
It sounds like gremlins
Posts: 7
Yes, I've seen this error too.
I recently moved web hosts *and* upgraded to 1.5-RC2 as part of the move. I got my gallery up and running on the new web host and things were going smoothly for a day or two. One morning I visited the page and found all the albums re-ordered without any explanation. The sorting was a bit bizarre, but I think the albums may have been sorted by file date... Oldest albums first.
I did a little investigating and came to the conclusion that the albumdb.dat file was likely corrupted, and that's what caused the problem. Gallery automatically "fixed" the corrupt DB by re-sorting the albums and updating the DB file. You can recreate the problem if you manually corrupt the DB file and add two "album 1" entries. However, I'm still not sure how the file was corrupted in the first place.
I fixed the problem by restoring an old version of the albumdb.dat file (along with a little bit of manual editing). I haven't seen the problem since (2 weeks now). I've also been backing up the albumdb.dat file anytime I add new albums.
Finally, I enabled file locking in the config.php file as a precaution.
Posts: 130
I had the same problem, I had to restore albundb.dat from backups.
This is the final straw for me with Gallery. It may not be cool to slag off OSS but Gallery for me has gone from being a quality project to junk.
Enough already.
Posts: 13
Actually, I figured it out.
For whatever reason, when upgrading previous albums, my temp folder was not emptying itself. I would still have garbage temp files in there.
I simply emptied the temp folder after upgrading everything and have been cruising along smoothly ever since....
Posts: 130
This has happended again to me - my gallery is in a right mess.
It would be nice if a Gallery developer could comment
Posts: 8194
We definitely try to give you the best product we can, but you must understand we're volunteers. We admit G1 has major design flaws, and we think we'll do better at addressing those with our new major version G2--you can even help us test it!
If you are not satisfied with our product, nobody is forcing you to use it. Also realize nobody is forcing us to help you.
Posts: 6818
dc2447,
is your problem EXACLTY the same as the one from FellatedOne ?
I ask, because _i_ dont understand what you mean.
If its not the same problem i would like you to open a new thread and explain in detailed your problem.
The reason is a.) its better to have different things in differents threads and b.) my english is not that good (i am german)
Regards,
jens
P.S.: Hence my signature
Posts: 7994
I'm sorry that you feel that Gallery is junk. We do what we can in our spare time, and if that's not enough then you're free to pursue other alternatives and we wish you the best of luck.
If, on the other hand, you'd like to see us fix this problem then you might start by filing a bug with as much detail as you can muster about this and offering up constructive criticism. If you can think of any solutions, that would be a good place to suggest them.
My guess is that concurrent accesses to your albumdb.dat file are causing it to get corrupted. I'd look in your Apache error logs for any traces of crashed http servers. I'd also make regular backups of your albumdb.dat file so that you can roll back to that if necessary (good idea to back it up after you add new albums). And enable flock based locking where possible.
Also, consider moving forward to G2. One of the difficulties with G1 is that it's very difficult to manage concurrent file access without the possibility of corruption. G2 uses a database as a semaphore for concurrent access and as a result is much more reliable.
Posts: 560
It's happening with me too.. :/
(but im using 1.4.4 on that site)
Posts: 1
hi guys. I have the exact nightmare problem. I found a temporal (dirty hack) solution.
In /classes/AlbumDB.php
comment following lines (from #35 and next ones)
if (strcmp($tmp, "")) {
$this->albumOrder = unserialize($tmp);
// albumdb.dat is corrupt, rebuild it
//if (empty($this->albumOrder)) {
//$this->albumOrder = array();
//}
//$changed = 1;
Greets!
Wieland Kublun
www.alohagdl.com Webmaster
www.kublun.com // personal website
Posts: 36
I have the same problem on two of my customers sites.
The server (shared) was reinstalled. Gallery stopped working, so I installed Gallery 1.5 for them. It when fine.
But now gallery are losing the ordering of the albums quite often. It's a big problem because it's 180 albums and 10637 pictures in the gallery.
Does a tool exist to sort these by name or date?
I saw a note about update to G2. Does people recommend me to update my gallery to this version already?
Posts: 8
I have the same problem as well. I have just a few top level albums (all containing multiple sub albums). I've noticed a few times now where i'll pull up my gallery site in a browser and the top level albums have mysteriously reordered themselves.
:: Running Gallery v1.5
- Lee
Posts: 65
yea i have the same issue as well, been going on for a while but have not posted it thinking it would be happening to me only......... anyone else has a fix for this rather than the dirty hack solution?
Posts: 130
My apologies for not replying to this thread earlier, I don't seem to get email notifications from here very often (if at all)
I understand this and I apologies for the rude nature of the post, it was unwarranted. I have been using gallery for many years and it is only recently that I have started to have problems with it.
If you think there is value in this then I'll certainly raise a bug report. I do of course keep backups but it's difficult to know where and when problem occur. When albumdb.dat gets corrupted the symptoms vary from albums being listed in entirely the wrong order to albums not appearing at the *top* of the album list.
Backup up after new album creatioon isn't really as easy as that as I have over 500 albums and many contributors.
Will try that now
Nobody is forcing me to use gallery but I'm in a position where I have 15,000 images collected over the last years and now option of getting them out of gallery format into another gallery container, I have looked at the possibility of importing my gallery into something else without much luck
Posts: 65
ok the problem is that, lets say ur albums are ordered this way, 1, 2,3,4,5
and out of nowhere you look they are arranged 3,4,1,2
happends to my gallery all the time and to my clients gallery.
this is a known issue and a bug report has been submitted already, we just hope there is a solution.
today im emptyin the temp folder and id see how that works out.
Posts: 130
This problem is happening to me every couple of days now, my gallery is pretty much unusable at the moment. Every time this happens I have to restore from backups then move each album that has been created since to the top of the tree.
Is there any way to reorder the albums by creation date? AFAIKS this information isn't captured anywhere - is it?
WRT to apache errors the only ones I get are php maximum execution times - mine is set to 30 seconds and this:
I am trialling g2 at the moment but integration seems to be a nightmare.
Posts: 219
Still happening in 1.5.1 RC1, which is a shame as it takes a while to sort it out each time. As this bug has been known about for at least 4 months, I was hoping it might be resolved now. Any news on a fix in a later release? Still love Gallery, though!
Posts: 130
I suspect that issue is tricky to fix because of the limitation of the flat file database which holds the album data. Personally I think there needs to be a simple backup of albumsdb.dat everytime there is an operation on it.
I'm also confused by the suggestion that this is a locking issue as I'm pretty sure that the problem doesn't occur with concurrrent writes and if it was a locking issue I think the whole file would be truncated to a zero length file.
In fact looking at the code, flock() is indeed used to protect files getting opened and written to:
Posts: 16
I saw one member FellatedOne suggesting that you empty the temp file. When I checked my file I saw a lot of files in there.
I wanted to know if these files are supposed to be there or is it safe to remove them?
Posts: 130
My gallery has just done this again and I have ended up with albums from 2000 at the top.
I'm left with the choice of either spending serious amounts of time fixing this every day or so or using G2 which, to be frank, doesn't look finished to me.
Gutted.
Posts: 25
I just wanted to chime in, just in case the info helps anyone.
Today my gallery front page [top level] reordered itself. I have 5 albums and 1 and 2 switched places along with 5 and 3
I manually reordered them back and everything else seemed fine, all nested galleries were untouched. This is the first time in my 2+ years of using gallery that anything like this has happened.
my current version of gallery is v. 1.5
Posts: 130
Again today
Posts: 1535
Have you tried G2?
Posts: 130
I have and personally I don't think it's mature enough to move all 15,000 pictures to it yet
Posts: 114
If G2 can look like G1 then i would consider moving to G2. I honestly dont like the layout nor all the "spam" on the main gallery index.
I have only had this problem happen to me 1 time. *knocks on wood*
But the temp files are a good question: What do they do? Is it ok or good to delete them?
Posts: 65
yea i tried it deleted all temp file, but no same issue, question though why are the temp files not being deleted auto when the script is done with it ?
Posts: 6818
Hello,
Signe and me think it could be related to a new piece of code.
But the code itself is correct and is there for good reason.
But you can remove it on your own risk.
classes/AlbumDB.php
remove:
jens
Posts: 3236
G2 is far, far more mature in respect to having as many images as you do. There is one commercial sites based on ALPHA versions of G2 that have more than 500,000 images and something like 50,000 users. I believe its "care2", though my figures could be a little off (higher now, i'd imagine). It scales very very well.
You can customize G2 far more than you can G1, and its light years easier. There is a "classic" theme that includes the sub-album list like G1 can have. If you remove all the side-bar items, it will look even better. In the long term, you will almost certainly be happier and better served by G2. I would not recommend REMOVING your G1, but G2 will happily install alongside G1 and import data from it (not removing it from G1!) so you can test it out.
In linux, the /tmp dir is made to be entirely disposable. Its possible that if you nuke something WHILE its in use, some poor sap will have a minor issue or two, but thats about it. If you configured your own special /tmp dir for gallery (in your html doc root maybe?) then you won't be doing any damage unless someone happens to be uploading an image RIGHT at that moment. Some linux distributions actually clear the /tmp dir at every boot... though with linux, who knows if it would happen more than once a year
Posts: 16
This reorder issue has been happening to my large gallery quite often as well. It happens like every three days now, and takes quite a bit of time to fix the order of nearly 40 top level albums.
How does the albumdb.dat get corrupt?
Removing that bit of code in AlbumDB.php, what's that going to do? You said 'at your own risk', and that scares me. What happens when/if it goes corrupt and that bit of code is gone?
I'd love to upgrade to Gallery 2 (I use it on another site and love it) but I use gallery as a module for Postnuke and as far as I know, the new version doesn't integrate.
But Gallery still rocks.... I'll always love it.
Posts: 8
For those of you who've been experiencing this problem, you might try what I've done and restrict search engines from crawling the rss.php file. I had been experiencing this problem nightly, but after doing what I outlined in this thread, I haven't had the problem since. It seems that rapidly crawling the RSS feed was somehow causing the albumdb.dat file to be corrupted.
Posts: 1
I'm seeing this problem also (I have 1.5 installed). The only thing I might add is that I saw this problem when I was logged in as an admin (by mistake) on two different computers. Could this be causing the album.dat file corruption?
This is starting to get really annoying and I need to fix this soon!
-p.
Posts: 8
Other people are reporting that excluding their Gallery RSS feed from being crawled resolves this issue for them. I'd encourage any of you still experiencing this problem to try this work-around. (It's only a work-around, since it'd be preferable to have my RSS feeds available to search engines.)
Posts: 20
I had this problem. I'm the only person that updates the gallery, so there was no simultaneous updating.
I found that it had something to do with eAccelerator... http://eaccelerator.net/HomeUk.
eAccelerator really sped of gallery, but at least once a day it would reorder the album. And it would reorder when just viewing the gallery!
Once I disabled eAccelerator for the gallery directory it stopped reordering.
Posts: 2
Well i checked my error logs and i was missing the robots.txt file...somehow.
I used a robots.txt generator and set it to deny all and it's been ok for a day now :D
UPDATE : Still working like a charm...i guess setting the deny all in the txt file workz :D
~Mike
Posts: 5
Same problem here. Around 200 albums all out of order now. I have no idea what event caused the sorting, seemed to order them by name of the album (the name that is used in the url)
I reordered the first page by hand, came back a couple days later and it had been reordered again.
Running Gallery 1.5.
Posts: 110
repeatedly happening to me. gonna try the rss.php thing (i am just going to delete it)
Carl
Posts: 38
Has anyone found a fix for this?? I tried removing the RSS part of my gallery, still doing the same thing. This is getting very annoying.
Posts: 22
I have been struggling with this problem for months, it only seems to affect the top-level albums though. We have 11K photos with 10 top-level albums, not much uploading going on right now, simultaneous uploading would be very rare.
I tried creating a robot.txt file to deny access to rss.php but after a week the problem was still happening, so I have temporarily disabled my rss feed. Album order has been stable for 1 week, but this is a terrible workaround!
Where can we recommend that this bug be checked out for potential fixing in future 1.x versions, if it is not already?
(Running 1.5-pl1 on Solaris.)
Posts: 81
I tried the robot.txt file also and it didn't help. Still haven't figured out how to fix the problem. It seems the support for gallery 1.x simply isn't there anymore. Not sure if anyone is concerned about the problem. The answer seems to be switch to Gallery 2. I wish it had some of the features I needed and I would.
Posts: 560
well..i could not fix it either..
Posts: 1153
one of my users have made a complaint about this "reorder/shuffling" problem. his gallery is located at
http://hitosora.negimaki.com/gallery/
it used to look organized but now albums are in random order. now i'ts running g1.5.1 and we're not sure if that problem still exist. let me see if i can convince him to migrate to G2 and get it over with.
Posts: 81
There has to be a fix for this, anyone? Been able to solve the problem?
Posts: 22
I posted this in the 1.5.1 thread but did not get a response, so I am appending it here...
I am having a problem with my Gallery since upgrading to 1.5.1 in that the albums keep reordering themselves. Per discussion in this thread, I thought this was due to a corrupt album.dat file that was caused by repeated access of our rss.php file. However, I turned off rss in the config for two weeks and the problem was still occurring. I believe that the reorder is always back to the same exact wrong order each time.
Any suggestions?
Gallery URL: gallery.cs.umb.edu/gallery (rss is active but I just turned it back on as of Nov. 8, 2005)
Gallery version: 1.5.1
Apache version: httpd-2.0.54
PHP version: php-5.0.4
Graphics Toolkit: ImageMagick-6.1.8
Operating system: Solaris SunOS 5.8
Posts: 22
Haven't gotten a response to this, so bumping up.
Posts: 22
Thought I would bump this up one more time before I give up.
Posts: 219
Damn damn damn! For some reason, I thought this has been taken care on in the 1.52 builds, so a couple of weeks ago, I went and took an evening re-sorting my albums back to the correct order, and everything was fine. This morning? Back in random order! I think I might remove the bit of "safety code" than Jens mentions further up the thread, and see how things go.
Posts: 22
Please do post back here to let us know how it goes. I hesitate to remove code like that in case it hurts some other functionality of Gallery that will turn out to be important to our users, but it is very frustrating that I can no longer put the albums in an order that will make sense to the many visitors to our site.
Posts: 9
My gallery has just done this as well v1.5.1 - you all talk about re-ordering your albums? How do you do this? I can't find the option to reorder my albums anywhere? Would really appreciate your help - thanks Josh
Posts: 22
To reorder the albums on the top level, there is a "reorder album" link for each one, for me it is the third link in ([delete album] [move album] [reorder album]).
To reorder subalbums you can use the pull-down menu under the album thumbnail, reorder is the fourth one from the bottom on mine. Note that you cannot do this from *inside* the album you want to move.
Hope that helps, it is not so easy to explain in writing .
Also, be prepared for the corrupted album.dat (I think they decided that's what the problem is but I am not sure since it never got resolved) to reassert itself. We have never been able to predict when the un-ordering happens but when it does it usually occurs several times over the next several days. In fact things were nice and quiet for 4 months but just last week I laoded the main page and it was in the wrong order again...it is always the same wrong order too.