Thread Starter
mynoch
(@mynoch)
Just had it happen again – VERY ANNOYING
Anybody else have this problem?
Hi mynoch,
thanks for your feedback.
The problem here is how to reproduce the issue, without it we’re walking in circles.
I couldn’t find anything wrong yet.
Thread Starter
mynoch
(@mynoch)
Hi WPReady
Thanks for your reply.
Yes that is the problem, I have tried a lot to reproduce, but am unable to – and then suddenly it pops up again 🙁
That’s why I asked the question about a way to track the changes in the album structure, then maybe we could pinpoint what is making the changes.
Thinking about it, it would be possible.
Album structure is stored in [suffix here]_nggalbum table (usually wp_nggalbum) into the sortorder field. This field stores a serialized array representing the gallery/album stack for the current album.
For example, I have a gallery where sortorder values is:
a:3:{i:0;s:1:”5″;i:1;s:2:”a2″;i:2;s:2:”a3″;}
The array meaning is: 5 represents a gallery with ID 5, and other two values starting with an ‘a’ (a2,a3) are albums with ID 2 and 3 respectively .
Then the album is a stack of three elements, one gallery and two albums.
There is an action named ngg_update_album_sortorder which is triggered when a change to sortorder is made. Notice this action happen AFTER the field update, so there wont’ be track of previous values, but this should be a starting point to check what’s going on with your installation.
I’ll try to give a code example, when the time allows me(!).
Or, if you want to use the Simple History plugin to track the changes, I’ve made a plugin a while ago that should enable NextCellent integration (https://wordpress.org/plugins/ngg-simple-history/).
I guess Niko’s answer is better 🙂 …
Thread Starter
mynoch
(@mynoch)
That is great 🙂 I will try that right now and see what it picks up next time it happends
Thank you both 🙂