'path' variable in $this->moduleHandler->alter('language_switch_links', $result, $type, $path);
line 427 is undefined.
Line 412
/**
* {@inheritdoc}
*/
public function getLanguageSwitchLinks($type, Url $url) {
$links = FALSE;
if ($this->negotiator) {
foreach ($this->negotiator->getNegotiationMethods($type) as $method_id => $method) {
$reflector = new \ReflectionClass($method['class']);
if ($reflector->implementsInterface('\Drupal\language\LanguageSwitcherInterface')) {
$result = $this->negotiator->getNegotiationMethodInstance($method_id)->getLanguageSwitchLinks($this->requestStack->getCurrentRequest(), $type, $url);
if (!empty($result)) {
// Allow modules to provide translations for specific links.
$this->moduleHandler->alter('language_switch_links', $result, $type, $path);
$links = (object) array('links' => $result, 'method_id' => $method_id);
break;
}
}
}
}
return $links;
}
Pass $url
instead of $path
to hook_language_switch_links_alter
.
None.
hook_language_switch_links_alter
third param is now a \Drupal\Core\Url
object.
None.
Fixed
8.3 ⚰️
Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.