Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If an activity in the activity stream has a group context, the token that renders the group url in the message is rendered wrong.
The token that is used is: [message:gurl]
What happens in activity_logger.tokens.inc on line 99 is
// If it's a group.. add it in the arguments.
if (isset($group) && $group instanceof Group) {
if ($name === 'gtitle') {
$replacements[$original] = $group->label();
}
if ($name === 'gurl') {
$gurl = Url::fromRoute('entity.group.canonical', array(
'group' => $group->id(),
array()
));
$replacements[$original] = $gurl->toString();
}
}
It tries to create an URL from a route but Url::fromRoute
is used with an empty array, thus the Drupal URL generator thinks it should render an URL with a query. But nothing is provided. So we can get rid of the query and it will work.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2017-07-06 at 14.45.39.png | 587.18 KB | ronaldtebrake |
Comments
Comment #2
ronaldtebrake CreditAttribution: ronaldtebrake as a volunteer and for Open Social commentedComment #3
ronaldtebrake CreditAttribution: ronaldtebrake as a volunteer and for Open Social commentedPatch here: https://patch-diff.githubusercontent.com/raw/goalgorilla/open_social/pul...
Pull request here: https://patch-diff.githubusercontent.com/raw/goalgorilla/open_social/pul...
Comment #4
jochemvn CreditAttribution: jochemvn for Open Social commentedThis fixed the issue. It will be part of the 1.1 release