The Page Maintenance Mode module is very useful module. Site admin can put specific page into maintenance mode. Only site admin can see maintenance page. Using this module site admin can put multiple pages into maitenance mode and configure maintenance page message according to their requirement.
This module will create an admin configuration page.
admin/config/pagemaintenance/settings
This configuration page will have three option checkbox, page url and maintenance mode message.
Project link
https://www.drupal.org/project/page_maintenance_mode
Git instructions
git clone --branch 8.x-1.x git@git.drupal.org:project/page_maintenance_mode.git
Pareview checklist
https://pareview.sh/pareview/https-git.drupal.org-project-page_maintenan...
Comment | File | Size | Author |
---|---|---|---|
#12 | Screenshot at Sep 04 07-11-02.png | 165.13 KB | phthlaap |
#12 | Screenshot-empty-else.png | 270.55 KB | phthlaap |
Comments
Comment #2
Pinesh Kumar CreditAttribution: Pinesh Kumar commentedComment #3
Pinesh Kumar CreditAttribution: Pinesh Kumar commentedThank you for the contribution!
Added a Pareview link into the issue summary.
1. Bad line endings were found, always use unix style terminators.
./page_maintenance_mode.info.yml: ASCII text, with CRLF line terminators
./config/install/page_maintenance_mode.settings.yml: ASCII text, with CRLF line terminators
./page_maintenance_mode.permissions.yml: ASCII text, with CRLF line terminators
config/install/page_maintenance_mode.settings.yml
page_maintenance_mode.info.yml
page_maintenance_mode.permissions.yml
2. Coder Sniffer has found some issues with your code.
FILE: .../vendor/drupal/pareviewsh/pareview_temp/page_maintenance_mode.module
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------
72 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found
| | 12
74 | ERROR | [x] Expected one space after the comma, 0 found
75 | WARNING | [x] A comma should follow the last multiline array item.
| | Found:
| | 'https://www.drupal.org/project/page_maintenance_mode'
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
3. DrupalPractice has found some issues with your code.
FILE: ...areviewsh/pareview_temp/src/Form/PageMaintenanceModeSettingsForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------
77 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
82 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
87 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
89 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
94 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
95 | WARNING | t() calls should be avoided in classes, use dependency
| | injection and $this->t() instead
116 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
122 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
139 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
--------------------------------------------------------------------------
Comment #4
Pinesh Kumar CreditAttribution: Pinesh Kumar commentedComment #5
KuldeepM CreditAttribution: KuldeepM commentedI have fixed all warnings.
Comment #6
vuilComment #7
klausiThanks for your contribution!
I was trying to test for XSS vulnerabilities but was not able to access the settings page: TypeError: Argument 4 passed to Drupal\page_maintenance_mode\Form\PageMaintenanceModeSettingsForm::__construct() must be an instance of Drupal\page_maintenance_mode\Form\AliasManagerInterface, instance of Drupal\Core\Path\AliasManager given. Can you clear that up and fix the use statements? Thanks!
Comment #8
vuilThanks for the contribution!
Please fix the following issues:
(1.)
Unknown
AliasManagerInterface
usage in__construct()
method of classPageMaintenanceModeSettingsForm
.You maybe need to add one "use" statement more about.
(2.)
@klausi Yes, it is. Both of us make a review separately with the same issue.
Sorry for the duplication. :)
Comment #9
KuldeepM CreditAttribution: KuldeepM commentedI have fixed AliasManagerInterface issue.
Comment #10
phthlaap CreditAttribution: phthlaap as a volunteer and commentedPlease fix the issue reported by Drupal Check:
Comment #11
KuldeepM CreditAttribution: KuldeepM commentedFixed issue.
Comment #12
phthlaap CreditAttribution: phthlaap as a volunteer and commentedThank you for fixing issues
1. Could you please remove empty else.
2. Could you please take a look this screenshot? Is there a wrong typing or something special in PHP?
Comment #13
apaderno$$entity_type_manager
is correct PHP code, but in this case that is surely a typo for$entity_type_manager
.Thank you for the review, but we don't aim to point out every PHP errors/typos, except in cases such as the full file code being commented out, or the full code being outside functions/classes.
Comment #14
KuldeepM CreditAttribution: KuldeepM commentedI have fixed empty else & entity type manager typo issue.
Comment #15
S_Bhandari CreditAttribution: S_Bhandari as a volunteer commentedHi @KuldeepM,
I've reviewed your module and it works well for me. Also, Pareview.sh doesn't report any errors now.
Thanks,
Subhadeep
Comment #16
phthlaap CreditAttribution: phthlaap as a volunteer and commentedThank you for the contribution!
I have not found any security related issues into the code.
Comment #17
apadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, 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.
I thank all the dedicated reviewers as well.