Page 1 of 1

How maybe I fixed my database?

Posted: Tue Feb 17, 2009 6:38 am
by Andrew Prior
Symptons:
A menu not working properly
(a menu item was showing as the wrong level)
led me to the administrator content page where i observed the following hierachy in my pages.
2.1.1
2.1.2
2.1.2
2.1.3
etc
ie two files with the number 2.1.2s

As an MsSQL person this says database corruption to me. I'm not qualified to fix it in MySQL.  I had no idea how old the problem was, so whether I had a useful backup was open to question.  Then I noticed the following
2.1.21
2.1.22
2.1.24
2.1.25
etc
ie 2.1.23 was missing

So, after doing a database backup, I used the admin content page to move 2.1.22 down 1 level. It became 2.1.23
and I then had
2.1.20
2.1.21
2.1.23
2.1.24
etc
So then I moved 2.1.21 down one level and continued the process until I was finally able to move down the second 2.1.2 which becam3 2.1.3.

This is one almighty kludge, and I don't know if I have fixed the whole problem.
I do know a duplicate hierarchy value in my database content table has now disappeared,
and the menu is now working properly.

Re: How maybe I fixed my database?

Posted: Tue Feb 17, 2009 7:25 am
by RonnyK
This was an issue in releases before 1.5.2. The reordering of pages, like in quickly pressing multiple times up/down in the listcontent, would have caused this.

The correct method to fix this would have been to use the re-order pages, and press the submit button there, as that regenerates the hierarchy.

Also from on 1.5.2 on this is fixed, but existing wrong hierarchies has to be regenerated using the re-order-function once.

Ronny

Re: How maybe I fixed my database?

Posted: Tue Feb 17, 2009 11:26 pm
by Andrew Prior
?  Using the reorder pages I can move from menu list 1 to menu list 2 etc... Don't seem to be able to move individual pages around in the same menu level, though.

Re: How maybe I fixed my database?

Posted: Wed Feb 18, 2009 6:02 am
by RonnyK
I know that, but SUBMITTING there, does a regenerate of the structure and will by that remove the doubling of 2.1.2.

Ronny

Re: How maybe I fixed my database?

Posted: Wed Feb 18, 2009 6:55 am
by Andrew Prior
Ahh!!  Very cool!  Thanks, that will often help people, I suspect.