Issue fork node_menus-3358098

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dineshkumarbollu created an issue. See original summary.

dineshkumarbollu’s picture

Assigned: dineshkumarbollu » Unassigned
Status: Active » Needs review
StatusFileSize
new6.34 KB
avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
-core: 8.x
+core_version_requirement: 8.x

core_version_requirement is not recognized from any Drupal version before Drupal 8.8. That requirement needs to be changed.

+/**
+ * @file
+ * Primary module hooks for Node Menu moodule.
+ */
+

The short description for that module is Hook implementations for the Node menus module. since Drupal core does not have primary nor secondary hooks.
moodule is a mispelled word.

+    // We need to sync menu item. Things will break if we try to do similar
+    // logicfound in menu ui submit callback, token module breaks hard.

There is a missing space between logic and found, since those are two distinct words.

 /**
- * Node form validate callback.
  * Sync main parent item with selected item from language menu.
  *
  * @param array $form
- * @param FormStateInterface $form_state
+ *   The array of form values.S.
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
+ *   Form cuurent state.
  */
 function node_menus_form_node_form_validate($form, FormStateInterface $form_state) {

The documentation comment for a validation handler is different and it does not need to describe its parameters.

-  // TODO make validation work again.
-  //$form['#validate'][] = 'node_menus_form_node_type_form_validate';
+  // @todo make validation work again.

What follows @todo is a sentence: It starts with a capitalized word and it ends with a period.

soham sengupta’s picture

Status: Needs work » Needs review
StatusFileSize
new6.45 KB

Hi, I have updated the patch with the changes

avpaderno’s picture

Status: Needs review » Needs work

+core_version_requirement: ^8 || ^9 || ^10

The minimum Drupal 8 version must be 8.8, so the first requirement needs to be ^8.8.

+ * @return array
+ *   An array that contains default values for the menu link form.

The default values for the menu link form. is sufficient.

soham sengupta’s picture

Status: Needs work » Needs review
StatusFileSize
new6.43 KB

Thanks, Updated the patch as per the suggestions.

bindu r’s picture

StatusFileSize
new18.17 KB

Hi, Reviewed the patch #6, applies cleanly and resolves all the phpcs errors/warnings. And also addresses the comments mentioned at #5 .

silvi.addweb’s picture

StatusFileSize
new6.5 KB

Re-roll the patch #8 according to the latest code changes.

a.aaronjake’s picture

Status: Needs review » Reviewed & tested by the community

Hi @everyone,

Applied the re-rolled patch, confirmed no errors reported too.

 node_menus git:(8.x-2.x) curl https://www.drupal.org/files/issues/2024-05-29/node_menus-3358098-8.patch | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6651  100  6651    0     0  20674      0 --:--:-- --:--:-- --:--:-- 21181
patching file node_menus.info.yml
patching file node_menus.module
➜  node_menus git:(8.x-2.x) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig node_menus
➜  contrib git:(master) ✗

Will now move this to RTBC

Thanks,
Jake

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Let's create a merge request, now that patches are no longer tested.

avpaderno’s picture

Assigned: Unassigned » avpaderno
avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Assigned: avpaderno » Unassigned
rang501’s picture

Status: Needs work » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

avpaderno’s picture

Issue tags: -Needs reroll