My selection rules are reported correctly on the List page:
* If the current revision was created less than 1 week ago, the next older revision will be kept.
* It will delete revisions that are older than 1 week.
However, the List page lists revisions as subject to deletion that do not meet the selection criteria (and will, in fact, delete them). For instance, today, I modified two nodes, and then accessed the Revisions to Mass Delete > List page. It listed all of the previous revisions for both nodes as subject to deletion. (The previous revisions were all over 1 week old, but the current revisions had been created only minutes earlier.)
Am I missing something? The module seems to be deleting all non-current revisions, regardless of the selection rules.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | revision_deletion-get_list_query.patch | 1.39 KB | john.money |
Comments
Comment #1
john.money commentedConfirmed...
I took the query from revision_deletion_get_list() directly into the database and it does not produced the expected result.
Expected:
SELECT n.title, r.nid, r.vid, r.timestamp, r.uid, r.log, n.type, n.vid AS current, n.status FROM {node_revisions} r INNER JOIN {node} n ON r.nid = n.nid WHERE n.nid IN (SELECT r.nid FROM {node_revisions} r INNER JOIN {node} n ON r.nid = n.nid AND r.vid <> n.vid WHERE r.timestamp < %d $conds ) ORDER BY r.nid, r.timestamp DESC
The bold WHERE clause should filter the result set by $aged timestamp value.
Result:
It does not. It returns all revisions regardless of timestamp or revision_delete_age setting.
Attached is patch to fix It is lightly tested.
Comment #2
boclodoa commentedConfirmed, the patch seems to work for the "Revision Age" part, but not for the "Current Revision Age" part
Comment #3
iantresman commentedIt seems that version 6.x-1.x-dev dated 2013-Oct-01 has the patch, but it didn't work for me.
At the bottom of the page "Revisions to Mass Delete", it correctly tells me that "It will delete revisions that are older than xx weeks", while showing revisions that are checked, and that are younger than this. Somewhat frustrating.
Comment #4
adriancid