Changes to Admin ChangeList in develop aren't consistent with 2.1.3 #830

Closed
kezabelle opened this Issue Jun 7, 2011 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

kezabelle commented Jun 7, 2011

I spoke to ojii briefly about this, and though I've not yet managed to produce a test case, it would appear that aa1e0ce may not be a like-for-like change (changes to cms/admin/change_list.py and menus/utils.py)

We have a project which was initially set up with many pages (nested a few levels deep) under 2.1.3 - last week I did an upgrade to develop, as they're hoping to use the view restrictions. After the upgrade, trees are not displaying in the correct order in the admin change list (some children are under the wrong parent visually, and further new pages appear as the last items beneath a parent). They still appear in the right order in the front-end (using any of the templatetags like show_menu), and rolling back to 2.1.3 returns them to their correct place, implying that the problem is not one of underlying data loss.

I realise this isn't the most thorough report currently, but I'll attempt to provide more detail as I investigate it, either in additional comments, or a branch on my fork.

Contributor

kezabelle commented Jun 7, 2011

Here's what I'm seeing with a bunch of test data (which hopefully can become a test case, if I can figure out how to do one for the change list)

  • on the left is 2.1.3 stock, which calls menus.find_children()
  • the middle is the same view refreshed once upgraded to develop; note the children are always on the last node of the level.
  • on the right is the output of {% show_menu 0 100 100 100 %} using the stock template, against develop.

As far as I can ascertain, the problem lies in no longer calling menus.find_children() and instead relying on mptt_tags.cache_tree_children() in some fashion that I'm not clear of, as I'm grossly unaware of mptt's internals and the historic requirement for using a bundled version.

What I'm Seeing

Contributor

kezabelle commented Jun 8, 2011

Alrighty, I'm giving up. I've tried putting together a test case, but there's too many moving parts for me to figure it out. I've gone through a laughable number of variations, but I can't get the expected output and actual output to fail on develop but succeed on master.

I've replicated the problem in the admin enough times that I'm sure something is awry, but I can't pin it down in code.

@vvangelovski vvangelovski added a commit to vvangelovski/django-cms that referenced this issue Jun 9, 2011

@vvangelovski vvangelovski Fix for issues #830 and #835 including tests a89d326

ojii closed this in 8fb63ce Jun 9, 2011

@vvangelovski vvangelovski added a commit to vvangelovski/django-cms that referenced this issue Jun 9, 2011

@vvangelovski vvangelovski Change in the ordering of the queryset in get_query_set of CMSChangeL…
…ist. Related to issue #830 and #835.
71f5a01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment