Problem/Motivation
I have a view with display block that have a contextual filter using the default argument "Active menu item ID".
The view disappears if the url contains any query string.
Steps to reproduce
Create a block display of a view. Add the default value "Active menu item ID" when the filter is not in url.
Create a page with menu entry and place the block in it.
Access to the page with any query string.
/my-page
works
/my-page?a=b
doesn't work
Proposed resolution
Read current path from:
$current_path = $this->currentRequest->getPathInfo();
instead of
$current_path = $this->currentRequest->getRequestUri();
Patch attached
| Comment | File | Size | Author |
|---|---|---|---|
| menu_active_id_pathinfo.patch | 788 bytes | mikcat |
Comments
Comment #2
ozinComment #4
ozin