Autocomplete JS file sometimes produces JS error

Created on 26 September 2023, over 1 year ago
Updated 28 November 2023, about 1 year ago

Problem/Motivation

The new JS file introduced in πŸ› Autocomplete throws errors when purging paths with extensions Fixed was causing some issues for us on one of our sites. When JS aggregation was turned on, the file was throwing an error about the "prototype property of undefined". Here is a screenshot showing the browser inspector flagging the issue:

Steps to reproduce

Not totally clear on this. I could not reliably reproduce the error message locally or on other sites. Rolling back to 7.x-1.3 resolved the issue for us.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pyrello

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pyrello
  • πŸ‡ΊπŸ‡ΈUnited States helianthropy

    I only first noticed this on a test site hosted by Acquia that does not include search. My local site does not have Drupal.ACDB defined, and the issue isn't triggered, presumably since it’s not hosted in an Acquia environment.

    Should this be testing for the existence of Drupal.ACDB before assigning a value?

  • Status changed to Needs review about 1 year ago
  • Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.3 & MySQL 5.5
    last update about 1 year ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States helianthropy

    I’ve created a patch that resolves the issue for me. It wraps the code in a try/catch block and prints any error to the console. Built against version 7.x-1.5.

  • πŸ‡ΊπŸ‡ΈUnited States pyrello

    I'm just realizing I set this to a different version of the module than I intended to. It looks like the issue is present in both 7x and 8+x versions.

  • Assigned to Balu Ertl
  • πŸ‡­πŸ‡ΊHungary Balu Ertl Budapest πŸ‡ͺπŸ‡Ί
  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡­πŸ‡ΊHungary Balu Ertl Budapest πŸ‡ͺπŸ‡Ί

    Stepping through all the open 8.x issues ( search link β†’ ) I did not found many exactly matching tickets. Perhaps #2911828-6: File Entities do not get purged when overwritten β†’ might be related in terms of invalidating URL paths of file entities.

    β€œI'm just realizing I set this to a different version of the module than I intended to. It looks like the issue is present in both 7x and 8+x versions.”

    The code snippet shown on the screenshot in the issue summary is from the 7.x version of the module. The 8.x branch does not contain any JavaScript file. However, the ticket was set to 8.x-1.x-dev. From this point, I feel confused about how to reproduce the issue.

    Some more clarification would be appreciated.

  • πŸ‡ΊπŸ‡ΈUnited States pyrello

    So sorry, I also got confused about this. I have been working on D9 upgrades, but this was not related to that. This was definitely on a D7 site.

  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • πŸ‡­πŸ‡ΊHungary Balu Ertl Budapest πŸ‡ͺπŸ‡Ί

    Ah, clear. Thanks for the update. Then I have to unassign myself from this ticket due to the lack of coding experience on D7.

Production build 0.71.5 2024