Problem/Motivation

Per #3189416: [PP-1] Remove jQuery Form dependency from misc/ajax.js and it's parent issue, jQuery.form is among the libraries we should mark internal to facilitate easier future removal.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bnjmnm created an issue. See original summary.

bnjmnm’s picture

Status: Active » Needs review
StatusFileSize
new1.74 KB
new2.23 KB

The last submitted patch, 2: 3280359-2-10x.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 2: 3280359-2-94x.patch, failed testing. View results

bnjmnm’s picture

Status: Needs work » Needs review
StatusFileSize
new5.7 KB
new3.75 KB

Updated vendor updates and changed additional uses of core/jquery.form

nod_’s picture

Status: Needs review » Reviewed & tested by the community

Looking good to me

  • catch committed f081cdb on 10.0.x
    Issue #3280359 by bnjmnm: Make jQuery.form internal
    
  • catch committed 01512ed on 9.4.x
    Issue #3280359 by bnjmnm: Make jQuery.form internal
    
  • catch committed 00991b9 on 9.5.x
    Issue #3280359 by bnjmnm: Make jQuery.form internal
    
    (cherry picked from...
catch’s picture

Status: Reviewed & tested by the community » Fixed

10.x and 9.x patches both look commit - committed/pushed to 10.x and 9.5.x/9.4.x respectively.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

effulgentsia’s picture

Title: Make jQuery.form internal » [Needs change record] Make jQuery.form internal
Status: Closed (fixed) » Needs work
Issue tags: +Needs change record

I'm very happy this got in. Let's add a change record for it.

joachim’s picture

Is this change the reason why I've had to add $form['#attached']['library'][] = 'core/jquery.form'; to forms in Module Builder, because the AJAX buttons have suddenly started crashing with a JS function not found popup?

If so, this really needed a change record before it was committed and made it into a release!

effulgentsia’s picture

Hm, #11 is unexpected. How was jquery.form being added in Module Builder in Drupal 9.3? If it was via the rendering of an element with a #ajax property, then in Drupal 9.4, #5 made that now bring in internal.jquery.form which is the same JS files, so shouldn't error from missing a JS function.

bnjmnm’s picture

Title: [Needs change record] Make jQuery.form internal » Make jQuery.form internal
Status: Needs work » Fixed
Issue tags: -Needs change record

@joachim You are correct that this should have a change record, so I made one. #3293156: core/jquery.form library deprecated

However, it's not clear to me that the changes here would cause the symptoms you reported given the solution you said fixed it:

  • In Drupal 9.4+, the core/jquery.form triggers a deprecation warning but is still fully available and otherwise unchanged. If there was code trying to load this library in Drupal 9, it would still be there.
  • In Drupal 10+, the core/jquery.form no longer exists so there would be a problem if something was trying to load it, but then the solution you reported:
    $form['#attached']['library'][] = 'core/jquery.form';
    

    would not work because that library no longer exists.

Perhaps the above can help narrow down what is going on with Module Builder.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.