I've installed the module and created a page view to sort my node type using the weight changer style. When I drag and drop the items in the list generated by my sorting page view, they keep springing back to their original positions. When I try to set the weight numbers manually in the live preview of the view I see that they all revert back to 0 when I perform a save.

Has anyone encountered this behavior before?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspafford’s picture

Be sure to check out the README that comes with this module. In there you'll find some tips on creating a sortable view.

It sounds like you may need to set the sort to weight, or maybe include the weight field in your view.

kari.nies’s picture

Actually I had read it. I was sorting by weight and I had included the weight field in the view.

mikeloyst’s picture

Same problem here: I have no problem going to Node > Edit to change the weight, that works fine. Using the weight changer view does not seem to work though. I'll arrange the nodes how i want them, click save, and nothing changes.

mikeloyst’s picture

Update: Arranging and clicking save also disrupts the weights set on the node > edit page

mikeloyst’s picture

Update: I have switched to the 1x-dev version and it works like a charm. You might want to give that a try.

orbmantell’s picture

I am having the same problem, and am not sure switching to a dev version is an acceptable solution for me. Is there any development still ongoing on this module, or has it been abandoned?

NancyDru’s picture

No, it has not been abandoned (except 5.x). I almost died a while back and it's taking me a long time to catch up.

adraskoy’s picture

I am also running into this, with 6.x-1.0 on drupal 6.22. I had it working successfully on other installations, but this one is mystifying me. Weights are reset to zero, regardless of what they were before running the weight changer.

EDIT tried the dev version with patch also. Same problem :-(

bomarmonk’s picture

Obviously with life and death in the balance, Nancy, your health outweighs any concerns about Drupal development! It's great to hear you have survived what may have been a frightening brush with death (taking your above words literally).

If it's any help, I have version 1.23.2.12 of the weight module (dated 2010/07/23) working fine on one site. But after trying to install first the development version and then the official release on a new Drupal 6 site, I am experiencing the same problems with weights not saving for the nodes. Even after uninstalling the module and reinstalling the version that is working on my other site, I cannot get the module to work with this new site (cleared caches).

Does this suggest a conflict, perhaps, with another module? Not sure...

davisben’s picture

Status: Active » Postponed (maintainer needs more info)

Can anyone confirm if this problem still exists in the latest dev release?

medwassim’s picture

Title: Weights keep resetting to 0 » Weights keep resetting to 0 (httpRequest bug issue)
Version: 6.x-1.0 » 6.x-1.1
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Patch (to be ported)

I downloaded the lastest weight version module and I cant set weight for nodes.
i found a "httpRequest" exception.
So the problem is httpRequest.js, u have to comment script header and remove the jquery initilisation ...
theese corrections must be included on lates D6 version.
try to use the file that i'm use. (for security it has been renamed to httpRequest.js_.txt)
Best Reguards

medwassim’s picture

FileSize
1.19 KB
NancyDru’s picture

Priority: Critical » Major
Status: Patch (to be ported) » Needs review

The "critical" priority implies that your site is down. It doesn't sound like that is true. I hope it is just a language problem, but please don't tell a module owner what "must" be done.

medwassim’s picture

i'm sorry, it is just a language problem :)
i have to be carrefull next time.

davisben’s picture

Status: Needs review » Fixed

I couldn't reproduce the error, but these changes make sense, so I committed them to 6.x-1.x and 7.x-1.x. When I have some time I would like to take a look at #961380: Changing weight from content admin page doesn't work and convert the httpRequest calls to use AHAH instead.

NancyDru’s picture

Sounds good, Ben.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

musojon74’s picture

Priority: Major » Normal
Status: Closed (fixed) » Needs work
FileSize
1.22 KB

Hello all.

Sorry to reopen this - but using weight module and all weights are reset to 0 when doing any dragging and dropping. I have this exact same issue on a Drupal 6.22 site. I'm using weight 6.x.1.1. I've tested with different browsers (IE9, 8, FF 3). I attach my httprequest file to confirm it's definitely got the issue resolved. If so it must be some conflict with another module if noone can recreate. Thanks

davisben’s picture

Status: Needs work » Fixed

Hi musojon74,
This fix is not in the 6.x-1.1 release. It has been fixed in the latest 6.x-1.x-dev. Downloading that version should fix this.

musojon74’s picture

OK thanks have downloaded latest dev but have the same issue. 2 questions - 1: should I start a new support request or is it ok to use this thread - others may share the issue - and 2: is there a minimum requirement of any other modules / versions to make this work? If not I'm not sure what's happening.

davisben’s picture

Status: Fixed » Active

There are no other modules required. If you could list the steps to recreate this error, export your view, use a service like pastebin to post it, and give the link to it here it would be helpful in troubleshooting this.

musojon74’s picture

FileSize
2.36 KB

OK. To recreate the error I:

Create a new view.
Set view type to node.
Add field - node:title
Change Style to weight changer
Save.
Add sort criteria: weight: weight. Sort asc.
add display (page)
add filter - node type - is one of events
override filter.
add a path. save.
now view view
drag items up and down as required. save.
weights reset to 0. further attempts to move each item don't change the weights from 0.

I've attached a text file with the view export on it I've tidied it up a little from how it started. Can't get to pastebin from here.

Thanks for all your help.

davisben’s picture

Status: Active » Fixed

It appears you don't have a weight: weight field added to the view. When you hit save, that field is used to set the new weight, so if it doesn't exist, the weight will be zero. Adding the weight field to the view (can't be the first field) will solve this problem for you. The views aspect of the documentation could be improved, I'll work on that.

musojon74’s picture

Status: Fixed » Closed (works as designed)

Nice. Much appreciated, sorry to doubt you :) If you're busy I'll take a look at the documentation next week and try and tweak it to give something back to community.

Thanks