Account created on 9 April 2015, almost 9 years ago
#

Merge Requests

More

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ created an issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks @thampiajit verified the changes. Looks good.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thank you for the review, @Jasjeet. I've verified the issue on the latest release and it seems to be resolved. Your confirmation confirms that it has been addressed in the latest release. Seems Pr is merged on the latest release. In my opinion, this ticket can now be closed.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Updating the status to "Needs Review" to gather feedback on the patch and gather opinions from others who might be experiencing the same issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks for clarification Joy. It appears that I'm unable to replicate this issue on the same version. It's possible that there might be conflicts with other modules causing this behavior. Can you please share the URL where the error is coming?

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ created an issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Verified the changes, and everything seems to be working fine on my end. I've also attached a screenshot for reference. Joyceflorenc3, could you please provide more details such as the version of Drupal core and PHP you are using? This information will help us troubleshoot any potential compatibility issues. Thanks!

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

After module installation encountered the following error. Raised MR!3 to fix the following issues.

TypeError: Drupal\nitropack\EventSubscriber\NitropackSubscriber::onRespond(): Argument #1 ($event) must be of type Symfony\Component\HttpKernel\Event\FilterResponseEvent, Symfony\Component\HttpKernel\Event\ResponseEvent given in Drupal\nitropack\EventSubscriber\NitropackSubscriber->onRespond() (line 134 of modules/contrib/nitropack/src/EventSubscriber/NitropackSubscriber.php).

The website encountered an unexpected error. Try again later.

Error: Call to undefined method Symfony\Component\HttpKernel\Event\ResponseEvent::isMasterRequest() in Drupal\nitropack\EventSubscriber\NitropackSubscriber->onRespond() (line 136 of modules/contrib/nitropack/src/EventSubscriber/NitropackSubscriber.php).
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thank smustgrave for providing clarification on the scope. I've removed the strict type declaration and made some adjustments to adhere to coding standards.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I've added a simple functional test to validate the changes made to the label.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Certainly, it does make sense to use the "overridden" keyword instead of a symbol like a sign. This change can enhance clarity, especially for new Drupal users who may not be familiar with the significance of certain symbols.

Raising a merge request (MR) and providing a screenshot for reference is a proactive approach to communicate the proposed change effectively. It helps stakeholders visualize the suggested modification and provides context for the decision to use the "overridden" keyword.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Upon analysis of the addLink() function in the modules/contrib/group_content_menu/src/Controller/GroupContentMenuController.php file, it appears that there is an issue with loading the menu entity, resulting in a null value for the menu. This occurs because the entity type and menu ID are not correctly specified.

public function addLink(GroupContentMenuInterface $group_content_menu) {
    $menu_name = GroupContentMenuInterface::MENU_PREFIX . $group_content_menu->id();
    $menu_link = $this->entityTypeManager()->getStorage('menu_link_content')->create([
      'menu_name' => $menu_name,
      'bundle' => 'menu_link_content',
    ]);
    return $this->entityFormBuilder()->getForm($menu_link);
  }

addLink function is calling

/core/modules/menu_link_content/src/Form/MenuLinkContentForm.php

public function form(array $form, FormStateInterface $form_state) {
    $form = parent::form($form, $form_state);

    $parent_id = $this->entity->getParentId() ?: $this->getRequest()->query->get('parent');
    $default = $this->entity->getMenuName() . ':' . $parent_id;
    $id = $this->entity->isNew() ? '' : $this->entity->getPluginId();
    if ($this->entity->isNew()) {
      $menu_id = $this->entity->getMenuName();
      $menu = $this->entityTypeManager->getStorage('menu')->load($menu_id);
      $form['menu_parent'] = $this->menuParentSelector->parentSelectElement($default, $id, [
        $menu_id => $menu->label(),
      ]);
    }
    else {
      $form['menu_parent'] = $this->menuParentSelector->parentSelectElement($default, $id);
    }
    $form['menu_parent']['#weight'] = 10;
    $form['menu_parent']['#title'] = $this->t('Parent link');
    $form['menu_parent']['#description'] = $this->t('The maximum depth for a link and all its children is fixed. Some menu links may not be available as parents if selecting them would exceed this limit.');
    $form['menu_parent']['#attributes']['class'][] = 'menu-title-select';

    return $form;
  }

$menu = $this->entityTypeManager->getStorage('menu')->load($menu_id);

menu is not getting loaded it is coming null because entity type and menu id are not correct.

To address this issue, attempted to correct the entity type and ID by directly setting them to 'group_content_menu' and a valid menu ID.
something like

$menu_id = '9'; // Check menu id in my case it is 9
$menu = $this->entityTypeManager->getStorage('group_content_menu')->load($menu_id);

IMO Instead of modifying the core files, it may be more appropriate to create a custom form function within the Group Content Menu module. By doing so, you can ensure that the correct entity type and menu ID are used without altering core functionality.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I encountered the same issue and found that Patch #2 provided in the following link: https://www.drupal.org/project/redirect/issues/3314032 โ†’ resolved the issue effectively in my case. Additionally, I contributed another approach to handle exceptions within the same discussion thread.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

After replicating the issue, I can confirm that Patch #2 resolves the issue satisfactorily. Additionally, I've introduced an alternative method to handle straightforward exceptions, which has proven effective in addressing the problem in my scenario.

function redirect_entity_delete(EntityInterface $entity) {
  try {
    if ($entity->getEntityType()->hasLinkTemplate('canonical') && $entity->toUrl('canonical')->isRouted()) {

       // Generate the canonical URL after setting the required parameters.
       $canonical_url = $entity->toUrl('canonical');
      
       // Check if the canonical URL has the required parameters set.
      try {
        if ($canonical_url->getRouteParameters()) {
          redirect_delete_by_path('internal:/' . $entity->toUrl('canonical')->getInternalPath());
        }
      }
      catch (Exception $e) {
        // This can happen if some mandatory parameters are missing.
      }
      redirect_delete_by_path('entity:' . $entity->getEntityTypeId() . '/' . $entity->id());
    }
  }
  catch (RouteNotFoundException $e) {
    // This can happen if a module incorrectly defines a link template, ignore
    // such errors.
  }
}
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Seems this issue is already raised in https://www.drupal.org/project/redirect/issues/3314032 โ†’ . Closing this ticket.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Per https://www.drupal.org/project/drupal/releases/10.2.0 โ†’
Drupal core automated tests and test APIs are being converted to require strict typing in all cases. So far, Drupal core test traits, build tests, and functional JavaScript tests all require strict typing. Going forward, all Drupal core tests will require strict typing. It is recommended that contributed and custom projects use the Drupal standard for strict type declaration.

Added strict type and fixed phpcs issues.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I believe it would be beneficial to make the "hide username from title" feature configurable, as its necessity can vary depending on project requirements. I have initiated a request MR !9 to address this option.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Upon attempting to replicate the reported issue, I have followed the outlined steps, which involved installing both the Config Split and Conditional Field modules and navigating to the specified configuration page at "admin/config/development/configuration/config-split/add." However, I was unable to encounter the issue as described.
Should have any additional details or steps to provide.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Applied the patch successfully, and the tabs are being added as expected. Attaching screenshot for reference.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

verified the provided patch, and it is functioning as expected in my local environment. Raising MR !80 to fix the issues related to test cases effectively.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Added one commit to resolve error on installation of module.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal10.beautytips_custom_tips' doesn't exist: SELECT * FROM "beautytips_custom_tips"; Array ( ) in beautytips_manager_get_custom_tips() (line 155 of modules/contrib/beautytips/beautytips_manager/beautytips_manager.module).

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

sumit-k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Seems it is fixed in 2.x. Closing this issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I've verified the changes, and it seems that the uploaded icons are now successfully visible on the user login page. This enhancement not only adds a visual appeal but also provides a more personalized and engaging experience for users.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Adding automated test patch to verify module functionality. I would greatly appreciate it if anyone could take the time to review the changes.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I have successfully replicated the issue we discussed earlier. For reference, I have attached a screenshot highlighting the specific error.
MR !13 fixing this issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I have successfully replicated the issue mentioned in #19 after applying the changes from #17. I'm sharing a patch that has resolved the issue for me.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Sharing patch file for test cases.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

It appears that the issue encountering is related to the [current-user:roles:last] token not being supported because roles:last is not a valid field name within the user entity.

public function processToken(FieldableEntityInterface $entity, $token_entity_type, $argument) {
    // @todo $entity_type could potentially be retrieved by checking on $entity.
    $and_or = $this->options['and_or'];
    $field_names = $this->tokenScan($argument);
    foreach ($field_names[$token_entity_type] as $field_name => $token) {
      $replace_values = [];
      if ($entity->hasField($field_name)) {
        $field_values = $entity->get($field_name)->getValue();
        foreach ($field_values as $field_value) {
          $replace_values[] = array_values($field_value)[0];
        }

        // Replace and implode with , or + for multiple value management.
        $replace = implode($and_or, $replace_values);
        $argument = str_replace($token, $replace, $argument);
      }
    }
    return $argument;
  }

The provided code snippet shows the processToken function in Drupal, which handles token replacement within entities. In this function, it attempts to retrieve the field values associated with the specified field name from the entity. However, it checks if the entity has a field with the name roles:last, and since this field name does not exist within the user entity, the token replacement does not occur.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Replicated the mentioned issue, and it appears that enabling AJAX in Views is causing a conflict with the views exposed filter submit functionality. This conflict arises due to the AJAX form action path being overridden, which in turn affects the ability to perform updates.

Here are the steps to reproduce the issue:

  1. Create a view page that includes the title field and select the "Formatted editable" option.
  2. Add the node ID field to the filter criteria and expose it.
  3. Enable AJAX for the view.
  4. Visit the view page and apply filters.
  5. Notice that the update functionality is no longer working due to the form action path being overridden.
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I have reviewed the provided patch, It fixes the issue for the primary theme. However, it appears that there's an error persisting when it comes to the subtheme. Adding patch to fix this issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

The raised merge request is functioning smoothly. It successfully introduces the 'core field diff' option for the weight field. To provide visual clarity, I have attached a screenshot for your reference.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Please find the patch below to enable the sound playback on cache clear using Drush. Kindly note that this approach is currently compatible with MacOS and Linux operating systems.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Replicated the same issue. #3 solution is working fine, adding a patch for the same changes.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Adding patch for OneOfSeveralValidationRule test. Please review. Thanks.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Adding patch for PatternFieldValidationRule test.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks for the review and suggestion. Sharing new patches with suggested improvements. Considered points 1 , 2 and 3.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Adding patch for UrlFieldValidationRule test. Changes are

1> Created test.
2> Added dependencies module
protected static $modules = ['node', 'field_validation', 'path_alias', 'user'];

3> Replaced patch validator function inside UrlFieldValidationRule.php.

-          $flag = \Drupal::service('path.validator')->isValid($normal_path);
+          $flag = \Drupal::service('path.validator')->getUrlIfValidWithoutAccessCheck($normal_path);
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Sure, Adding a new patch. Thanks for the review.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Hi, Attaching the test patch for itemCountFieldValidationRule.
1> Test patch for itemCountFieldValidationRule.
2> Fixed 1x: The Drupal\Tests\field_validation\Kernel\Plugin\FieldValidationRule\EqualValuesValidationRuleTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426 โ†’

-  public static $modules = ['node', 'field_validation'];
+  protected static $modules = ['node', 'field_validation'];
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Hi, sharing the patch for two changes.
1> Test patch for EqualValuesFieldValidationRule.
2> Removed 1x: The Drupal\Tests\field_validation\Kernel\Plugin\FieldValidationRule\EqualValuesValidationRuleTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426 โ†’

-  public static $modules = ['node', 'field_validation'];
+  protected static $modules = ['node', 'field_validation'];
๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Removed t() function. Sharing new patch. Please review.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks for reviewing, recently mentioned issues are fixed in the following patch https://www.drupal.org/files/issues/2023-07-07/t_calls_should_be_avoided-3359562-11.patch. Thread - https://www.drupal.org/project/realname/issues/3359562#comment-15140770 ๐Ÿ“Œ t() should not be used in test classes Needs review

IMO attaching the same patch to this thread would be redundant since it is already available in the mentioned thread.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

FILE: /var/www/html/modules/real/realname/tests/src/Functional/RealnameBasicTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------

 72 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 90 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/real/realname/src/Controller/RealnameAutocompleteController.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 24 | ERROR | The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

Time: 223ms; Memory: 10MB

Getting the following issues on running phpcs with standard Drupal and DrupalPractice. Attaching patch for fixes. Please review.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Applied patch #14. Test and functionality are working fine for me.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks for the review. Sharing new patch covered point 2.
Regarding points 1 and 3.

+++ b/composer.json
@@ -18,7 +18,23 @@
+        "drush.services.yml": "^9"

It seems it will be required for Drush 10.

Based on the provided documentation https://git.uwaterloo.ca/libraries/drush/-/blob/11.x/docs/commands.md, it appears that including the drush.services.yml file and the /src/Drupal/Commands directory is indeed required

Not sure about dependency injection based on the following document it has two way to use dependency injection
https://git.uwaterloo.ca/libraries/drush/-/blob/11.x/docs/dependency-inj...

Please correct me if my understanding is not clear.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Tried to replicate the issue with the mentioned details but didn't get it. I would appreciate it if you could provide the steps to reproduce to reproduce the issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Trie to replicate this issue with some other field, but didn't get it.

IMO To resolve this issue, you can try the following:

Check the structure of content.field_telephone_lycee to ensure it is an array and contains the expected data. You can use kint() or var_dump() to inspect the content variable and ensure it has the correct structure.

If content.field_telephone_lycee is a render array, you should use the children function to access the child elements.

I think content.field_telephone_lycee itself is rendered directly without using an index.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

{{ content }} is a render array. on dump, we can see an array

0 array:1 [โ–ผ
  0 => array:1 [โ–ผ
    "#markup" => "On"
  ]
]

{{ content.field_toggle.0["#markup"] }}

Content is not ideal for logic. use content. for rendering and node. for logic.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Sure, Sharing a new patch. Please review

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Hi, I tried to replicate the issue but didn't get it while testing Drupal 10.09 with PHP 8.1. To address the issue mentioned, it would be helpful if you could provide more specific details about the problem you encountered. Please provide the steps to reproduce the issue, any error messages or warnings you received, and any relevant configurations or code snippets.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Hi, I have reviewed the provided patch and added a test for the "drush sanitize" command. Please find the updated patch attached for review.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Tested following patch. Looks good to me.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Hi, I have prepared a patch that includes fixes for the issues mentioned, along with the corresponding tests. Please review.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I have tried to replicate the issue you mentioned regarding the generation of real names, but I couldn't encounter the same problem. It would be helpful if you could provide some specific scenarios or steps that consistently result in the real names not being generated. This information will assist me in understanding the issue better and providing you with an appropriate solution.

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

Thanks but as coding standards, it should be .txt as mentioned. Please refer - https://www.drupal.org/docs/develop/standards/php/php-coding-standards โ†’

๐Ÿ‡ฎ๐Ÿ‡ณIndia sumit-k

I have attempted to replicate the issue following the steps provided. However, I have encountered a slight deviation in the behavior.

When I set the "upload_tmp_dir" variable in the php.ini file to a non-existent folder, instead of throwing a SymfonyFileException as expected, it is displaying an Ajax notice with the message: "Notice: Unknown: file created in the system's temporary directory in Unknown on line 0."

It is not falling under SymfonyFileException In that case, no log messages are getting logged.
I would appreciate it if you could provide me with any additional steps or considerations that I may have missed during replication.

Production build https://api.contrib.social 0.61.6-2-g546bc20