I hereby wish to promote my sandbox project User Revision Edit to a full project and apply for git vetted access.
Version control
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/donschoe/2270791.git user_revision_edit
cd user_revision_editAbout the module
The User Revision Edit module extends the User Revision module by the edit revision functionality. This allows to modify each revision of a user including avatar and custom FAPI fields.

Example Usecase:
- If you are running a site with revisioned user profiles and you use the revisions as a public archive. Sometimes you have to apply corrections to the public archive pages (revisions) without hacking the database or redoing the whole revision history.
Module status:
- I've been working on this module for 4 weeks now. You can checkout my development cycle with the issue tracker and the recent commits.
- In addition, check out the automated code style testing at Pareview.sh. I've been running Coder reviews all the time.
- This module is used and funded by Parliamentwatch e.V. (NGO). It's used for public archived politician profiles which are can be modified by content managers of the site using the User Revision Edit module.
About the maintainer
I'm a software engineer from Berlin and developing Drupal sites for more than 6 years now.
Drupal contributions
- I stepped up to take over the 7.x development of the Views Dynamic Fields module 2 months ago and created a first stable 7.x version. Use the issue tracker and the commits to get a basic understanding of my maintainance stlye.
- The User Revision Edit module will be my first contibuted module which I built from scratch.
Review checklist
Repository and project page: https://drupal.org/sandbox/donschoe/2270791
My module is not a duplicate. It's extending the functionality of the User Revision module. In addition, this should not added to the User Revision module because modifying revision is not the default desired behaviour.
This module has only one application, the edit user revision functionality.
The repository contains code in the 7.x-1.xbranch, a first release tag7.x-1.0-alpha1was created to prepare the initial module release.
I've checked my code for possible security issues and caught user input using the available standard Drupal methods.
The repository does not contain a LICENSE file and no 3rd party code. I've written all the code by myself or adapted GPL-compliant code from Drupal core or contrib modules.
The project page contains detailled information and the README file includes installation and usage instructions.
The code contains inline-commets to make it easier to understand how this module works.
I've run automated tests with Coder, Code Sniffer and PAReview.sh, the results are available here.
I've tried to use the Drupal API correctly whenever possible.
I'm willing to maintain this module and I'm able to port it for Drupal 8 as soon as Drupal 8 enters a more stable beta phase (D8CX).
Got 5-Minutes?
- Launch Simplytest.me sandbox.
- Enable devel module and generate some users.
- Go to people and select one.
- Find the revision tab and chose a revision.
- Edit the revision and report back if everything works out.
Module reviews
Thanks for your time.
---donSchoe
Comments
Comment #1
donSchoe commentedComment #2
donSchoe commentedAccidently hit "save" instead of "upload"... will update the description and reopen it again.
Comment #3
donSchoe commentedHere we go. Please leave any feedback for this module. Thanks.
Comment #4
donSchoe commentedComment #5
donSchoe commentedComment #6
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #7
donSchoe commentedAdded 3 reviews and applied the PAReview: review bonus tag.
Comment #8
donSchoe commentedGot 5-Minutes?
Comment #9
donSchoe commentedComment #10
miroslavbanov commentedHi DonSchoe,
That's certainly an interesting module, if I don't exactly agree with the idea of changing previous revisions of anything.
Drupalcs automated testing has picked up some errors:
You should split the administration part of this module in a spearate user_revision_edit.admin.inc file.
You shouldn't adhere so strictly to the 80 characters per line rule. Some parts would be more readable if you don't break the line.
Module info file lines 7-11
You don't have any tests, so you shouldn't have any test dependencies either.
In module file, at lines 4, 24, 43, 85, 238, 278, 296, 303, 413, 428, 434 you have links to pages on drupal.org. There should only be links, if something is particularly confusing, and you need to link to a page which will explain why this is, or you need to link to a page that documents certain behavior. And the syntax is:
* @see http://drupal.org/node/2270833
On line 74, the check for 'node_admin_theme' variable is not correct. What do user revisions have to do with a configuration setting for nodes?
Lines 99-126 the checking of permissions can be a lot more compact, and easily readable:
On line 222, inside a form constructor, you should use form_load_include().
On line 330, why is the cache_clear_all() call needed? I don't think it is.
On line 31 and 364 _user_revision_edit_access() is only used on one place, so you shouldn't pass permissions as arguments. I haven't seen permissions being passed as array to an access callback like that. You can explicitly check for the two:
You should change the argument name from $u to something more descriptive.
Comment #11
donSchoe commentedHi MiroslavBanov,
thank you for your review.
I created this extra module on purpose. My first intention was to just submit a patch for the User Revision module, but I soon noticed making revisions editable is not the behaviour that should be available by default. Therefore, if you have a use case (like the one I described) and you are really sure you wish to make revisions editable, you have to install a new module (User Revision Edit). That way I avoid revisions get modified by accident.
I'm aware of the automated testing results by pareview.sh and coder, but these are all false negatives. I will explain why:
// Does really important stuff. #1234watchdog()warning is a pure false negative. If you check the code you will find the second argument actually being enclosed witht(). The parser seems not to like my code formatting.. :-)Which is already wrong defined in drupal core API: https://api.drupal.org/api/views/modules!user!views_handler_field_user_l...
For the sake of readability of the code I wish to keep this naming pattern.
Concerning the manual review:
'node_admin_theme'sounds confusing but this is actually the name of the config variable which holds the configuration of the administration seem option and is not limited to editing nodes. See: http://drupal.stackexchange.com/q/8220/13526// @see http://drupal.org/node/1234style.module_load_include()toform_load_include()in my form.$uand$permto$accountand$permissions.Commit: http://cgit.drupalcode.org/sandbox-donschoe-2270791/commit/?id=0943eb653...
Setting back to Needs Review to recieve more feedback to the module and its code.
Comment #12
miroslavbanov commentedHi donSchoe,
Lets review the items one by one:
Remove t(). First argument of t() should become the
$messageof watchdog(), and second argument - the$variables.I meant to move every page callback in hook_menu and hook_menu_alter to be in separate file(s). This means:
In hook_menu and hook_menu_alter add
'file' => 'user_revision_edit.admin.inc',And move hook_admin_paths() back to module, or it won't work.
Syntax is correct, but I was thinking that these references should be removed. Because, is there any reason for a future you, or other developer looking at the code, to see these? If you need to track what change was introduced where, that's what git history and commit messages are for.
Anyway, I am satisfied with this module, and I am sure you will fix these small issues that are left. I hope you get more reviews soon and be given permissions to create full projects. Good luck :)
Comment #13
donSchoe commentedHey, thanks again for your review. I already learned alot.
Fixed in commit 8fd3feb.
That's all I guess. Any one else? :-)
Comment #14
donSchoe commentedComment #15
miroslavbanov commentedIt's not call-time. I meant for the form constructor to get &$form_state by reference:
Other than that, I am satisfied with the changes.
Comment #16
donSchoe commentedComment #17
nuezHi donSchoe,
First of all: Thanks for your contribution.
Automated Review
I see this issue was addressed in the previous comments (#11), and i agree on that.
Manual Review
In general everything looks pretty good. Some issues I've found are:
I'm not changing the status to 'needs work' since these issues are not really show stoppers I think, but will leave the decision to RTBC to someone else...
Comment #18
donSchoe commentedHi nuez,
thank you for your review.
I've decided to rename the views handler class according to coding standards now. The module is now free from any pareview.sh issues. About your manual review:
Commit 4ff4b70.
So far, so good? :-)
Comment #19
gisleAutomated Review
PAReview came up clean.
Manual Review
The documentation is too brief. For instance, the module creates two permissions. Configuration of permissions and their security implications is not documented. Please see the guidelines for in-project documentation. Not a blocking issue, tho'
There are IMHO no more blockers. Moving to RTBC. Note that promotion will not happen until a git administrator has given this a second set of eyeballs.
Comment #20
donSchoe commentedThanks, I just have improved the README.txt file.
Comment #21
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
But that are not critical application blockers, so ...
Thanks for your contribution, donSchoe!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #22
donSchoe commentedHello klausi,
thanks for approving my application.
$permissionsfrom the access callback.drupal_get_form()is returning a processed form which is not working for our needs here. We only need to rebuild it as discussed here: http://drupal.stackexchange.com/q/120193/13526And thanks to @MiroslavBanov, @nuez and @gisle for your reviews.