Problem/Motivation
When adding a Rest export to ie http://drupal.d8/index.php/admin/structure/views/view/frontpage/edit/res... the "Auto preview" should display something.
Currently the POST to http://drupal.d8/index.php/admin/structure/views/view/frontpage/preview/... gives error 500
[Thu Sep 18 08:11:02 2014] [error] [client 127.0.0.1] Uncaught PHP Exception Symfony\\Component\\Serializer\\Exception\\UnexpectedValueException: "Serialization for the format drupal_ajax is not supported" at /Users/clemens/Sites/drupal/d8/www/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php line 77, referer: http://drupal.d8/index.php/admin/structure/views/view/frontpage/edit/rest_export_1
Proposed resolution
Pick the first available "Accepted request formats".
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff.txt | 2.54 KB | dawehner |
| #12 | serializer-2340471-12.patch | 2.3 KB | dawehner |
| #9 | views-2340471-9.patch | 3.98 KB | dawehner |
| #9 | views-2340471-do-not-test.patch | 3.23 KB | dawehner |
| #9 | interdiff.txt | 3.63 KB | dawehner |
Comments
Comment #1
dawehnerInteresting
Comment #3
clemens.tolboomThe test misses preparing the stub with
$view->live_preview = TRUE;Comment #4
clemens.tolboomTest fails on local
while the test verbose output looks like hal+json ... not sure why :-(
Comment #6
clemens.tolboomWrong thought ... use boolean
if ($this->view->preview) {New patch should lead to 1 fail mentioned in #4
Comment #7
clemens.tolboomOn local I have
Doing a pretty print
$ diff --side-by-side expected-pp.json actual-pp.json | grep \|givesWhy is index.php added?
Comment #8
clemens.tolboomA normal
curl --user admin:admin --header "Accept: application/hal+json" --request GET http://drupal.d8/node/1does not insert "index.php/"Comment #9
dawehner@clemens.tolboom
Not sure about all your work here is, but afaik the problem is basically that the existing test has a wrong setup.
Comment #11
clemens.tolboom@dawehner np as your change explains my stumbling ;-)
Huh? Why are most test* functions renamed to ptest* ?
To many whitespace
Comment #12
dawehnerThis is poormanstestaccelerator.
Fixed the issues.
Comment #13
clemens.tolboomComment #14
clemens.tolboomComment #15
webchickCommitted and pushed to 8.x. Thanks!