When creating a view with a REST export (using JSON) that displays fields, certain fields show empty values in the JSON.
E.g. I added a number field and a text field to a content type, whose values are empty in the JSON output. The node title and content type fields' values do show up however. I chatted about this with @dawehner on IRC, he was seeing the same behaviour.
When I display full entities in the view, all fields have their correct values in the JSON output.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | rest-2137305.patch | 5.5 KB | dawehner |
| #9 | interdiff.txt | 1.3 KB | dawehner |
| #4 | rest-2137305-PASS.patch | 5.42 KB | dawehner |
| #2 | rest-2137305-PASS.patch | 5.42 KB | dawehner |
| #2 | rest-2137305-FAIL.patch | 4.81 KB | dawehner |
Comments
Comment #1
brunodboComment #2
dawehnerThere we go.
Comment #4
dawehnerLet's just upload the working one.
Comment #6
dawehner4: rest-2137305-PASS.patch queued for re-testing.
Comment #7
brunodboConfirming that the patch in #4 fixes the issue: fieldapi field values are now displayed correctly in a view REST export.
Comment #8
damiankloip commentedLet's have a docblock :)
module should be rest_test_views?
Comment #9
dawehnerWow, you really read that yml file!
Comment #10
damiankloip commentedYes, this is good.
Comment #11
webchick9: rest-2137305.patch queued for re-testing.
Comment #13
swentel commented9: rest-2137305.patch queued for re-testing.
Comment #14
swentel commentedPretty sure, the last failure was a problem with the bot and/or network - we'll see who's right .. :)
Comment #15
alexpottCommitted 7a0b674 and pushed to 8.x. Thanks!
fixed the code comment during commit.