Description

Replaces the numeric menu link weight dropdown with a tabledrag widget.

Screenshot

Project page

https://www.drupal.org/sandbox/stefan.r/2453539

Clone Repository

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/stefan.r/2453539.git menu_link_weight
cd menu_link_weight 

Manual review of other projects

https://www.drupal.org/node/2408789#comment-9737929
https://www.drupal.org/node/2448351#comment-9738165
https://www.drupal.org/node/2444455#comment-9738363

CommentFileSizeAuthor
#15 coder-results.txt1.59 KBklausi

Comments

kunalkursija’s picture

Hi Stefan,

1) There is some formatting issue in your module file : Related to concatenation. (Kindly check with Coder Module)

2) There are some other issues in it too, you can check here http://pareview.sh/pareview/httpgitdrupalorgsandboxstefanr2453539git
Ex : you have used $form_state['input'] instead of $form_state['values'].

3) Refer PAREVIEW to execute the script again.

stefan.r’s picture

Thank you @kunal.kursija!

I have corrected the outstanding issues. The $form_state['values'] warning we can disregard in this case. During validation, the only way to get the old values that were stored in the form as hidden fields is using $form_state['input'].

It says to use those "where possible", and here it was actually not possible (as this contains new values by the time we reach validation, the process function overrides the old ones).

PA robot’s picture

We 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.

VikrantR’s picture

Status: Needs review » Needs work

Hi Stefan,
I still see some issues on :

http://pareview.sh/pareview/httpgitdrupalorgsandboxstefanr2453539git

Please correct it.

stefan.r’s picture

Issue summary: View changes
stefan.r’s picture

Status: Needs work » Needs review

@VikrantR the warning you mention had actually been explained before in comment #2. Just to prevent reviewers from raising this issue again, I have done a new commit that hides the warning :)

Babou’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review

Review of the 7.x-1.x branch (commit 62c8d37):

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.

Source: http://pareview.sh/pareview/httpgitdrupalorgsandboxstefanr2453539git - PAReview.sh online service

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
Looks good to me.

This review uses the Project Application Review Template.

stefan.r’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
sandeep.kumbhatil’s picture

Automated Review

Looks Fine.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. Looks fine for me
  2. Just a recommendation: In your .info file you have mentioned package as Menu Link Weight you should keep it blank until and unless there is matched package available there for your project.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walk-through are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

VikrantR’s picture

Automated Review

No issues found on http://pareview.sh/

Manual Review

Individual user account
Yes: Follows.
No duplication
Yes: Does not cause.
Master Branch
Yes: Follows.
Licensing
Yes: Follows.
3rd party assets/code
Yes: Follows.
README.txt/README.md
Yes: Follows.
Code long/complex enough for review
Yes: Follows. the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. Looks perfect for RTBC

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

mpdonadio’s picture

Assigned: Unassigned » mpdonadio

Assigning to myself for next review.

mpdonadio’s picture

Assigned: mpdonadio » klausi

Automated Review

Review of the 7.x-1.x branch (commit e1c4bb7):

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.


FILE: ..._link_weight/pareview_temp/js/menu_link_weight.hierarchical_select.js
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 2 | ERROR | [x] Doc comment short description must be on the first line
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: ...pbox/Drupal/par/menu_link_weight/pareview_temp/js/menu_link_weight.js
---------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------
  2 | ERROR | [x] Doc comment short description must be on the first line
 24 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: ...box/Drupal/par/menu_link_weight/pareview_temp/menu_link_weight.module
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 109 | ERROR | sizeof() is a function name alias, use count() instead
---------------------------------------------------------------------------


FILE: ...rupal/par/menu_link_weight/pareview_temp/menu_link_weight.reorder.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 3 | ERROR | [x] Doc comment short description must be on the first line
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

Time: 521ms; Memory: 9.75Mb

Minor stuff; non-blockers.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code

I am not seeing menu item access checks, but I spun this up on simplytest.me and did a quick test, and didn't see any access bypass problems where node titles were revealed that shouldn't be visible.

Also explicitly tested some XSS, and didn't see any problems.

Coding style & Drupal API usage
Yay tests!

Drupal.behaviors.MenuLinkWeightHierarchicalSelect doesn't use the context that got passed in.

(+) Left-right drags didn't seem to work for me, but this would be a bug and not a blocker.

You don't need to do things to "trick" the PAreview; just comment why something is a false positive.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

Not seeing any blockers. I would like @klausi to take a second look at this for menu security.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

stefan.r’s picture

Thanks! By Left-right drags you mean changing the parents of the menu link? That's explicitly disallowed, you would change the parent in the parent dropdown instead :)

mpdonadio’s picture

I'm pretty sure I was trying to do this with the menu item was was being created (ie, on a new node).

klausi’s picture

Assigned: klausi » Unassigned
Status: Reviewed & tested by the community » Fixed
StatusFileSize
new1.59 KB

Review of the 7.x-1.x branch (commit d87a1a6):

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.

menu_link_weight_form_node_form_alter() is only accessible for menu admins, so I think menu access is sufficiently protected here.

Looks all good to me.

Thanks for your contribution, stefan.r!

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.

stefan.r’s picture

Thanks klausi! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.