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.
It looks like this module is not being actively maintained, but I am very interested in porting it to Drupal 7.
Would you be interested in moving the HEAD to 7.x version (I am working on the patch currently to bring this module up to the Drupal 7 standards)? Or are you planning to abandon this module in favor of some other (Revisioning etc)?
Comment | File | Size | Author |
---|---|---|---|
#39 | drupal7port-995876-39.patch | 28.83 KB | bforchhammer |
#39 | drupal7port-995876-39-oldpatchformat.patch | 28.32 KB | bforchhammer |
#35 | 995876-revision_moderation_d7_working_for_existing_content.patch | 830 bytes | branana |
#32 | revision_moderation-fix-theme-username.patch | 2.42 KB | binford2k |
#31 | revision_moderation_publish.patch | 1.42 KB | binford2k |
Comments
Comment #1
Azol CreditAttribution: Azol commentedOkay, here is the first patch to bring HEAD up to the D7 coding standards. There are several bugs, so do not try it on production website - this is not even alpha version! Feel free to post your findings here (no feature requests, please!), I will try to do some further troubleshooting soon.
Comment #2
binford2k CreditAttribution: binford2k commentedI get this error on enabling the module. It ends up enabled and adds the "revisions in moderation" checkbox, but doesn't seem to prevent the revision from being immediately visible.
Comment #3
Azol CreditAttribution: Azol commentedI still awaiting for module developer to commit the patch to open the 7.x branch, so we can begin creating patches against it. There is already Revisioning module with similar functionality (no D7 port yet).
Is this module going to be abandoned (40 weeks without any commiits on module page)? If so, I would prefer to switch to Revisioning and help getting it up to shape real quick.
I tried to contact current maintainer (jbrauer) but got no reply.
Comment #4
binford2k CreditAttribution: binford2k commentedI am also hoping for the Revisioning port, but in the short term I was going to try this. I was sad when it didn't work. You mentioned known bugs in your patch. Do you mind listing them here so we can begin working through them?
Comment #5
Azol CreditAttribution: Azol commentedYou can just use Coder module to start ironing out the rest of the problems.
Here is the updated patch, try it and report if it's working.
Comment #6
Azol CreditAttribution: Azol commentedOkay, here is the actual patch
Comment #7
Azol CreditAttribution: Azol commentedFurther changes to make the install process error-free
Comment #8
binford2k CreditAttribution: binford2k commentedIt did indeed install error free :)
Getting the same issues though. The original revision is marked as current if you view the rev history, but the latest one is actually displayed. I haven't had a chance to get to any code today, but I hope to have some time to look at it tomorrow.
Comment #9
binford2k CreditAttribution: binford2k commentedOK, it's pretty simple, actually. The solution though...not so simple. I'm still thinking about that.
The module is working exactly as designed. The problem is that node_save() saves the new node content at the same time it saves the revision.
We have two options here:
I'll keep you updated and let you know when I get it working.
Comment #10
Azol CreditAttribution: Azol commentedThis sounds like a workaround, but I would not recommend it, esp. direct use of _node_save_revision, which may cause unpredictable results when combined with some other node manipulation modules.
The main problem with this module logic is that
always resolves to FALSE, at least in D7 version (I have never used D6 version). And I would surely prefer the revision_moderation column to hold current $node->vid value instead of just "0" or "1" flag.
My best advice would be waiting a bit for the maintainer answer, and if there is none, to switch to Revisioning module.
Comment #11
rafal_p_s CreditAttribution: rafal_p_s commentedHello there.
From 5-6h i'm trying to patch that module and include it to D7.
I'm changing somethings what u dont see.
But still dunn work.
Do u have any new suggestions ?
Comment #12
binford2k CreditAttribution: binford2k commentedThis patch works fully as far as I can tell. The key was figuring out how the new fields system worked. Run my patches with -p1. The first patch is against HEAD, the second is against the patch in #7.
This cleans up a bunch of minor style issues too.
It does have one possibly major bug--seen on the content type page--, and a handful of problem areas. All are identified by coder. Once I figure out the logic in revision_moderation_form_alter, I'll attempt to migrate it to hook_form_FORM_ID_alter() and fix that one.
Comment #13
binford2k CreditAttribution: binford2k commentedAgainst HEAD
Comment #14
Azol CreditAttribution: Azol commentedThanks, binford2k! Will give your patch a try...
Comment #15
binford2k CreditAttribution: binford2k commentedThis moves the config link from the admin bar on top into config/content where it should be.
Comment #16
Azol CreditAttribution: Azol commentedHere is the final patch, incorporating all the changes made by me and binford2k, with patch file format changed to match the Drupal requirements... feel free to check it out and post any possible issues in this thread.
Comment #17
BenK CreditAttribution: BenK commentedSubscribing
Comment #18
benanderson CreditAttribution: benanderson commentedsubscribing
Comment #19
rafal_p_s CreditAttribution: rafal_p_s commented@Azol
That patch is for what version of RM ?
because on revision_moderation 6.x-1.x-dev
i have a lot of errors in
patch -p1 < 995876-revision_moderation_d7_1.patch
f.e. in http://localhost/admin/content/node/revisions
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''50'' at line 1: SELECT n.nid, r.vid, n.type, r.title, r.uid, r.timestamp FROM {node} n INNER JOIN {node_revision} r ON n.nid = r.nid WHERE r.vid > n.vid ORDER BY r.vid DESC LIMIT :limit; Array ( [:limit] => 50 ) w revision_moderation_get_all_pending_revisions() (line 372 z /var/www/modules/revision_moderation/revision_moderation.module).
Comment #20
Azol CreditAttribution: Azol commentedThanks for report, I shall check it out.
Patch is for HEAD branch (http://drupalcode.org/viewvc/drupal/contributions/modules/revision_moder...).
Comment #21
didox CreditAttribution: didox commentedsubscribing
Comment #22
rafal_p_s CreditAttribution: rafal_p_s commentedOn apply that patch I dont have any errors.
But RM still doesnt work clear.
http://localhost/admin/content/node/revisions
give me that error msg
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''50'' at line 1: SELECT n.nid, r.vid, n.type, r.title, r.uid, r.timestamp FROM {node} n INNER JOIN {node_revision} r ON n.nid = r.nid WHERE r.vid > n.vid ORDER BY r.vid DESC LIMIT :limit; Array ( [:limit] => 50 ) w revision_moderation_get_all_pending_revisions() (line 396 z /var/www/drupal7/modules/revision_moderation/revision_moderation.module).
Btw sql query
SELECT n.nid, r.vid, n.type, r.title, r.uid, r.timestamp FROM node n INNER JOIN node_revision r ON n.nid = r.nid WHERE r.vid > n.vid ORDER BY r.vid DESC LIMIT 50
really give me 0
Comment #23
binford2k CreditAttribution: binford2k commentedTry replacing the parameter with a hardcoded value and see if the error goes away. I'm unable to replicate it on pgsql and sqlite.
$result = db_query('SELECT n.nid, r.vid, n.type, r.title, r.uid, r.timestamp FROM {node} n INNER JOIN {node_revision} r ON n.nid = r.nid WHERE r.vid > n.vid ORDER BY r.vid DESC LIMIT 50');
Comment #24
Azol CreditAttribution: Azol commentedI got it figured out, should use db_query_range instead of normal db_query when using LIMIT
Here is the updated FULL patch against the HEAD.
Comment #25
benanderson CreditAttribution: benanderson commentedsubscribing
Comment #26
jbrauer CreditAttribution: jbrauer commentedThanks for the work on this. It definitely looks like a great start. I should have more time to look at it this weekend. One thing I don't see offhand is any mention of hook_schema_alter to work with the moderate field in the node table if it's already present or add it if it's not.
Comment #27
Azol CreditAttribution: Azol commentedThanks for update, jbrauer!
To answer your question about Moderate field: it was dropped from D7 schema:
http://drupal.org/update/modules/6/7#moderate_column
Comment #28
jbrauer CreditAttribution: jbrauer commentedExactly which is why it's necessary to use hook_schema_alter in order to maintain backwards compatibility. Note that because it was dropped from the schema does not mean that it won't be present for D6 module users upgrading to the D7 version.
Comment #29
Azol CreditAttribution: Azol commentedNow this module does not change Moderate column for nodes in any way (as far as I know) - just retains the value it contains. Wouldn't it be a good point to drop this unsupported feature?
I would say the port would be great for D7 users from the beginning and it would be possible to add the upgrade path later on. Just my 2cp.
Performance wise, it holds good potential to change the module logic in the future versions, so the revision_moderation table would contain actual $node->vid, not just the 0/1 flag, to keep db_query() to an absolute minimum.
Comment #30
binford2k CreditAttribution: binford2k commentedThe current version w/ patches applied now errors if you click the publish link within the revision view. It works fine when you use the revert link in the list of all revisions.
Comment #31
binford2k CreditAttribution: binford2k commentedThis patch fixes my last post. The edit link is still broken, but I don't have time to finish it today. I'll fix it on Monday.
Comment #32
binford2k CreditAttribution: binford2k commentedwell that was more of a pain in the ass than I expected.
Comment #33
bforchhammer CreditAttribution: bforchhammer commentedsubscribing
Comment #34
carwin CreditAttribution: carwin commentedsubscribe
Comment #35
branana CreditAttribution: branana commentedThis patch is to make it so that nodes created before revision_moderation module is installed can work with revision_moderation too. This is based on comment HEAD + comment #24, #31, #32
Comment #36
knaffles CreditAttribution: knaffles commentedsubscribe
Comment #37
bforchhammer CreditAttribution: bforchhammer commentedWhich branch are the patches in this thread based on? HEAD, 7.x-1.x, 6.x-1.x?
Comment #38
Azol CreditAttribution: Azol commentedHEAD.
I will take some time to create a new consolidated patch, but I REALLY HOPE that jbrauer will finally create new 7.x branch, so we can patch against it.
Comment #39
bforchhammer CreditAttribution: bforchhammer commentedOkay, attached is a new patch against the (git) master branch incorporating #24, #31, #32 and #35.
Overall the port seems to be working nicely; two things I found while testing the patch:
You are currently viewing a revision of this post created on Sat, 02/26/2011 - 16:26 by Anonymous (not verified).
Warning: Parameter 1 to diff_diffs_overview() expected to be a reference, value given in menu_execute_active_handler() (line 501 of /var/www/bf_d7test/public_html/includes/menu.inc).
Comment #40
binford2k CreditAttribution: binford2k commentedGrumble. Apparently this module cannot handle more than one file either! I'll start working on fixing that on Friday.
Comment #41
binford2k CreditAttribution: binford2k commentedI've moved over to http://drupal.org/project/workbench_moderation, which is much nicer than this module.
Comment #42
Azol CreditAttribution: Azol commentedThanks for your great input and help, binford2k. It's a strange thing that there are at least 3 modules doing mostly the same, considering the "Drupal way" of opening new projects over existing ones.
Comment #43
binford2k CreditAttribution: binford2k commentedAnd they're all in different states of working or almost working now too!
Comment #44
jbrauer CreditAttribution: jbrauer commentedThanks binford2k for mentioning http://drupal.org/project/workbench_moderation
I spoke with Bec last week at Drupalcon and unless something unforeseen comes up I see workbench moderation as the way forward. The plan will be to write a conversion for sites moving from Revision Moderation in Drupal 6 to workbench moderation in Drupal 7 but there is enough overlap that it doesn't seem to make sense to keep both modules going forward.
Comment #45
binford2k CreditAttribution: binford2k commentedThanks for combining forces! I think that's a great plan and I'll be happy to help. There are still some missing features (such as Rules support) that I want to add to WBM. I'm using some lessons I learned from reading your code to get WBM in a state that I could use it.
Comment #46
Alex Andrascu CreditAttribution: Alex Andrascu commentedWould be wonderfull to have an upgrade path from Revision Moderation 6.x to Workbench 7.x if this is going to happen.
Otherwise it makes sense.
Great job with this module. Total life saver for me.
Comment #47
giorgio79 CreditAttribution: giorgio79 commentedInquired at Workbench Moderation on how to mimic Revision Moderation functionality:
#1136134: Update path from Revision Moderation
Comment #48
catchComing here from #542290: Make it easier to create draft revisions in core.
This module currently updates the vid in hook_node_update().
As you know this doesn't work in Drupal 7 due to Field API's model of always keeping the latest revision.
I ran into this on http://drupal.org/node/282122#comment-1927444 and that comment has working code (at least it worked on the time), which instead of munging the vid, clones the 'active' revision, saves the new one, then adds the active revision back to the top of the list. It is a workaround, but it's arguably no more of a workaround than changing vids around with direct database queries.
It should be possible to do that workflow without a core patch, but if it's not we could try to add helper functions (such as node_delete_revision() from that patch) to core to make it easier.
Comment #49
Azol CreditAttribution: Azol commentedBased on #44 and #48 I believe we can safely close this issue, as further porting of this module will require extensive reworking of the module logic. If anyone believes that this work should continue, feel free to reopen it. Moving on to Workbench Moderation.
Comment #50
RdeBoerAs mentioned on the Revision Moderation project page, if you like the style of this module, Revisioning may be a better fit, as it has its origins in Revision Moderation and a similar, but improved, UI. Over the last couple of years Revisioning has evolved a lot further than Revision Moderation.
Revisioning version is available now for both 6.x and 7.x