Open AgentJay opened 8 years ago
I solved my issue.
in the file 'includes\fapi.inc'
on line 107:
if (isset($element['#autocomplete_path']) && drupal_valid_path($element['#autocomplete_path'])) {
should be changed to:
if (!empty($element['#autocomplete_path']) && drupal_valid_path($element['#autocomplete_path'])) {
!empty is a better check for an empty value, isset seems to be picking up something (blank space?) I'm not 100% sure what it sees, but making this change fixed my issue.
@AgentJay Thanks for this, I will look into it ASAP
@AgentJay I've looked into this and I can confirm that with a basic Drupal + Kalatheme site the behaviour that you're seeing isn't present. My assumption is that your site has a module installed that is inadvertently adding #autocomplete_path
to all textfields. I have amended the if
statement to cater for this in #291 because it doesn't change the functionality and handles this erroneous case.
Just for the sake of completeness, Drupal core's theme_textfield
function uses the following if
statement to handle autocomplete:
if ($element['#autocomplete_path'] && !empty($element['#autocomplete_input'])) {
Hello,
I'm getting the autocomplete functionality turned on for ALL my fields regardless of whether autocomplete is on or not, even my jQuery range sliders have the AJAX autocomplete enabled.
If I try to enter a value in a field where autocomplete is turned on it works fine. If I try to enter a value in a field where autocomplete is OFF I get an Ajax HTTP error several times.
This is only happening when I use Kala theme.
I'm on the latest release for Drupal 7 (7.x-3.2)