Paging for listed revisions that match criteria

ajaysolutions - August 9, 2008 - 17:21
Project:Revision Deletion
Version:5.x-1.1
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

As GA raised here http://drupal.org/node/292600#comment-955792 it becomes a problem when there are hundreds (or thousands) of matching revisions available for deletion. I thought I'd raise a proper request.

I think it needs to page the list, maybe defaulting to 100 per page? Maybe even have options for how many to show, or "show all".

Al,

#1

GA - August 9, 2008 - 21:36
Version:6.x-1.x-dev» 5.x-1.1

I think we have 2 choices:

1) generate the result in several pages

2) show the user only a report of the quantity of revisions that are going to be deleted or already deleted.

let's see what Greg thinks about it, i personally don't see the point of listing all revisions affected... and think just telling the user that say "5200 revisions deleted." and logging it will be enough.

#2

Gman - August 12, 2008 - 04:17

I too believe that since the listings that is shown, can't be edited or some revisions excluded from the list, it is better to just state how many will be deleted upon pressing the button (which is more information that when cron deletes them all).

Also, right now I have a watchdog listings for each revision that is deleted. Is that overkill since they can't be retrieved anyway. Maybe again just one entry stating how many revisions were deleted.

Thanks for starting this conversation.

#3

GA - August 25, 2008 - 08:56

Then let's do it! so we are going to:

1) show the end user how many revisions are going to be deleted before pressing the button.
2) show the end user how many revisions deleted after they press the button.
3) log how many revisions deleted automatically.
4) log how many revisions deleted by user x.

Greg! do you need my assistance or you will implement it yourself?

#4

Gman - August 26, 2008 - 18:22

Yes, please do roll a patch for exactly what you have presented. All four would be excellent. Thank you. Might be the start of working together on this. -Greg

#5

O_o - December 12, 2008 - 16:09

This sounds like some fine improvements to me! I was just about to write a patch myself that should be able to to just this (minus the logging).

One great improvement with this proposed solution is that the drupal_set_message() function will only write one message to the $_SESSION['message'] instead of writing "Revision Deletion: Aged Node nid=%node, %title, Revision vid=%rev deleted." for each deleted node. With the current solution we have a performance issue due to the possibility that huge amount of data could be stored in the $_SESSION.

If you need another co-maintainer for this module, just PM me.

#6

Gman - January 2, 2009 - 04:56

O_o, please do roll the patch. I think that you could probably just count the number of results in the array of the this line (appears twice).

$results = revision_deletion_data();

-Greg

#7

NancyDru - August 12, 2009 - 22:25

No patch yet. However, I have an objection to it, maybe. I also need a "pick and choose" form because there are additional choices I would like to see and I haven't gotten them implemented yet (if it is even possible). In some cases, I want to keep the last revision on a day; sometimes that last revision per day per user; etc. In almost all cases, I want the first version (for diffing) or the last revision on the first date. Right now, I think another "operation" (see #547650: Coding standards) that will produce a list of all revisions for a node that allows the user to check off the ones they want to delete (something like admin/content/node)

#8

NancyDru - August 23, 2009 - 21:09
Status:active» postponed (maintainer needs more info)

I have the "pick-and-choose" form (which is paged) and was thinking about porting much of the technique to the main list.

I understand the request because I got interested in this module because of a site for exactly the problem you mention. The issue I see here is where to break the pages. If one says "every 20 lines" then it could break in the middle of a node's revisions. If you say "every 10 nodes," you could still end up with an enormous list.

So I'm sort of leaning towards something that looks sort of like the node admin page, but with collapsed fieldsets for each node. Or a list that says "node 123 has 20 revisions that will be deleted" and a link to see the list.

Another question is: Do you include the "Run Revision Deletion" button on every page, or just the last?

#9

NancyDru - August 24, 2009 - 06:11
Status:postponed (maintainer needs more info)» patch (to be ported)

Committed to both -dev versions.

I would still like to see answers to my questions. The way it is right now, you can get a node's revisions split and the button is on every page.

#10

NancyDru - August 24, 2009 - 06:12
Status:patch (to be ported)» postponed (maintainer needs more info)

#11

NancyDru - August 27, 2009 - 04:07
Status:postponed (maintainer needs more info)» fixed

#12

NancyDru - August 31, 2009 - 18:35
Status:fixed» closed

Included in the -rc1 versions.

 
 

Drupal is a registered trademark of Dries Buytaert.