πŸ‡«πŸ‡·France @GuillaumePacilly

Account created on 4 July 2022, over 2 years ago
  • Senior Backend Developer at iqual AGΒ 
#

Merge Requests

More

Recent comments

πŸ‡«πŸ‡·France GuillaumePacilly

@tcrawford I have created the MR with your suggested changes and added an api.php file to provide some example.

I added an index variable to the hooks to facilitate the order_items array manipulation, let me know if you have a better idea.

πŸ‡«πŸ‡·France GuillaumePacilly

Applied patch modifications into a MR and cleaned up references and annotations.

πŸ‡«πŸ‡·France GuillaumePacilly

Applied original patch modifications to MR

πŸ‡«πŸ‡·France GuillaumePacilly

guillaumepacilly β†’ changed the visibility of the branch 3476192-fix-must-be to hidden.

πŸ‡«πŸ‡·France GuillaumePacilly

@DiDebru thanks for your update, worked fine for me! I added your changes to the MR of this issue, and added another hook to alter payment page initialization data as I need it on my projects.

πŸ‡«πŸ‡·France GuillaumePacilly

guillaumepacilly β†’ made their first commit to this issue’s fork.

πŸ‡«πŸ‡·France GuillaumePacilly

Thanks for the patch!
Updated for Commerce 2.4

πŸ‡«πŸ‡·France GuillaumePacilly

guillaumepacilly β†’ changed the visibility of the branch 3425346-views-caching-provide to hidden.

πŸ‡«πŸ‡·France GuillaumePacilly

I had the same need and solved it by using custom tokens. Then you can apply conditions inside your hook_tokens().

/**
 * Implements hook_token_info().
 */
function mymodule_token_info() : array {
  $info = [];

  $info['types']['my_custom_tokens'] = [
    'name' => t('Custom Tokens'),
    'description' => t('Tokens available for specific use on this website'),
  ];

  $info['tokens']['my_custom_tokens']['custom_token'] = [
    'name' => 'Custom token',
    'description' => t('Custom token with conditions'),
  ];

  return $info;
}

/**
 * Implements hook_tokens().
 */
function mymodule_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) : array {
  $replacements = [];

  if ($type == 'my_custom_tokens') {
    foreach ($tokens as $name => $original) {
      switch ($name) {
        case 'custom_token':
            $node = $data['node'];
            // Add your logic here.

            $replacements[$original] = $title;
          }

          break;

        default:
          break;
      }
    }
  }

  return $replacements;
}

Then just use your custom token in the auto_entitylabel configuration

πŸ‡«πŸ‡·France GuillaumePacilly

@Drupalengue I added a MR with a possible approach. It gives the opportunity to activate or not the popup features for each ief widget.

πŸ‡«πŸ‡·France GuillaumePacilly

GuillaumePacilly β†’ made their first commit to this issue’s fork.

πŸ‡«πŸ‡·France GuillaumePacilly

Previous patch missed service argument for the PublicationDateSubscriber

πŸ‡«πŸ‡·France GuillaumePacilly

For those still struggling with this:

The issue is raised by the method \Drupal\Core\Entity\EntityDisplayRepository::getAllDisplayModesByEntityType on line 115:
[$display_mode_entity_type, $display_mode_name] = explode('.', $display_mode->id(), 2);

PHP8 will throws a Notice: Undefined offset 1 if explode('.', $display_mode->id(), 2) returns an array with only on argument.
This will be the case if you have a display mode like this in your config: core.%display_mode_entity_type%.%node_type%. It should be core.%display_type%.%display_mode_entity_type%.%display_mode_name%

In my case I had an obsolete config like core.%display_mode_entity_type%.%node_type%. Removing it with drush solved the issue
drush config:delete core.%display_mode_entity_type%.%node_type% && drush cex -y

πŸ‡«πŸ‡·France GuillaumePacilly

Hey, thanks a lot for the patch.

I have a similar issue when the user set a "publish on" date in the past from the node add form. In that case another scheduler event is triggered (Prepublish).

I have updated the patch to handle this case as well.

πŸ‡«πŸ‡·France GuillaumePacilly

Hello,

First thanks for this patch, this features is really much appreciated.

I could be wrong, but I think the parameters order is inversed between outputfile and arguments in the viewsDataExport function. At least I add to inverse them for it to work proerly. Attached an updated patch with the right order.

πŸ‡«πŸ‡·France GuillaumePacilly

I refactore the Tree Service to avoid missing indexes in the translations array.

However, I realize this feature would need additional work (probably major refactoring) to fully support multingual domains:
Currently the pagetree is build upon menu entities iteration, each domain having one menu, each menu a language and each node in the menu having translations.

This lead to inconsistency if translations belongs to a separate domain. Additionaly, the menu links language depends on the language defined for the menu, not the current language displayed.

Production build 0.71.5 2024