We help IT Professionals succeed at work.
Get Started

How do I fix lft and rgt in mosets tree?

Jeremy Leys
Jeremy Leys asked
on
2,262 Views
Last Modified: 2014-04-07
Hi,

I am using Mosets Tree 2.2.0 in Joomla 1.6.1.

I find that from time to time, the nested model left and right indexes bleed into each other and cross boundaries they shouldn't, I have tried recounting the category indexes which does not fix the issue.

I can easily fix the issue by manually resetting the the left and right indexes in MySQL so that they match the correct tree structure, but, we have allot of categories and I don't want to be doing this every time as it is time consuming. So my questions are:

1) Why does this happen?
2) How can I prevent it from happening?
3) How can I fix it quickly when it happens? (I could write an automated query that fixes lft and rgt to run daily, hopefully the answer is easier than that)

Reference:
http://en.wikipedia.org/wiki/Nested_set_model
Comment
Watch Question
Technical Lead
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE