When defining routes in the .routing.yml file, the _content property is no longer valid. I got a "page not found" error when browsing to such a route.
Use _controller instead.
Old:
optimizely.add_update.oid:
path: /admin/config/system/optimizely/add_update/{oid}
defaults:
_content: \Drupal\optimizely\DoUpdate::buildUpdateForm
_title: Optimizely Edit Project
requirements:
_permission: administer optimizely
New:
optimizely.add_update.oid:
path: /admin/config/system/optimizely/add_update/{oid}
defaults:
_controller: \Drupal\optimizely\DoUpdate::buildUpdateForm
_title: Optimizely Edit Project
requirements:
_permission: administer optimizely
Source:
Routes use _controller instead of _content
https://www.drupal.org/node/2378809
No comments:
Post a Comment