- Issue created by @joshi88
- Status changed to Active
8 months ago 5:53pm 15 March 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
Thank you for applying!
Please read Review process for security advisory coverage: What to expect → for more details and Security advisory coverage application checklist → to understand what reviewers look for. Tips for ensuring a smooth review → gives some hints for a smoother review.
The important notes are the following.
- If you have not done it yet, you should run
phpcs --standard=Drupal,>DrupalPractice
on the project, which alone fixes most of what reviewers would report. - For the time this application is open, only your commits are allowed.
- The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status will not be changed by this application; no other user will be able to opt projects into security advisory policy.
- We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the branch to review and the project name.
To the reviewers
Please read How to review security advisory coverage applications → , Application workflow → , What to cover in an application review → , and Tools to use for reviews → .
The important notes are the following.
- It is preferable to wait for a Code Review Administrator before commenting on newly created applications, even to leave a comment similar to the following one. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
- It is also preferable to wait before using a CLI tool → to report what needs to be changed, especially because the comment left from Code Review Administrators suggests to use PHP_CodeSniffer. Before that, manual reviews should be done.
- Reviewers should not copy-paste the output of a CLI tool. They should use a CLI tool only once per application. When they do that, they should later verify the code has been correctly changed; this means, for example, that adding a documentation comment that is not correct just to avoid to get a warning/error is not a correct change that should be reported in a further comment.
- It may be best to have the applicant fix things before further review.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues → .
- If you have not done it yet, you should run
- 🇮🇳India vishal.kadam Mumbai
Remember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
- Status changed to Needs review
8 months ago 7:01am 17 March 2024 - Status changed to Needs work
8 months ago 2:17pm 17 March 2024 - 🇮🇳India vishal.kadam Mumbai
Usually, after reviewing a project, we allow the developer to opt projects into security advisory coverage.
This project is too small for us and it doesn't contain enough PHP code to really assess your skills as a developer.
Have you made any other contributions that we could instead review?
- 🇮🇳India vishal.kadam Mumbai
This application can only continue with another project that contains sufficient PHP code.
- 🇮🇳India joshi88
#9, @vishal I had worked on Drupal 7 project.
https://www.drupal.org/project/zoomnow → Please have a look. - Status changed to Needs review
8 months ago 5:04pm 24 March 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
That project cannot be used for these applications, as comments #9 and #12 said.
- 🇮🇳India joshi88
@Vishal Please review it.. Please guide me What I need to do, if still its not eligible.
- Status changed to Needs work
8 months ago 1:50pm 27 March 2024 - 🇮🇳India vishal.kadam Mumbai
1. FILE: zoomnow.module
/** * @file * Adds a formatter for zoomnow. */
The description for a module is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.
function zoomnow_field_formatter_settings_form( $field, $instance, $view_mode, $form, &$form_state ) {
function zoomnow_field_formatter_settings_summary( $field, $instance, $view_mode ) {
function zoomnow_field_formatter_view( $entity_type, $entity, $field, $instance, $langcode, $items, $display ) {
Function and method declarations are written on a single line.
2. FILE: zoomnow.js
//var fetchOptions = Drupal.settings['zoomnow_selected_option']['zoomnow_option_selected'];
Remove commented code.
- 🇮🇳India joshi88
Hi @vishal I have removed unwanted comment from
zoomnow.js
file.
Module name in zoomnow.info file:name = ZoomNow description = will show zoom functionality on images. package = Zoom core = "7.x" configure = admin/config/user-interface/zoomnow dependencies[] = jquery_update
- Status changed to Needs review
8 months ago 5:02am 28 March 2024 - Status changed to Needs work
8 months ago 7:15am 28 March 2024 - 🇮🇳India vishal.kadam Mumbai
Module file changes are still pending. Please see point 1 in my Comment #17 → .
- 🇮🇹Italy apaderno Brescia, 🇮🇹
- The following points are just a start and don't necessarily encompass all of the changes that may be necessary
- A specific point may just be an example and may apply in other places
- A review is about code that doesn't follow the coding standards, contains possible security issue, or does not correctly use the Drupal API; the single points are not ordered, not even by importance
zoomnow.module
/** * @file * Adds a formatter for zoomnow. */
The usual description for a .module file is Hook implementations for the [module name] module. where [module name] is the name of the module reported in its .info file.
/** * Implements hook_field_formatter_settings_summary(). */ function zoomnow_field_formatter_settings_summary( $field, $instance, $view_mode ) {
Drupal coding standards says function declarations are written on a single line, even if they exceed 80 characters.
/** * Implements zoomnow_zoomfunction_form(). */ function zoomnow_zoomfunction_form($form, &$form_state) { $form = array(); $opt = array('hover' => t('hover'), 'click_active' => t('Click on active')); $form['selected_option']['zoomnow_option_selected'] = array( '#type' => 'radios', '#title' => t('Zoom Plugin options'), '#options' => $opt, '#default_value' => variable_get('zoomnow_option_selected', 'hover'), '#required' => TRUE, ); return system_settings_form($form); }
That is not a hook implementation but a form builder. Its documentation comment must be different.
zoomsnow.tpl.php
drupal_add_css(drupal_get_path('module', 'zoomnow') . '/zoomnow.css'); drupal_add_js(drupal_get_path('module', 'zoomnow') . '/jquery.zoom.min.js'); drupal_add_js(drupal_get_path('module', 'zoomnow') . '/zoomnow.js');
It's quite too late, to add JavaScript files from a template file. They can be added with
#attached
in a function that returns a render array. - Status changed to Needs review
8 months ago 10:07am 28 March 2024 - Status changed to Needs work
7 months ago 4:40pm 8 April 2024 - 🇮🇳India vishal.kadam Mumbai
I have reviewed your changes. I can see that not all feedback from comment #22 → has been addressed. Please double-check.
- Status changed to Needs review
7 months ago 11:05am 30 April 2024 - 🇮🇳India joshi88
@vishal I have fixed. Please have a look when you will get a chance.
- 🇮🇳India joshi88
HI Vishal.. Please also guide me for my D10 project.. You had mentioned on #9.
- 🇮🇳India vishal.kadam Mumbai
Rest looks fine to me.
Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.
- Status changed to RTBC
6 months ago 6:06pm 7 May 2024 - 🇮🇳India joshi88
@Vishal. Please guide me what would be my next step..
- 🇮🇳India vishal.kadam Mumbai
Wait for the final review from a Code Review Administrator.
- 🇮🇳India joshi88
Hi Vishal . Do you have any rough idea, that how long will it take to final review. Because my d10 module depend on this. Once it will be approve then you will consider d10 project…
- 🇺🇸United States cmlara
@joshi88: I suggest you re-read comment #5 it includes details about timelines.
There are many applications in the queue that have waited longer than yours have and you have not taken any of the steps available to accelerate your application documented in the application process.
It is important to note that Security Coverage is not required to publish modules.
Security coverage means:
- You as a maintainer promise the community to fix security issues (you can do this without having the opt-in permission)
- The Drupal Association/Drupal.org website will no longer encourage uncoordinated public disclosure of vulnerabilities (this is an ethics issue on its own)
- The public might report vulnerability privately (even security covered modules may often find public reports)
- That the Drupal security team might remove public posts on D.O. regarding the issue to allow time to for private resolution. The security team is under no obligation to remove posts and may choose not to at their leisure. (GitLab Issues conversion may help this as module maintainers may be able to mark their own issues as private)
- Users of your module might get notified through an SA and composer that security bugs exist. (The DST does not publish all security vulnerabilities)
- Status changed to Needs work
6 months ago 8:02pm 12 May 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
zoomnow.module
/** * Implements hook_init(). */ function zoomnow_init() { // Add CSS file. drupal_add_css(drupal_get_path('module', 'zoomnow') . '/zoomnow.css'); // Add JavaScript files. drupal_add_js(drupal_get_path('module', 'zoomnow') . '/jquery.zoom.min.js'); drupal_add_js(drupal_get_path('module', 'zoomnow') . '/zoomnow.js'); }
My previous comment suggested to use
#attached
in a function that returns a render array. It meant to use#attached
in the function that callstheme('zoomnow_images', $variables)
.function zoomnow_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) { $element = array(); if ($display['type'] == 'zoomnow_formatter') { $element['#attached']['css'] = array( drupal_get_path('module', 'zoomnow') . '/zoomnow.css', ); $element['#attached']['js'] = array( drupal_get_path('module', 'zoomnow') . '/jquery.zoom.min.js', drupal_get_path('module', 'zoomnow') . '/zoomnow.js', ); foreach ($items as $delta => $item) { $variables = array( 'file' => $item, ); $element[$delta] = array( '#markup' => theme('zoomnow_images', $variables), ); } } return $element; }
$items['admin/config/user-interface/zoomnow'] = array( 'title' => t('ZoomNow'), 'description' => t('Manage the ZoomNow settings.'), 'page callback' => 'drupal_get_form', 'page arguments' => array('zoomnow_zoom_settings_form'), 'access arguments' => array('administer zoomnow'), 'type' => MENU_NORMAL_ITEM, );
Title and description musts be untranslated strings. They are passed to the title callback, which by default is
t()
./** * Implements hook_form(). */ function zoomnow_zoom_settings_form($form, &$form_state) { $form = array(); $opt = array('hover' => t('Hover'), 'click_active' => t('Click on active')); $form['selected_option']['zoomnow_option_selected'] = array( '#type' => 'radios', '#title' => t('Zoom Plugin options'), '#options' => $opt, '#default_value' => variable_get('zoomnow_option_selected', 'hover'), '#required' => TRUE, ); return system_settings_form($form); }
That function is not a
hook_form()
implementation.$form
must not be initialized to an empty array. A form builder just adds form elements to the$form
argument it receives. Seeaggregator_form_category()
, for example.function aggregator_form_category($form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) { $form['title'] = array( '#type' => 'textfield', '#title' => t('Title'), '#default_value' => $edit['title'], '#maxlength' => 64, '#required' => TRUE, ); $form['description'] = array( '#type' => 'textarea', '#title' => t('Description'), '#default_value' => $edit['description'], ); $form['actions'] = array( '#type' => 'actions', ); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); if ($edit['cid']) { $form['actions']['delete'] = array( '#type' => 'submit', '#value' => t('Delete'), ); $form['cid'] = array( '#type' => 'hidden', '#value' => $edit['cid'], ); } return $form; }
jquery.zoom.js
jquery.zoom.min.js
Files available in other repositories should not be committed on drupal.org repositories. Instead, people installing the module should get instructions on how to obtain those files.
zoomnow.js
(function ($) { 'use strict'; Drupal.behaviors.zoomnow = { attach: function (context, settings) { var fetchOptions = Drupal.settings.zoomnow_selected_option.zoomnow_option_selected; if (fetchOptions === 'hover') { $('.zoomnow').zoom(); } if (fetchOptions === 'click_active') { $('.zoomnow').zoom({on: 'click'}); } } }; })(jQuery);
To avoid a behavior is attached twice to the same CSS selector,
$('.zoomnow', context).once()
must be used.README.txt
Since the file has been committed, it should also follow closely the structure described in README.md template → (and use .md as extension).
The project description needs to be more detailed; it should also make clear in which way the module is different from modules like Zooming → (and other modules that can be found by searching for zoom → ).
- 🇮🇳India vishal.kadam Mumbai
I am changing priority as per Issue priorities → .
- Status changed to Closed: won't fix
about 2 months ago 8:24am 24 September 2024 - 🇮🇳India vishal.kadam Mumbai
This thread has been idle, in the Needs work state with no activity for several months. Therefore, I am assuming that you are no longer pursuing this application, and I marked it as Closed (won't fix).
If this is incorrect, and you are still pursuing this application, then please feel free to re-open it and set the issue status to Needs work or Needs review, depending on the current status of your code.