- Issue created by @bigbabert
- 🇺🇸United States joncjordan Colorado Springs, CO
The second arg of getAliasByPath is langocde. I think we could update this line to account for the language of the entity being saved:
$detail_page = $config->get('detail_page')[$i] ? \Drupal::service('path_alias.manager')->getAliasByPath("/$bundle/" . $entity_id) : '';
changes to:
$detail_page = $config->get('detail_page')[$i] ? \Drupal::service('path_alias.manager')->getAliasByPath("/$bundle/" . $entity_id, $entity->language()->id()) : '';
- 🇺🇸United States joncjordan Colorado Springs, CO
Hmm I take that back... it doesn't seem to be prepending the URL with the language code. Maybe we should just use this method instead:
$entity->toUrl('canonical')->toString()