Skip to main content

Bug Tracker

Side navigation

#4825 closed bug (fixed)

Opened June 26, 2009 02:06PM UTC

Closed March 12, 2013 01:29AM UTC

Last modified March 13, 2013 01:30AM UTC

Data returned from ajaxSetup dataFilter is not passed to ajax complete() callbacks

Reported by: jbabbitt Owned by:
Priority: low Milestone:
Component: ajax Version: 1.4.4
Keywords: Cc: jaubourg
Blocked by: Blocking:
Description

The ajax complete() callbacks are passed xhr, but not the data returned from dataFilter.

As a result, dataFilter will not be applied to data loaded via the .load() function.

Attachments (0)
Change History (14)

Changed June 15, 2010 03:25AM UTC by dmethvin comment:1

milestone: 1.3.21.4.3

Changed November 11, 2010 02:48AM UTC by dmethvin comment:2

status: newopen

One solution would be to add settings (s) as an argument to the call to the complete handler in handleComplete.

Changed November 12, 2010 02:40AM UTC by snover comment:3

milestone: 1.4.3

Resetting milestone to future.

Changed December 27, 2010 10:36PM UTC by rwaldron comment:4

keywords: ajaxSetup dataFilterajaxSetup,dataFilter,ajaxrewrite

Changed January 11, 2011 07:05PM UTC by jaubourg comment:5

resolution: → fixed
status: openclosed

Changed January 11, 2011 07:06PM UTC by jaubourg comment:6

Changed January 28, 2011 01:11AM UTC by jitter comment:7

keywords: ajaxSetup,dataFilter,ajaxrewriteajaxSetup,dataFilter
milestone: → 1.5
priority: minorlow
version: 1.3.21.4.4

Changed March 11, 2013 09:31PM UTC by james.m.greene@gmail.com comment:8

This bug was never fixed. Or, it may have been fixed only for load but not for Ajax calls at large.

Fiddle:

http://jsfiddle.net/JamesMGreene/CUJrN/

Changed March 11, 2013 09:32PM UTC by JamesMGreene comment:9

Requesting that this bug be reopened.

Changed March 11, 2013 09:37PM UTC by dmethvin comment:10

cc: → jaubourg
keywords: ajaxSetup,dataFilter
milestone: 1.5
resolution: fixed
status: closedreopened

@jaubourg can you take a look?

Changed March 11, 2013 09:39PM UTC by dmethvin comment:11

status: reopenedopen

In general it's better to create a new ticket than reopen an ancient bug. We need a Trac feature that freezes tickets more than a year old and prevents posts on them.

Changed March 12, 2013 01:29AM UTC by jaubourg comment:12

resolution: → fixed
status: openclosed

You should create a new ticket. Behaviour is consistent with what is documented. Your request is unrelated to ajaxSetup or the actual use-case involved here (title is still very misleading, original request was about applying dataFilter in ajaxSetting in the context of load as was determined with OP iirc).

It is obvious you wish the third parameter to be the success value. It is a feature request and should be in its own ticket for proper discussion. My take on it is that there are enough means to get the filtered data that we do not need to meddle with an already deprecated complete callback. You can call done on the jqXHR within the complete callback for instance.

Changed March 12, 2013 02:40PM UTC by JamesMGreene comment:13

@jaubourg: I'm perfectly fine with leaving it as-is if the complete callback actually get axed. Is there a targeted milestone release for that yet? It's already hung around much longer than I expected.

Changed March 13, 2013 01:30AM UTC by jaubourg comment:14

Replying to [comment:13 JamesMGreene]:

@jaubourg: I'm perfectly fine with leaving it as-is if the complete callback actually get axed. Is there a targeted milestone release for that yet? It's already hung around much longer than I expected.

It will probably end up as one of these "deprecated but never removed" antics. complete is used for pretty much anything save for cooking breakfast. All we can do is show people how to handle stuff properly with 2 handlers or using always but the inconsistencies in signatures of the success and error callbacks makes complete so much more compelling in the "real world"(tm).