0

I just have followed two tutorials on Youtube, https://www.youtube.com/watch?v=79zYcIoheCc&t=43s and https://www.youtube.com/watch?v=SAP9clnOf9E&t=8s.

The result was a "You are not authorized to access this page." error.

In the routing file, I have made the correct indentation for both modules.

my_module.routing:
  path: '/admin/structure/my_module'
  defaults:
    _title: 'My module'
    _content: '\Drupal\my_module\MyModuleController::test'
  requirements:
    _permisions: 'access administracion pages'

hello_world:
    path: '/hello/world'
    defaults:
        _controller: 'Drupal\hello_world\Controller\HelloWorldController::hello'
    requirements:
        _permisions: 'access content'

closed as off-topic by kiamlaluno Dec 24 '17 at 16:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced, was solved by a cache clear, or was a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – kiamlaluno
If this question can be reworded to fit the rules in the help center, please edit the question.

1

You have a typo in one of the permissions. It should be “administration”. Permissions itself is also spelled incorrectly.

Please refer to the official docs for creating routes and links. YouTube videos may be out of date.

  • Also the indentation seems wrong, if part of the file is using two spaces, and the other four spaces. – kiamlaluno Dec 24 '17 at 16:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.