Problem/Motivation

I installed a11y_autocomplete library using git clone, not with npm.
But a11y.autocomplete.js is not attached because in a11y_autocomplete_element.install file is used wrong - absolute - path.

function _a11y_autocomplete_element_find_library(): string {
  $git_clone = DRUPAL_ROOT . '/libraries/a11y_autocomplete/src/a11y.autocomplete.js';
  if (file_exists($git_clone)) {
    return $git_clone;
  }

This works for me:

function _a11y_autocomplete_element_find_library(): string {
  $git_clone = DRUPAL_ROOT . '/libraries/a11y_autocomplete/src/a11y.autocomplete.js';
  if (file_exists($git_clone)) {
    return base_path() . 'libraries/a11y_autocomplete/src/a11y.autocomplete.js';
  }

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Bohus Ulrych created an issue. See original summary.

larowlan’s picture

Thanks, I'll try to get to this next week

  • larowlan committed 93c8d32 on 1.x
    Issue #3269859 by Bohus Ulrych, larowlan: Wrong JS library path when...
larowlan’s picture

Status: Active » Patch (to be ported)

Cutting 1.0.2

larowlan’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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