- Issue created by @huangweiqiu
Message Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the 'editor_note' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 211 of H:\wemp\nginx\html\nkmz\core\lib\Drupal\Core\Entity\EntityBase.php).
Severity Error
Hostname 127.0.0.1
Operations
Backtrace
#0 H:\wemp\nginx\html\nkmz\modules\contrib\notificationswidget\src\Services\NotificationsWidgetService.php(136): Drupal\Core\Entity\EntityBase->toUrl()
#1 H:\wemp\nginx\html\nkmz\modules\contrib\notificationswidget\notifications_widget.module(164): Drupal\notifications_widget\Services\NotificationsWidgetService->logNotification(Array, 'delete', Object(Drupal\editor_note\Entity\EditorNote))
#2 [internal function]: notifications_widget_entity_delete(Object(Drupal\editor_note\Entity\EditorNote))
#3 H:\wemp\nginx\html\nkmz\core\lib\Drupal\Core\Extension\ModuleHandler.php(416): call_user_func_array(Object(Closure), Array)
#4 H:\wemp\nginx\html\nkmz\core\lib\Drupal\Core\Extension\ModuleHandler.php(395): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object(Closure), 'notifications_w...')
Above error occurred when trying to delete a node has Editor Note field data.( https://www.drupal.org/project/editor_note →
..\notificationswidget\src\Services\NotificationsWidgetService.php line 135
- if ($entityUrl === '[entity:url]' ) {
+ if ($entityUrl === '[entity:url]' && $entity->hasLinkTemplate('canonical')) {
references:~
https://www.drupal.org/project/media_responsive_thumbnail/issues/3470012
🐛
No link template 'canonical' found for the 'paragraph' entity type
Active
https://www.drupal.org/files/issues/2024-08-23/3470012-02-no_link_template.patch
🐛
No link template 'canonical' found for the 'paragraph' entity type
Active
Active
2.0
Code