Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal error after installing: non-existent service "dkan_api.controller" #259

Closed
jfgigand opened this issue Nov 26, 2019 · 4 comments
Closed

Comments

@jfgigand
Copy link

Hi,

I have followed the installation instruction from the doc (using dkan-tools, dktl get 8.7.3, dktl install).

The Drupal core seems to be working (user login, admin interface).

However, when trying to add a new node (Admin > Content > Add content), the Save action yields the following error:
Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service "dkan_api.controller"." at /site/drupal/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php line 153, referer: http://10.0.3.129/node/add/data

For information:

docroot$ find -name '*.yml' -exec grep -H dkan_api {} \;
./profiles/contrib/dkan2/dredd/dredd.yml:blueprint: ../modules/custom/dkan_api/docs/dkan_api_openapi_spec.yml
./profiles/contrib/dkan2/dkan2.info.yml:  - dkan_api
./profiles/contrib/dkan2/modules/custom/dkan_datastore/dkan_datastore.routing.yml:    { _controller: '\Drupal\dkan_api\Controller\Docs::getComplete'}
./profiles/contrib/dkan2/modules/custom/dkan_metastore/dkan_metastore.info.yml:  - dkan_api
./profiles/contrib/dkan2/modules/custom/dkan_metastore/dkan_metastore.routing.yml:    { _controller: '\Drupal\dkan_api\Controller\Docs::getComplete'}
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.services.yml:  dkan_api.docs:
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.services.yml:    class: \Drupal\dkan_api\Controller\Docs
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.routing.yml:dkan_api:
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.routing.yml:    { _controller: '\Drupal\dkan_api\Controller\Docs::getVersions'}
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.routing.yml:dkan_api.1:
./profiles/contrib/dkan2/modules/custom/dkan_api/dkan_api.routing.yml:    { _controller: '\Drupal\dkan_api\Controller\Docs::getComplete'}
./profiles/contrib/dkan2/modules/custom/dkan_harvest/dkan_harvest.routing.yml:    { _controller: '\Drupal\dkan_api\Controller\Docs::getComplete'}
./profiles/contrib/dkan2/modules/custom/dkan_harvest/dkan_harvest.info.yml:  - dkan_api

I don't know how to debug the Dependency Injection problem, how to check what service/controllers are loaded or not, if there is a cache to update and so on.

Can anyone help with this problem?

@jfgigand
Copy link
Author

Any help about what to check and where to look?

If not, does anyone know how to disable DKAN to avoid this error (which prevents the creation of nodes), until a solution is found?
(the DKAN modules are cannot be disabled from the admin interface)

Thanks.

@fmizzell
Copy link
Contributor

fmizzell commented Dec 3, 2019

@jfgigand Thank you for reporting this issue. I will try to reproduce and get back to you. FYI, we have paid very little attention to the GUI this far, and have mostly focused on interacting with DKAN through the API endpoint. That approach might not serve your use case, but it is the most stable path to do things.

@fmizzell
Copy link
Contributor

fmizzell commented Dec 3, 2019

#265

@fmizzell
Copy link
Contributor

fmizzell commented Dec 4, 2019

Feel free to reopen if the pr did not solve the issue.

@fmizzell fmizzell closed this as completed Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants