Notice: Undefined index: entity_type in Drupal\restui\Controller\RestUIController->listResources() (line 144 of modules/restui/src/Controller/RestUIController.php).

This is due to dblog entity note having key entity_type.

CommentFileSizeAuthor
#2 ResourceBase-hierarchy.png6.88 KBclemens.tolboom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

Issue summary: View changes
clemens.tolboom’s picture

DBLogResource is added by \Drupal\rest\Plugin\Type\ResourcePluginManager

which are picked up by

$resources = $this->resourcePluginManager->getDefinitions();

due to the Drupal\rest\Annotation\RestResource annotation.

There is nothing wrong I guess with the hierarchy.

This will prob be solved (hidden under the carpet) through #2303369: Until #2300677 is fixed, show in REST UI that config entity resources are read-only

clemens.tolboom’s picture

We should not use the key 'entity_type' but get to the canonical path. For dblog

 * @RestResource(
 *   id = "dblog",
 *   label = @Translation("Watchdog database log"),
 *   uri_paths = {
 *     "canonical" = "/dblog/{id}"
 *   }
clemens.tolboom’s picture

Status: Active » Closed (cannot reproduce)