Problem/Motivation
Proposed resolution
Steal the fix from #2789531-116: Support for batch operations.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 2951185-20.patch | 4.02 KB | jhedstrom |
| #21 | 2951185-20-TEST-ONLY.patch | 3.5 KB | jhedstrom |
Comments
Comment #2
claudiu.cristeaPatch. I think this could be committed as a workaround till a fix will land in #2937942: REST views: regression in 8.5.x: view with display using 'csv' format now returns a 406 response, need to add ?_format=csv to URL to make it work.
Comment #3
darvanenAgreed this is a good approach for now. Doesn't affect other download types which was the only potential issue I could think of.
Comment #4
akalam commentedGreat approach, but if you try to access directly to the download url, you steel get the 406 error
Comment #5
akalam commentedSorry for the previous comment, I understand now the workarround. Waiting for core issue #2937942 to solve it
Comment #6
yazzbe commentedThanks for the workaround Claudiu.
#2 fixed my export links after upgrading to D8.5
Comment #7
simgui8 commentedThanks you Claudiu.
#2 fixed my export links after upgrading to D8.5
Comment #8
nottaken commented#2 fixed It for me as well after upgrading to D8.5. Thanks.
Comment #9
rgry commentedAdding ?_format=json is working for me in GET and DELETE but not in PATCH OR POST. Any hint I could try?
Comment #10
andypostrelated CR is https://www.drupal.org/node/2954953
Comment #11
chadmandoo commentedThis works for downloading when attaching to but not whenever the view is URL based. Is there any work around for this?
Comment #12
darvanen@chadmandoo this will only affect automatically generated links. Have you tried adding
?_format=csvto the end of your URL when visiting it? (Not when setting it in the view)
Comment #13
hamrant commentedFixed for using
?_format=csvin feed Icon.Comment #14
bander2 commented#13 works for my CSV exports, but it looks like it adds "?_format=csv" to all attached views data export urls indiscriminately. So it breaks or at least doesn't doesn't fix JSON and XML exports.
Comment #15
berdirI don't quite understand what #13 is trying to do and why #2 would not work for that which is setting the first configured format dynamically.
Comment #16
wim leersI don't think @Berdir meant to RTBC?
Comment #17
berdirI Re-RTBC'd the patch from comment #2 that was RTBC before and AFAIK works fine and I'd suggest to open a separate issue if there are additional problems that are not solved by this :)
Comment #18
dandaman commentedPatch #2 works for me. At least, the CSV button attached to the other views now has a link that works.
Comment #19
jhedstromThis adds a test. The test-only patch is the interdiff as well (from #2).
Comment #21
jhedstromOops, changes to the test view broke the existing kernel test.
Comment #23
kevin.dutra commentedAwesome! Nice to have some test coverage on top of the fix. Since the fix without tests was already RTBC and the tests are passing, moving this back to RTBC.
Comment #24
Mihaigr commentedThis fixes the issue for me
Comment #27
jhedstromI've committed the patch in #21. Thanks all!
Comment #28
jhedstromComment #29
mcfdez87 commentedHello,
With the last dev realese (downloaded today) with Drupal 8.5.3 the error is still happening. If I put at the end of the path "? _format = csv" and it works, but without it, no.
Comment #30
mcfdez87 commentedComment #31
berdirSee the referenced core issue.
This is only about fixing the attached icons, it does nothing to all other links and it is not meant to.