On Mon, Feb 1, 2016 at 2:05 AM, Joel Gwynn <[email protected]> wrote:

> OK, I know that this is highly unlikely, but in my admin pages section, I
> was unable to reorder pages.  I can drag a page, and the ajax post
> succeeds, but the order wouldn't stick.
>
> I went to line 44 of mezzanine/pages/views.py
>
>
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/pages/views.py#L44
>
> for i, page_id in enumerate(request.POST.getlist('siblings[]')):
>  Page.objects.filter(id=get_id(page_id)).update(_order=i)
>
> and I put in a print statement to print out the page_id, and nothing
> printed out.  On a hunch, I changed 'siblings[]' to 'siblings', and page
> reordering works!
>

I can't reproduce this, here's what I see:

-> for i, page_id in enumerate(request.POST.getlist('siblings[]')):
(Pdb) request.POST
<QueryDict: {u'parent_id': [u'null'], u'id': [u'ordering_2'],
u'siblings[]': [u'ordering_1', u'ordering_5', u'ordering_2', u'ordering_3',
u'ordering_8']}>


> So then I tried a clean install, and the page ordering works.  So looking
> at the actual ajax request on the working site, the variables are named
> "siblings[]", but the variables are named "siblings" on my site.
>
> What's up with this?  Could it be a jQuery conflict?  This is happening on
> Chrome, fwiw.
>

That's a good guess, but you'll need to work out how you got there.

> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to