Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm attempting to solve #859700: Put admin interface in block for Drupal 6 over at a sandbox for nodequeue_block.module.
I have them working, unless there is more than one nodequeue admin form on a page. When there's more than one they don't work.
I think this is because the admin forms all have the same form_id ('nodequeue_arrange_subqueue_form'). Is there a reason they don't have a unique identifier for each nodequeue? I'm guessing it's because it just wasn't necessary?
Any direction on this? If I can get multiple blocks to work on one page, I've got it working.
Comments
Comment #1
Rob_Feature CreditAttribution: Rob_Feature commentedJust found this on line 2837 of nodequeue.module:
I overrode the theme function to get tabledrag working (by giving each a unique id).
However, when altering the nodequeue (adding/removing) it performs the action on the first table in the page, not the one I'm working on.
(mostly talking to myself at this point)
Comment #2
Rob_Feature CreditAttribution: Rob_Feature commentedRe-titling. This is the last barrier (I think) to getting the nodequeue admins into blocks.
Comment #3
amateescu CreditAttribution: amateescu commentedThis feature imposes a massive rewrite of nodequeue_dragdrop.js. Besides this nodequeue_block implementation, are there any other use cases for adding multiple subqueue tabledrag forms on a page?
Comment #4
Rob_Feature CreditAttribution: Rob_Feature commentedAs mentioned in another issue, we'll be proposing a patch to the .js file along with the nodequeue_block module and you can check it out there. Watch for an issue about nodequeue_block which will include the patch.
Comment #5
amateescu CreditAttribution: amateescu commentedCan't wait for it :)
Comment #6
Rob_Feature CreditAttribution: Rob_Feature commentedsee #1169650: Patch To Create Nodequeue Admins as Blocks for a patch that worked with 2.9...but stopped working with 2.10 (grrrrrr)
Comment #7
amateescu CreditAttribution: amateescu commentedWell.. not yet fixed. I'll take some hunks from your patch in #1169650: Patch To Create Nodequeue Admins as Blocks, create a patch for this issue and then take care of the nodequeue_block implementation.
Comment #8
Rob_Feature CreditAttribution: Rob_Feature commentedGreat thanks....marked it as fixed since if figured it would be moved to the other issue, but if you want to address this individually that's great.
Comment #9
amateescu CreditAttribution: amateescu commentedPhew, this was bigger than I initially thought. I took what I could from your patch in #1169650: Patch To Create Nodequeue Admins as Blocks and fixed some remaining issues:
- reverse in admin view wasn't working
- got rid of
theme_registry_alter()
by specifying $form['#theme'] innodequeue_arrange_subqueue_form()
- cleaned up nodequeue_dragdrop.js
And here's the patch for 6.x-2.x-dev, this should now make the nodequeue_block patch a breeze :)
EDIT: Wow, this feature doesn't have any impact on memory performance (checked with Devel Performance)!
Comment #10
amateescu CreditAttribution: amateescu commentedOk, I gave this another round of testing and decided to commit the attached patches to 6.x and 7.x.
The 7.x patch contains a lot of additional js fixes, restoring feature parity with 6.x.
http://drupalcode.org/project/nodequeue.git/commit/02788e8
http://drupalcode.org/project/nodequeue.git/commit/00b0aad