I've created a module that shows all existing URL aliases assigned to a node on a node edit page. I had a problem on one of the sites when multiple aliases were created for the same node that caused issues with some business logic and SEO. This module is meant to make it more transparent to site admins how many aliases are assigned to a node and also allow them to edit and delete those if user has necessary permissions.

Project sandbox page:
https://www.drupal.org/sandbox/artem.kolotilkin/2503121

Git clone command:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/artem.kolotilkin/2503121.git show_node_aliases

Thanks!

Manual reviews of other projects:
https://www.drupal.org/node/2514954#comment-10083012
https://www.drupal.org/node/2513090#comment-10083952
https://www.drupal.org/node/2509862#comment-10084058

Comments

temkin’s picture

Issue summary: View changes
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxartemkolotilkin250312...

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.

temkin’s picture

Status: Needs work » Needs review

Fixed issues identified by automated review tool.

himmatbhatia’s picture

Hello,

You have used hook_form_FORM_ID_alter(). But the comment above of this you have written ( Implements hook_form_alter() ).
It should be Implements hook_form_FORM_ID_alter().

Also in the same function show_node_aliases_form_node_form_alter you have not $form_id as a last arguments.

Thanks

himmatbhatia’s picture

Status: Needs review » Needs work
himmatbhatia’s picture

Hello,

You have not used hook ( hook_help ). This hook provide help regarding the module in the admin interface.
So user can see what this module does

Thanks

berdyshev’s picture

  • It's better to use render array to render table and label (see here)
  • In case user doesn't have permission to manage aliases, the third cell will be omitted (but there still be present header column), so it will look bad.
  • According the Drupal best practices, it's better to use chaining queries.
temkin’s picture

Status: Needs work » Needs review

Thank you for the review guys. You remarks were addressed. Here is the list:
1. Added hook_help with relevant information.
2. Updated comment to correctly mention hook_form_FROM_ID_alter
3. Switched to render array to output module data
4. Switched SQL query to Drupal's chaining.

Please give it another look and let me know if anything else id needed.

- Artem

darol100’s picture

Status: Needs review » Postponed (maintainer needs more info)

Automated Review

Pareview.sh - It show couple errors., http://pareview.sh/pareview/httpgitdrupalorgsandboxartemkolotilkin250312...

Coder Review

Coder complains are the same as the Pareview.sh.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: Causes 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 guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
No: Does follows the guidelines for project length and complexity.
Secure code
Yes: Meets 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. The Redirect module have the same functionality and even more. As we change our project application process in #2453587: [policy, no patch] Changes to the project application review process we are not allowed to block applications base on module duplication. We can still recommend collaboration over competition, but we should not enforce it.
  2. This project is too short, would be you be interested on Single Project Promotion?

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.

klausi’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +PAreview: single application approval

No need to postpone this, if there is not enough code we will do a single project promotion automatically.

Anything else that you found or should this be RTBC instead?

temkin’s picture

Thanks guys!

More than happy to have it as a single project. I have plans to develop a different more robust module than that. There is just a need for this specific functionality on multiple projects, that's why wanted to have it as a contrib module.

I fixed spacing issues reported by Pageview.sh. As for the code duplication, I don't think that Redirect module does the same thing. I have it installed and it doesn't really tell you all the aliases that are assigned to a node. What it shows is the list of redirects assigned to that page which is different. That's actually the whole purpose of the module to show aliases in addition to redirects as in some cases the combination of these two result in redirect loops.

Let me know if I'm missing something. And thanks again for a review!

darol100’s picture

Status: Needs review » Reviewed & tested by the community

I do not see any blockers.

temkin’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
naveenvalecha’s picture

Assigned: Unassigned » sreynen

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

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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 :

  1. show_node_aliases_help : As the Readme.txt is provided by module itself.So there is no need to sanitize the text of it.Please remove filter_xss_admin and check_plain
  2. Ideally hook_help should be at top.So please move the show_node_aliases_help to the top of all functions in file.
  3. The module is using path module internally.So add the hard dependency on the path module in .info file.
  4. Please add some more details to the project page. https://www.drupal.org/sandbox/artem.kolotilkin/2503121

Duplication : Redirect module provides the similar fucntionality AFAIK,As we are not blocking the issues with duplication anymore.
So RTBC
Assigning to sreynen to give it a final look if he has time.

temkin’s picture

Thanks, naveenvalecha! Looking forward to sreynen's review and approval.

Meanwhile, issues identified by a previous review were resolved:
1. Done
2. Done
3. Done
4. Done

As for the duplication, I know it looks confusing, but Redirect module shows different information. It shows list of Redirects assigned to the node, while my module shows list of aliases which is not the same. Actually, a combination of these 2 can cause really bad things on the site, like loop redirects. Here is an example. You have About Us page with an alias "about-us". You want to change it to be just "about"and make this change. Sometimes, instead of updating an alias to a new one, system creates a new alias and as a result you have 2 aliases assigned - "about-us" and "about". I know that because I had it happened on multiple sites. That's an issue that needs to be resolved separately, but there is a fact that it happens. If you have Redirect module installed it will also create a redirect from "about-us" to "about". So now you have a node with 2 aliases and a redirect from one alias to another. The result is - user tries to open "about-us" page. Redirect kicks in and redirects to "about". System knows that "about" is an alias of node/X and opens that page. Sometimes during that process it also tries to get a correct alias for that node, and gets "about-us" alias which triggers a redirect again. That causes infinite loop...

Sorry, for a long explanation, I just wanted to show that alias and redirects are not the same and a combination of those can cause problems. There may be other cases when it's helpful to see all aliases assigned to a page, especially for multilingual sites.

jelenakrmar’s picture

In hook help, you have this line of code:

case 'admin/help#show_node_alias'

Your module's name is show_node_aliasES, and because of that typo, help links do not appear on modules listing page, nor on help page....

You have the same typo on line 14, in file_get_contents function....

In readme.txt, you should mention that this module requires path module.

temkin’s picture

Thanks jelenakrmar,

I've fixed the typo and updated Readme file.

cweagans’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution!

I have promoted this project from sandbox to full project on your behalf.

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.

Status: Fixed » Closed (fixed)

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