This is jQuery XMLHttpRequest (jqXHR) object, not the native XMLHttpRequest object.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darol100’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -JavaScript +JavaScrip

This patch seem good to me.

darol100’s picture

Issue tags: -JavaScrip +JavaScript

Fixing the issue tag.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
darol100’s picture

Assigned: Unassigned » darol100

I would work on this tonight.

darol100’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.43 KB

Here is the patch.

darol100’s picture

Assigned: darol100 » Unassigned
nod_’s picture

Status: Needs review » Needs work

The console.log needs to be removed and the JSDocs updated to match the new parameter name

core/misc/ajax.js
   391:8   error    Unexpected console statement                                 no-console
   391:26  error    Missing semicolon                                            semi
   618:2   warning  Expected JSDoc for 'jqXHR' but found 'xmlhttprequest'        valid-jsdoc

The last submitted patch, 5: 2496053-Rename-xmlhttprequest-to-jqXHR-in-Drupal-Aja.patch, failed testing.

darol100’s picture

Status: Needs work » Needs review
FileSize
1.54 KB

Do we need to updated the parameter on line 94 and 95 ?

Status: Needs review » Needs work

The last submitted patch, 9: 2496053-Rename-xmlhttprequest-to-jqXHR-in-Drupal-Aja.patch, failed testing.

Status: Needs work » Needs review

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

droplet’s picture

Status: Needs review » Needs work
Issue tags: +Novice, +js-novice, +Needs reroll, +DX (Developer Experience)

Please reroll with new fixing also :)

tameeshb’s picture

Status: Needs work » Needs review
FileSize
7.53 KB

Uploaded a fresh patch, please review!

chiranjeeb2410’s picture

Status: Needs review » Reviewed & tested by the community

@tameeshb,

Changes are good to go with. Changing to RTBC.

alexpott’s picture

Version: 8.3.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Needs work
+++ b/core/misc/ajax.js
@@ -110,8 +110,8 @@
-   * @param {XMLHttpRequest} xmlhttp
-   *   XMLHttpRequest object used for the failed request.
+   * @param {jqXHR} xmlhttp
+   *   jqXHR object used for the failed request.

How come we're not renaming the variable here? We do elsewhere in the patch. @droplet / @nod_ shall we rename all the variables?

+++ b/core/misc/ajax.js
@@ -745,12 +745,12 @@
+   * @param {jqXHR} jqXHR
    *   Native Ajax object.

@@ -938,14 +938,14 @@
+   * @param {object} jqXHR
+   *   Native jqXHR object.

I don't think the jquery UI is a native object. To me native object means something that exists a core feature of the javascript language. The point of this change is to document we're not using the native object :)

As a task this is only eligible for 8.4.x - you could argue that fixing the typehints and documentation is a bug. If we want to get this in 8.3.x then we need to separate up the bits that address the buggy documentation and task which is renaming variables to something better.

droplet’s picture

How come we're not renaming the variable here? We do elsewhere in the patch. @droplet / @nod_ shall we rename all the variables?

Yes, we can. It's better to read also.

the $.ajax() method returns the jqXHR object. 100% in Drupal Core is $.ajax calls I think.

aj2r’s picture

Hi,

I just changed the 'Native' and variable name.

aj2r’s picture

Issue tags: +DevDaysSeville

Adding tag.

aj2r’s picture

Status: Needs work » Needs review

The last submitted patch, 20: 2496053-20.patch, failed testing.

aj2r’s picture

Changed wrong line 424.

jofitz’s picture

Issue tags: -Needs reroll

Removed Needs Reroll tag.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

kanav_7’s picture

Updated for version 8.6.x

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
Issue tags: -JavaScript +JavaScript
FileSize
174 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

amanshukla6158’s picture

Status: Needs work » Needs review
FileSize
9.7 KB

patch for 10.1.x

needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
1.28 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

_pratik_’s picture

Status: Needs work » Needs review
FileSize
10.55 KB
1.69 KB

Fix for failures in #39
Thanks

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs issue summary update

Removing credit from #39 and #41 as it is expected to check your patch before uploading.

The last patch doesn't pass commit checks, could you make sure to run ./core/scripts/dev/commit-code-check.sh before uploading a patch to make sure there are no issues with code formatting. see https://www.drupal.org/docs/develop/development-tools/running-core-devel...

This seems like it needs an issue summary update.

Abhisheksingh27’s picture

Status: Needs work » Needs review
FileSize
10.39 KB
604 bytes

Reuploading patch after code formatting.

Abhishek_Singh’s picture

Re-uploading patch.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
85 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mrinalini9’s picture

Status: Needs work » Needs review
FileSize
10.35 KB

Rerolled patch #44, please review it.

Thanks!

needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
1.27 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

ankit_rathore’s picture

Status: Needs work » Needs review
FileSize
10.66 KB

trying to fix ccf in #39 & #41 by using
./core/scripts/dev/commit-code-check.sh
as suggested in #42

reroll for 10.1.x
please review it

smustgrave’s picture

Status: Needs review » Needs work

Still tagged for issue summary update

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.