Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ajax system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Feb 2014 at 05:16 UTC
Updated:
29 Jul 2014 at 23:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jessebeach commentedAdds some jank eval support for the JSON callback sent from the Toolbar subtrees route controller. Let's get this into ajax.js so Toolbar just needs to call the URL and not worry about the JSON data eval'ing.
Oh, and the namespace of the ToolbarController was wrong in the routing file for some reason, so I fixed it:
Comment #2
webchickRegressions in previously working things == critical.
Comment #3
dawehnerOh i haven't opened this issue in the meantime but also ran into the problem as you talked about the toolbar in the other issue: #2187991: toolbar access checking points to wrong namespace
Comment #4
jessebeach commentedThis is what JsonResponse is now returning
Comment #5
dawehnerSo yeah, if you return a JsonResponse in your controller it should be passed directly to the output. This is cleary a bug.
Comment #6
jessebeach commentedI had a chat with nod_ about this and he agrees. A JsonResponse should return JSON. if you want commands and the whole Drupal AJAX experience, then one should use AjaxResponse.
Comment #7
dawehnerRight, in those cases you have drupal_ajax as content type, so both the JS and the PHP developer has control over it.
Comment #8
dawehnerRerolled.
Comment #9
dawehner.
Comment #10
agentrickardWorks in testing. Needs code review.
Comment #11
agentrickardVery minor documentation re-roll (a / an and a missing comma). Looks good!
Comment #12
agentrickardAnother minor docs change to use "Response object" consistently.
Comment #13
star-szrAdding back the test case that got lost and more minor docs cleanup after talking to @dawehner. This looks good to go!
Including test-only patch as well for visibility and updating the issue summary, hope I got the details right.
Comment #16
dawehnerThank you for fixing the grammar mistakes.
Comment #18
webchickCommitted and pushed to 8.x. Thanks!