Problem/Motivation

When I add a value to the "Disable the scanner if these elements are detected" field in the module settings, the module generates a selector string with an extra trailing comma.
This produces an invalid selector, causing a SyntaxError in the browser console.

Steps to reproduce

  1. Go to the Editoria11y module settings page.
  2. In the "Disable the scanner if these elements are detected" field, add a selector.
  3. Save the configuration.
  4. Load any page where Editoria11y runs.
  5. Open the browser console.

Proposed resolution

Update the JavaScript to remove the trailing comma and space from the selector string when drupalSettings.editoria11y.no_load is set.

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

leoenriquezp created an issue. See original summary.

leoenriquezp’s picture

Status: Active » Needs review

I've created a Merge Request; it's ready for review

itmaybejj’s picture

Assigned: Unassigned » itmaybejj

Thank you; I'll try to get a release out next week.

vinodhini.e’s picture

Hi, I have installed this module in Drupal 11.2.3 and tested the functionality. I encountered the same issue as originally reported.
After applying Merge Request #34, the issue still persists and has not been fixed.

pcate’s picture

Status: Needs review » Reviewed & tested by the community

Ran into this issue today. The patch applied cleanly with composer and resolved the issue.

@vinodhini.e make sure you've cleared caches after applying the patch. An aggregated JS file might still be loading.

itmaybejj’s picture

Yeah seems like cache clear is the thing to do. I added version numbers to the library definition just for kicks, but I am pretty sure cache will need to clear for those as well.

Thank you @leoenriquezp and testers. This was a regression from hard-coding check prevention when Experience Builder is active.

itmaybejj’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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