Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: akalam at Metadrop commentedGreat approach, but if you try to access directly to the download url, you steel get the 406 error
Comment #5
akalam CreditAttribution: akalam at Metadrop commentedSorry for the previous comment, I understand now the workarround. Waiting for core issue #2937942 to solve it
Comment #6
Yazzbe CreditAttribution: Yazzbe commentedThanks for the workaround Claudiu.
#2 fixed my export links after upgrading to D8.5
Comment #7
simgui8 CreditAttribution: simgui8 as a volunteer and commentedThanks you Claudiu.
#2 fixed my export links after upgrading to D8.5
Comment #8
nottaken CreditAttribution: nottaken commented#2 fixed It for me as well after upgrading to D8.5. Thanks.
Comment #9
rgry CreditAttribution: 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 CreditAttribution: chadmandoo as a volunteer 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=csv
to the end of your URL when visiting it? (Not when setting it in the view)
Comment #13
hamrant CreditAttribution: hamrant at Five Jars, Drupal Ukraine Community for Drupal Ukraine Community commentedFixed for using
?_format=csv
in feed Icon.Comment #14
bander2 CreditAttribution: bander2 as a volunteer 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 CreditAttribution: 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 CreditAttribution: kevin.dutra at Workday, Inc. 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 CreditAttribution: Mihaigr commentedThis fixes the issue for me
Comment #27
jhedstromI've committed the patch in #21. Thanks all!
Comment #28
jhedstromComment #29
mcfdez87 CreditAttribution: 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 CreditAttribution: 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.