Problem/Motivation

As per this Drupal change record, the method replace should not be used anymore, and replaceWith should be used instead. Both methods work identically before Drupal 10.3.0, but starting in this version, only replaceWith is supported.

Steps to reproduce

N/A

Proposed resolution

Replace all instances of replace in #ajax form settings with replaceWith.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork facets-3451106

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

maursilveira created an issue. See original summary.

maursilveira’s picture

Version: 2.0.x-dev » 3.0.x-dev
Status: Active » Needs review

I've just created a merge request for both dev versions 2.0.x and 3.0.x with the change.

bkosborne’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

scott_earnest’s picture

Tested the 2.0.x patch with:

Drupal 11.0.7
Facets 2.0.9

Prior to patch, on page [Add Facet] (/admin/config/search/facets/add-facet)
After selecting "Facet source" ajax error appears and "Field" is not visible

Prior to patch - Broken

After applying patch "Field" appears as expected

After patch - Working

RTBC +1 on 2.0.x

kevinquillen made their first commit to this issue’s fork.

kevinquillen’s picture

Rebased branch so the patch can apply to the latest Facets release(s).

strykaizer’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Vienna2025

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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

fractile81’s picture

While this has been merged into the 3.0.x branch, the problem remains in the 2.0.x branch. Applying the changes manually (change "replace" to "replaceWith") appears to still correct the issue.