@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.
guillaumepacilly β made their first commit to this issueβs fork.
guillaumepacilly β made their first commit to this issueβs fork.
Applied patch modifications into a MR and cleaned up references and annotations.
guillaumepacilly β made their first commit to this issueβs fork.
Applied original patch modifications to MR
guillaumepacilly β changed the visibility of the branch 3476192-fix-must-be to hidden.
guillaumepacilly β created an issue.
@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.
guillaumepacilly β created an issue.
guillaumepacilly β made their first commit to this issueβs fork.
Thanks for the patch!
Updated for Commerce 2.4
guillaumepacilly β changed the visibility of the branch 3425346-views-caching-provide to hidden.
guillaumepacilly β made their first commit to this issueβs fork.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
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
@Drupalengue I added a MR with a possible approach. It gives the opportunity to activate or not the popup features for each ief widget.
GuillaumePacilly β made their first commit to this issueβs fork.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
Previous patch missed service argument for the PublicationDateSubscriber
GuillaumePacilly β created an issue.
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
GuillaumePacilly β created an issue.
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.
GuillaumePacilly β created an issue.
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.
GuillaumePacilly β created an issue.
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.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.
GuillaumePacilly β created an issue.