After upgrading from 4.6.2 to 4.7.2, there is no longer a "select all" button or checkbox on the "list" tab of "administer"->"content". Does anyone know how to fix this?

Comments

dman’s picture

I don't believe it was ever standard in 4.6.
... So a while ago I patched my 4.6 node.module to do exactly that.

Index: node.module
===================================================================
Add a 'select all' button to the content management screen to select
all checkboxes on the page. Useful for deleting large numbers of test
nodes during development.

RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.485.2.14
diff -u -F -r1.485.2.14 node.module
--- node.module	9 Sep 2005 06:14:24 -0000	1.485.2.14
+++ node.module	27 Oct 2005 05:38:50 -0000
@@ -912,6 +911,7 @@
 
   $form = form_select(NULL, 'operation', 'approve', $options, NULL, ($disabled ? 'disabled="disabled"' : ''));
   $form .= form_submit(t('Update'), 'op', ($disabled ? array('disabled' => 'disabled') : array()));
+  $form .= "<a href='javascript:var x,k,f,j; x=document.forms; for (k=0; k<x.length; ++k) { f=x[k]; for (j=0;j<f.length;++j){ if ( (f[j].type) && (f[j].type.toLowerCase() == \"checkbox\")){box=f[j]; temp=box.onchange; box.onchange=null; box.checked=!box.checked; box.onchange=temp; } } };void(1);' >Select all</a>";
 
   $output .= form_group(t('Update options'), "<div class=\"container-inline\">$form</div>");
   $output .= '</div>';

I don't know what might have been providing that functionality for you before now. Was it a modified install? You have backups? Just interested.

... as for 4.7, it wouldn't be too hard. Who's paying? It's a really good (oddly missing) feature.

.dan.
http://www.coders.co.nz/

Baker’s picture

...a bit of a newbie here, but one must always ass-u-me. Where exactly should one insert this code and how much of it should be inserted? Thanks very much for a patch that really should be part of the module in the first place. I can't believe this isn't native yet.

dman’s picture

A much better version is built into Drupal 5 nowadays.

My old example was for Drupal 4.6
(and reading the patch says you should insert the line beginning $form .= "<a href='javascript: into line 912 of node.module)

No version for 4.7

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/