Problem/Motivation

The correct capitalization of "Ajax" is not "AJAX". For confirmation that this is the correct spelling, see:
https://www.drupal.org/node/752056
https://en.wikipedia.org/wiki/Ajax_%28programming%29
https://www.drupal.org/drupalorg/style-guide/content#relatedwords

The Views UI has it capitalized wrong in the view editing form (under Advanced, it says "Use AJAX" not "Use Ajax"). This occurs in several lines in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php. And there is also one place in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php

Also, core/misc/ajax.js has it wrong in several UI messages.

Note: Someone could also make **separate issues** to fix this problem in a VERY LARGE number of places in documentation and code comments, tests, method names, etc., but this issue is just to fix it in the user interface text. It should be a fairly small patch of about 10 changes at most.

Steps to reproduce

Proposed resolution

Determine if this scope here is correct - see that parent issue.

Remaining tasks

Reroll

User interface changes

Yes

Comments

jhodgdon created an issue. See original summary.

miteshmap’s picture

Status: Active » Needs review
StatusFileSize
new4.02 KB

Fixed for user interface text only, For views and misc/ajax.js,

dawehner’s picture

Version: 8.2.x-dev » 8.3.x-dev
Issue tags: +String change in 8.3.0

I think its too late for string changes now.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

This looks like the correct patch to me.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Thank you for spotting this and working on it.

This should be find and replace on core and probably given it is a common error - see how much AJAX there is in core - we should have a coder rule to automatically test. Otherwise we're just going to introduce this again and again and again.

In order to fix core coding standards in a maintainable way, all our coding standards issues should be done on a per-rule basis across all of core, rather than fixing standards in individual modules or files. We should also separate fixes where we need to write new documentation from fixes where we need to correct existing standards. This all should be done as part of #2571965: [meta] Fix PHP coding standards in core, stage 1. A good place to start is the child issues of #2572645: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard.

For background information on why we usually will not commit coding standards fixes that aren't scoped in that way, see the core issue scope guidelines, especially the note about coding standards cleanups. That document also includes numerous suggestions for scoping issues including documentation coding standards cleanups.

Contributing to the overall plan above will help ensure that your fixes for core's coding standards remain in core the long term.

jhodgdon’s picture

You want to do the code comments, docs comments, and UI text in the same patch? This patch covers the UI text only. I thought that we would normally want the UI patch separate from the comments, but maybe not.

Also, we would need to figure out what to do about method names. Many of them also have AJAX in all caps (even though that actually also violates our standards for CamelCase method names. But probably those mostly cannot be changed, unless they are test methods? not sure.

Anyway, I'll leave it for someone else to supervise this issue...

valthebald’s picture

Issue tags: -Novice

Removing Novice tag since there is no consensus on solution

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

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now 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.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

This was unfortunately set back to Needs Work because @alexpott decided the scope was too narrow. Meanwhile, the UI text did not make it in. This was not a coding standards change. This was a UI text change.

Can we just fix the UI text in this issue, and have a separate issue for the documentation and/or coding standards fixes? Please? It is too ambitious to fix the coding standards, write a sniff, etc. We just need to fix the UI in the meantime...

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, wrong status. I'll leave this at Needs Work... I don't want to get into an argument.

But I just want to say... I disagree that this is a coding standards issue. It's basically a spelling/style error to write "AJAX" instead of "Ajax". I looked in Coder and didn't find any similar sniffs for this type of spelling/style error or capitalization. And we do already have a standard for writing Ajax not AJAX by the way, at least here:
https://www.drupal.org/drupalorg/style-guide/content#relatedwords

You're right though, AJAX with the incorrect capitalization occurs in 559 lines currently under the core directory in Drupal 8.3.x latest. Ajax with the correct capitalization occurs in 1531 lines, although that probably includes a lot of CamelCase class names (I just did a grep | wc).

But it seems to be a huge burden, that if we want to fix this UI text bug and make the user-facing text correct, we also have to:
- Write a Coder sniff, and get that patch working
- Patch all 549 other instances that aren't UI text

But, whatever. If that's the decision, that's the decision. I'm really not going to say any more (and will unfollow this to make sure).

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.

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.

quietone’s picture

Category: Bug report » Task
Issue summary: View changes
Issue tags: - +Bug Smash Initiative, +Needs reroll
Parent issue: » #3294706: [Meta] Correct spelling of Ajax

I agree with jhodgdon that this is spelling issue and not a coding standards issue.

I did a search for AJAX in Drupal 9.5.x which found 731 instances in 244 files. Due to the quantity of changes a Meta issue is needed to oversee the changes and this issue will be a child. I'll make the Meta now.

Spelling issues are tasks not bug, changing category. This could use a reroll, adding tag.

immaculatexavier’s picture

Assigned: Unassigned » immaculatexavier
immaculatexavier’s picture

Assigned: immaculatexavier » Unassigned
ravi.shankar’s picture

Issue tags: -Needs reroll
StatusFileSize
new4.04 KB
new5.06 KB

Added reroll of patch #2 on Drupal 9.5.x.

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.

ayush.khare’s picture

StatusFileSize
new4.86 KB
new3.93 KB
new3.26 KB

Reroll #24 for 10.1.x and Fixed CCF for 9.5.x

ayush.khare’s picture

Status: Needs work » Needs review
smustgrave’s picture

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

The proposed solution is

Determine if this scope here is correct - see that parent issue.

Was that done? Can the IS be updated to reflect that.

This is altering the schema won't it need an update hook to trigger?

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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.