- Issue created by @jasongray
Disregard.
Had an old patch still applying which added the toURL method, thus duplicating the function.
When deploying after 8.x-1.0-beta6 (23 Nov 2024), receive Fatal error: Cannot redeclare Drupal\moderation_note\Entity\ModerationNote::toUrl() in /opt/drupal/web/modules/contrib/moderation_note/src/Entity/ModerationNote.php on line 412
When I cat the file I see the toURL function is declared twice:
/**
* {@inheritdoc}
*/
public function toUrl($rel = 'canonical', array $options = []) {
$entity = $this->getModeratedEntity();
$options['query']['open-moderation-note'] = $this->id();
$url = $entity->toUrl('canonical', $options);
return $url;
}
/**
* {@inheritdoc}
*/
public function toUrl($rel = 'canonical', array $options = []) {
try {
$url = parent::toUrl($rel, $options);
}
catch (UndefinedLinkTemplateException $e) {
return '';
}
return $url;
}
Active
Code
Disregard.
Had an old patch still applying which added the toURL method, thus duplicating the function.