Problem/Motivation

A view that uses an exposed filter on a page can be accessed from a link such as http://d.8/new?since=2014-09-10 and the value of since will be used, filtering the view. A REST Export view with the same configuration will not be filtered by the exposed value. If there is some other mechanism that is supposed to be used to populate the filter, I can't find any documentation of it and it seems that the pattern from a page view should work with a REST view.

Repro steps:

  1. Install head under Apache/2.4.9 (Unix) PHP/5.5.15.
  2. Create two content items with different content dates.
  3. Create REST Export view with exposed filter greater than "Authored on" and set filter identifier.
  4. Make REST request to view endpoint, using filter identifier and a value in URL that should only display one node. Response will incorrectly include both nodes.
  5. Clone view to be a Page and use the same URL. Response will be correct.

Proposed resolution

Umm....

Remaining tasks

Identify cause & patch?

User interface changes

Existing feature will work as expected.

API changes

None?

Comments

khaled.zaidan created an issue. See original summary.

khaled.zaidan’s picture

This is duplicate of #2340623: Views REST export does not support exposed filters, but I can't re-open it.

This problem seems to be broken again (despite the display type still being set as "usesExposed").

After doing a bit of debugging, I've found that in the case of the REST export, the exposed filter is completely missing from the views filters (in the $view object), whereas it's present in other display types (e.g. page).

Looking further into it right now.

khaled.zaidan’s picture

Status: Active » Closed (cannot reproduce)

Wow I'm actually just a genius (read as "idiot")... editing one view while looking at another!

Please ignore this ticket :)