Maintenance Mode Exclude Urls is a very simple and light weight
module. It allows certain pages to be shown
even when the site is offline.

There are certain cases when you will put your site in maintenance mode
but still want to show some pages(generally READONLY pages) to the
end user. You can use this module in those cases.

Sandbox Path:
https://www.drupal.org/sandbox/src1988/2312231

GIT Clone Path:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/src1988/2312231.git mmeu

Code Reviews:
https://www.drupal.org/node/2304319#comment-9023139
https://www.drupal.org/node/2315289#comment-9026159
https://www.drupal.org/node/2315327#comment-9029301

Comments

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.

rob.barnett’s picture

src1988,
I tested out Maintenance Mode Exclude Urls and it works as intended. All of the files pass code sniffer. One minor fix you can make is a type in your hook_form_FORM_ID_alter function in the description: miantenance. The README.txt file is empty so it might be nice to create one with a usage explanation even though it's very easy to use.

I've had to add just this type of functionality to sites I've created so I think this can be a very useful module. Good luck.

Rob

Michael Hodge Jr’s picture

Status: Needs review » Needs work

I went in and did a review of your project. I found the following issues you may want to consider fixing.

Ensure the project page contains detailed information.

I would add a few more details on your project page explaining what the module does and how it works. It would give site builders a little better idea as to if this module is right for there project.

Ensure the repository contains a detailed README.txt.
As hurley mentioned, the projects README.txt is empty. I'd suggest filling it out and you can find a great template for that here.

Code Too Short
Because your .module file contains <40 lines of code, I'd suggest adding maybe a few additional API calls. The approvers are going to want to make sure that you have a good understanding of the Drupal APIs before granting full commit access. You may want add an additional hook_help(). They are looking for at least 120 lines of code or five functions. Is there a way you can up the complexity some? If not, they are able to approve one-time projects only, but you wouldn't have full access (not sure if that is of concern for you or not).

Overall, I really like the module as it makes sites a little more usable in maintenance mode and I think it definitely has a place. Great job @src1988

sonu.raj.chauhan’s picture

Issue summary: View changes
sonu.raj.chauhan’s picture

Status: Needs work » Needs review

Hi Micheal, thanks for the review.

Here is the list of changes i made.

Ensure the project page contains detailed information.

DONE.

Ensure the repository contains a detailed README.txt.

README.txt file has been modified.

Code Too Short
I know that the code is very short, but it will be an overkill if i add any complexity to the code.
If anything extra and useful comes to my mind, i will definitely add it.

Any Suggestions are welcome.

Michael Hodge Jr’s picture

Status: Needs review » Reviewed & tested by the community

I think at this point you are good to go.

Michael Hodge Jr’s picture

Status: Needs review » Reviewed & tested by the community

I think at this point you are good to go.

sonu.raj.chauhan’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
sonu.raj.chauhan’s picture

Issue summary: View changes
joshi.rohit100’s picture

Status: Reviewed & tested by the community » Needs work

Spelling mistake in description "miantenance".

Currently your module only works with the pattern but if I create a node with with path alias and I use that path instead of node/nid, then this doesn't work.

I think (my opinion), this should also work.

sonu.raj.chauhan’s picture

Hi Rohit, Thanks for the review

Spelling Mistake has been Resolved.

Path alias support has been added.

sonu.raj.chauhan’s picture

Issue summary: View changes
sonu.raj.chauhan’s picture

Status: Needs work » Needs review
anil280988’s picture

Provide the proper path for the git clone.
Like this: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/src1988/2312231.git maintenance_mode_exclude_urls

anil280988’s picture

Line 15, file mmeu.module, function mmeu_form_system_site_maintenance_mode_alter()
You shoud use single quote in function t() (like the previous one)

Line 30, file mmeu.module, function mmeu_menu_site_status_alter()

if ($menu_site_status == MENU_SITE_OFFLINE && trim(variable_get('mmeu_urls', '')) != ''

The best way to make a comparison is use function empty(). So it should be like

if ($menu_site_status == MENU_SITE_OFFLINE && !empty(trim(variable_get('mmeu_urls', '')))

anil280988’s picture

Status: Needs review » Needs work
sonu.raj.chauhan’s picture

Issue summary: View changes
sonu.raj.chauhan’s picture

Issue summary: View changes
sonu.raj.chauhan’s picture

Status: Needs work » Needs review

Hello Anil, Thanks for the review.

1) Git url problem has been fixed

2) Line 15, file mmeu.module, function mmeu_form_system_site_maintenance_mode_alter()
You shoud use single quote in function t() (like the previous one) : FIXED

3)Line 30, file mmeu.module, function mmeu_menu_site_status_alter()

if ($menu_site_status == MENU_SITE_OFFLINE && trim(variable_get('mmeu_urls', '')) != ''

The best way to make a comparison is use function empty(). So it should be like

if ($menu_site_status == MENU_SITE_OFFLINE && !empty(trim(variable_get('mmeu_urls', ''))) : I THINK ITS FINE FOR NOW

gbisht’s picture

Status: Needs review » Reviewed & tested by the community

@src1988 all the changes done by you looks good. And as mentions by @Michael this project can be approved on the bases of one-time projects only.

joshi.rohit100’s picture

Status: Reviewed & tested by the community » Needs work

In form alter, you have put the description in t() function in single quotes. Thats fine but now its breaking due to The '*' .

sonu.raj.chauhan’s picture

Status: Needs work » Needs review

Hello @rohit, Thanks for the review.

Fixed.

joshi.rohit100’s picture

Status: Needs review » Reviewed & tested by the community

i thinks its fine now.

mpdonadio’s picture

For future reviewers reading this, a single missed t() is not a reason to go back to Needs Work. In general, total disregard of t() or widespread strings that are left untranslated are a reason to go back to Needs Work (falls under major API problem). A few strings here and there should be noted, but should not be a blocking issue by itself. The goal of reviews is to identify major problems and ensure a good grasp of the Drupal API, not to achieve perfection (other than security / thirdparty / liecensing issues).

mpdonadio’s picture

Automated Review

Git default branch is not set, see the documentation on setting a default branch.

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

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: mmeu.module
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     15 | WARNING | Avoid backslash escaping in translatable strings when possible,
        |         | use "" quotes instead
    --------------------------------------------------------------------------------
    
    
  • 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

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
Yes: Follows the guidelines for 3rd party code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
No: Doesn't follows the guidelines for project length and complexity.
Code too short
This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project for you.
Code too simple
This project does not demonstrate sufficient hook usage and/or API integration, therefore it is only eligible for a one-time promotion to a full project. You can find more info at Working with the Drupal API.

This is an important criterion so that code integrates well and can be improved over time. I encourage you to continue developing and gaining from the feedback available in the git approval process.

Thank you for you contributions and understanding.

Secure code
Yes. If "no", list security issues identified.
Coding style & Drupal API usage

The info file should have the path to the maintenance mode configuration page.

In mmeu_menu_site_status_alter(), the variable_get() needs a default value. You also have three calls to get ths same variable. Save it off; that will also shorten up the if() clause.

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.

This is way too short to grant vetted access. However, the form is XSS clean, everything looks like it is implemented
properly, and it seems to work as advertised. I also did a search, and I am not seeing this feature implemented elsewhere.
Using this could cause problems for site owners in some circumstances, but I think this could be a valuable addition to
the module space for certain situations.

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

I promoted this. I did not enable releases or fix the default branch (you can do this).

Thanks for your contribution, src1988!

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.

mpdonadio’s picture

Status: Reviewed & tested by the community » Fixed

Blerg.

sonu.raj.chauhan’s picture

@mpdonadio,

First of all sorry for the delayed response and thanks for approving the project.

1) Code sniffer issue has been fixed
2) I enabled the releases and fixed the default branch.

Learned a lot from the module review process and will try to contribute more useful things in future.

Status: Fixed » Closed (fixed)

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