We need to fix this.

- admin/config/user-interface/tour
Gives exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "tour_ui.controller". in Symfony\Component\DependencyInjection\Container->get() (line 289 of /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php).

- admin/config/user-interface/tour/x
Gives the 'Add tour' button and
The requested page "/admin/config/user-interface/tour/x" could not be found.

I thought this is related to #1962876: Misleading error message: Symfony ServiceNotFoundException: You have requested a non-existent service refering to PRS-0 (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md#u...) but tour_ui is in the package name not the class.

Adding #1619312: Exceptions on the first page of the installer
xdebug.show_exception_trace=on
doesn't help either.

[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException:  You have requested a non-existent service "tour_ui.controller". in /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php on line 289
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   1. {main}() /Users/clemens/Sites/drupal/d8/www/index.php:0
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   2. drupal_handle_request() /Users/clemens/Sites/drupal/d8/www/index.php:13
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   3. Drupal\\Core\\DrupalKernel->handle() /Users/clemens/Sites/drupal/d8/www/core/includes/bootstrap.inc:1901
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   4. Drupal\\Core\\HttpKernel->handle() /Users/clemens/Sites/drupal/d8/www/core/lib/Drupal/Core/DrupalKernel.php:296
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   5. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /Users/clemens/Sites/drupal/d8/www/core/lib/Drupal/Core/HttpKernel.php:52
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   6. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:61
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   7. Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver->getController() /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:105
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   8. Drupal\\Core\\Controller\\ControllerResolver->createController() /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolver.php:79
[Sat Jun 29 12:22:47 2013] [error] [client 127.0.0.1] PHP   9. Symfony\\Component\\DependencyInjection\\Container->get() /Users/clemens/Sites/drupal/d8/www/core/lib/Drupal/Core/Controller/ControllerResolver.php:73
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

I thought Tour Builder is broken too but that has no controllers for handling admin/config/development/tour-builder

slewazimuth’s picture

Tour_ui.controller now expected as service. Listing will be method for service's route on 'admin/config/user-interface/tour'

clemens.tolboom’s picture

@slewazimuth please provide some hints on how make it a controller.

I found #1978910-60: Convert layout_page_view to a Controller which maybe a hint?

slewazimuth’s picture

Tour_ui.controller is already a controller. The error message was simply letting you know it couldn't find the service. So the controller just needs to be declared as a service. This is done by making a Yaml file called tour_ui.services.yml

The file contents will be:

services:
tour_ui.controller:
class: Drupal\tour_ui\Routing\TourUIController
arguments: ['@plugin.manager.entity']

Its likely that older code format was accepted until just before code freeze but now it wants things to be done properly. A controller is just basically something which presents a response to a request and generally uses a bit of logic to do that. The operations override on the EntityListController can now have a copy of the edit and delete array declarations placed there as the architecture of the way things are now will deny access but the override will get you nicely around that and everything should work just fine and render the Edit and Delete operations.

These two steps will fix the issue for you. ( just noticed the formatting on this reply glopped the indents. Make sure tour_ui.controller: line is indented under services: and both class: and arguments: lines are indented under the tour_ui.controller: )

clemens.tolboom’s picture

Status: Active » Needs review
FileSize
289 bytes

I managed to fix admin/config/user-interface/tour by applying hint from #4by @slewazimuth

Unfortunately the page misses it's operations. Hope for more feedback.

clemens.tolboom’s picture

The base controller does access checks. I dunno how to solve that.

clemens.tolboom’s picture

Ok ... I fixed the access problem partly as there is no API yet about hook_entity_access but implementing it fixes the edit/delete operations.

Attached patch adds this hook

clemens.tolboom’s picture

Priority: Major » Normal
Status: Needs review » Fixed

There are issues about hook_entity_access so we need to keep an eye on this.

For now I've committed #7

Thanks to slewazimuth

We keep this issue open to review the API documentation.

clemens.tolboom’s picture

Status: Fixed » Active

Monitor API changes about hook_entity_access.

nick_schuch’s picture

Version: » 8.x-1.x-dev
Status: Active » Fixed

I think we should close this since we are being reactive over proactive.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.