Updated: Comment #N
Problem/Motivation
Steps to reproduce:
Go to /admin/structure/views
Click "Enable" for one of the disabled views
Expected
After a throbber, the view will move to the "enabled" table and if its a page view, will be immediately available
Actual
After a throbber, nothing will happen. Trying to visit the page view will 404.
This is because the view attempts to initialize all arguments, some of which require the request.
Since the rebuild is triggered during the KernelEvents::TERMINATE event, the request is not available
Proposed resolution
The actual instantiated arguments are not needed, just their IDs.
Retrieve those directly
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#3 | vdc-2230055-3.patch | 2.66 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettThis was triggered by #2095959: Remove instances of menu_get_object('node') and #2164367: Rebuild router as few times as possible per request
I have no idea how to test this, since it seems Simpletest skips the terminate event completely.
The other deletions were dead code, as flagged by PHPStorm.
Comment #3
tim.plunkettMy fault for not running the unit tests locally.
I looked around, and we've casted this in other places. Should be fine.
Comment #4
sunLooks great to me!
Comment #5
dawehnerFor me too. This is a great cleanup as well.
Comment #7
catchNice find. Committed/pushed to 8.x, thanks!