Problem/Motivation
Steps to reproduce:
- Login as admin
- Edit a view using the table style, that has sortable columns. For example, the "People" view at
/admin/structure/views/view/user_admin_people - Scroll down to the Preview section of the page
- Click a column header to try to sort by that column
-
Expected behavior: The preview reloads, but sorted according to the column you chose. This was the behavior in D7, and in D8 before commit 20f1c993b6d76be0203138f2091952bc90a4bd61 .
Observed behavior: You are sent to a page containing an AJAX response:
Proposed resolution
???
Remaining tasks
| Task | Novice task? | Contributor instructions | Complete? |
|---|---|---|---|
| Create a patch | Instructions | ||
| Update the issue summary noting if allowed during the beta | Instructions |
User interface changes
???
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | interdiff-2575245-19-22.txt | 1.44 KB | toniteof |
| #22 | 2575245-22.patch | 3.22 KB | toniteof |
| #20 | interdiff-2575245-15-19.txt | 1.88 KB | toniteof |
| #20 | 2575245-19.patch | 3.24 KB | toniteof |
| #15 | interdiff-2575245-11-15.txt | 833 bytes | toniteof |
Comments
Comment #2
toniteof commentedI am working on it.
Comment #3
toniteof commentedURL path was changed.
Comment #5
toniteof commentedUpdated FieldWebTest
Comment #6
dawehnerThis would break cacheablity of pagers inside views blocks. I'd suggest to maybe check for the views preview instead?
Comment #7
toniteof commentedIf I understood correctly
Comment #8
dawehnerIMHO you should use
$view->live_previewComment #9
toniteof commentedthx for help
Something like this?
Comment #10
dawehner+1 and maybe even better put a quick line of documentation there, why we are doing that.
Comment #11
toniteof commentedComment #12
dawehnerSorry, but this is not WHY, this line of documentation explains what the next line of code is doing.
Removing the regression tag because its pointless. A bug is a bug and stays a bug. All bugs are regressions relative to the expected behaviour. Almost
Comment #13
toniteof commentedSo as for the why
Comment #14
dawehnerI would go with the following which explains both:
// For the actual site we want to not render full URLs, because this would make pagers cacheable per URL, which is problematic in blocks, for example. For the actual live preview though the javascript relies on properly working URLs.Comment #15
toniteof commented-
Comment #16
thenchev commentedThanks @toniteof
Tested it, works great for me.
@dawehner
Do you have anything to add or can we RTBC?
Comment #17
dawehnerNot not really ...
I'll set this to RTBC because this part of the preview can just be tested properly with some JS, I believe.
Comment #18
alexpottCan we at least test the URLs in the output?
Comment #19
dawehnerMH, I guess we can. We don't even necessarily need to fake up the ajax request.
Comment #20
toniteof commentedAdd tests.
Comment #21
dawehnerThe test looks great in general.
Let's add public there.
Let's remove the whitespace.
Comment #22
toniteof commentedThanks @dawehner.
Comment #23
thenchev commentedI have nothing to add. Great job. I guess we can put it back to RTBC.
Comment #26
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!