Problem/Motivation
Changing the access permissions for a newly created view from the default "Permission" to "Role" and clicking Apply causes an AJAX error message re getRoles() in Role.php (see below). The change to "Role" is applied, but the settings for "Role" can't be changed as clicking on the "Settings" link causes the same AJAX error. Tried in IE, FF and Chrome, same error and line 69 referenced in all browsers.
Error message in Chrome:
An AJAX HTTP error occurred.HTTP Result Code: 200Debugging information follows.Path: /drupal8/admin/structure/views/ajax/display/bug_test_view/default/access_optionsStatusText: OKResponseText: ( ! ) Fatal error: Call to undefined method Drupal\user\Plugin\views\access\Role::getRoles() in C:\wamp\www\drupal8\core\modules\user\lib\Drupal\user\Plugin\views\access\Role.php on line 69Call Stack#TimeMemoryFunctionLocation10.0011412328{main}( )..\index.php:020.00711052664drupal_handle_request( )..\index.php:1730.217319228392Symfony\Component\HttpKernel\Kernel->handle( )..\bootstrap.inc:220440.221919454056Drupal\Core\HttpKernel->handle( )..\Kernel.php:19750.221919454728Symfony\Component\HttpKernel\HttpKernel->handle( )..\HttpKernel.php:5260.221919454728Symfony\Component\HttpKernel\HttpKernel->handleRaw( )..\HttpKernel.php:7370.366622410704call_user_func_array( )..\HttpKernel.php:12980.366622411144Drupal\views_ui\Routing\ViewsUIController->ajaxForm( )..\HttpKernel.php:12990.381223937384views_ui_ajax_form( )..\ViewsUIController.php:377100.382824008192views_ajax_form_wrapper( )..\admin.inc:577110.382824008744drupal_build_form( )..\ajax.inc:104120.382824010528drupal_retrieve_form( )..\form.inc:368130.382924011712call_user_func_array( )..\form.inc:839140.382924011944views_ui_edit_display_form( )..\form.inc:839150.400825191872Drupal\views\Plugin\views\display\DisplayPluginBase->buildOptionsForm( )..\admin.inc:726160.404725250952Drupal\user\Plugin\views\access\Role->buildOptionsForm( )..\DisplayPluginBase.php:1496
Steps to get there:
- Install 8.x from scratch
- Menu -- Structure -- Views -- [create a new view]
- Click on Permission link next to access
- Choose Roles and click Apply
- AJAX error displayed