Testing on a site without clean URLs enabled, the JavaScript password validation displays just an empty box.

Changing

$.post(
          Drupal.settings.basePath + 'password_policy/check',

to

$.post(
          Drupal.settings.basePath + '?q=password_policy/check',

fixes.

Not sure what the proper fix is here.

Comments

aohrvetpv’s picture

More than a few AJAX callbacks in Drupal core also do not work with clean URLs. Interesting. I wonder if it is by design or a widespread bug.

aohrvetpv’s picture

I reported one of the bugs with the same cause in Drupal core: #2286197: menu.admin.js broken with clean URLs disabled. However that bug is handled could inform how we handle this bug.

aohrvetpv’s picture

To date no one has reviewed #2286197: menu.admin.js broken with clean URLs disabled, and I am still not sure what is the proper way to handle clean URLs for AJAX callbacks. The documented Drupal jQuery AJAX example at the following page looks like it will also not work when clean URLs are disabled: https://www.drupal.org/node/305747

So I have adapted the fix based on #2286197: menu.admin.js broken with clean URLs disabled for this Password Policy bug, and will commit. It works, but may not be the proper solution.

  • AohRveTPV committed ad27d8a on 7.x-2.x
    Issue #2285261 by AohRveTPV: Fixed JS validation for clean URLs
    disabled...
aohrvetpv’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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