Closed (fixed)
Project:
Weight
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2010 at 18:20 UTC
Updated:
15 Mar 2012 at 15:30 UTC
Jump to comment: Most recent file
Before anything else, I know there was an issue about this, but it was marked as fixed 18 months ago. But now, with the latest dev, the problem is there again.
But the main reason I didn't not opened that issue is because this should be fixed properly and the weight added to the form in a more drupal way and not the "hackish" and ugly way there is now.
So here is a patch that uses a proper hook_form_FORM_ID_alter() to alter the form and it uses AHAH to save the changes and with that removes the need for httpRequest.js.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | screenshot.png | 4.14 KB | mavdiablo |
| #1 | 961380-1_use-ahah.patch | 6.42 KB | tic2000 |
| use-ahah.patch | 5.94 KB | tic2000 |
Comments
Comment #1
tic2000 commentedNew patch that preservers the status information that where removed by mistake in the previous one.
Comment #2
askibinski commentedPatch works!
Comment #3
sgabe commentedI can confirm that the patch in #1 applies fine and works like a charm, thank you!
Comment #4
davisbenCommitted to 6.x-1.x. I'm starting work on a D7 version of this now.
Comment #5
davisbenLooks like this isn't possible with the tableselect form element, because any form elements added to the #options array (the table rows) aren't rendered by the FAPI. Anyone have any ideas to work around this?
Comment #6
davisbenUpdating title.
Comment #7
quasi commentedI'd also love to see this work.
Comment #8
toppen56 commentedI would also love for this to work. Just installed the Drupal 7 module and was disappointed to see this feature doesn't work. Hope you find someone who can offer a solution.
Comment #9
mavdiablo commentedI'm using this module on the 7.10 version but I don't find the way to modify weight on the admin content list.
I'm using 7.20 core version.
What's wrong?
Thank you for the reply.
Comment #10
davisbenPlease read the comments, the answer is in #5.
Comment #11
futurist commentedSo is this a core issue? Bringing this functionality back (plus drag'n'drop in the table) would greatly improve Weight's usefulness. Unfortunately I don't know how to approach this...
Comment #12
davisbenThere is a core issue about this, #1396320: Tableselect: add additional form elements in #options array. There is a suggestion for a work around that I'm planning on trying, just haven't had a chance yet.
Comment #13
davisbenI was able to get this working using the work around in that issue. It still needs some work to optimize it (too many node loads), but it's working.
Comment #14
futurist commentedCool, but after the update (to 7.x-2.0-beta2+11-dev, 2012-02-22) I get a notice for each node where a weight has not been explicitly set (weight for those is shown as -20 in the dropdown) on admin/content:
Notice: Undefined index: und in weight_form_node_admin_content_alter() (line 124 of [path to root]/sites/all/modules/weight/weight.module).Running Drupal 7.9.
Comment #15
futurist commentedComment #16
davisbenA fix for this has been committed. To get rid of the errors, go to admin/structure/types and resave each content type that is weight enabled. This will populate all nodes of that type with the default weight, if it doesn't already have a weight set.