I want to create a block listing authors and a counter of their published content, but I can't get this block to work as long as I don't create a page and a url for the view.
Steps to reproduce:
- Create a view listing content, defining a block only and no page
- Add a relationship: author
- Add a contextual filter: (author) user: name
- Save the view.
- The preview below disappears
- The logs show this message:
Location https://dme0h.ply.st/admin/structure/views/view/artauth/preview/block_1?_wrapper_format=drupal_ajax
Referral https://dme0h.ply.st/admin/structure/views/view/artauth
Message InvalidArgumentException: You cannot create a URL to a display without routes. in Drupal\views\ViewExecutable->getUrl() (line 1806 of /home/dme0h/www/core/modules/views/src/ViewExecutable.php).
Severity Error
- Adding the block to the primary menu results in a blank page with this message "The website encountered an unexpected error. Please try again later. "
Adding a page to the view and defining a path for it solves the problem and allows to display the block.