Loaded library cache is not invalidated when changing provider in settings

Created on 24 May 2025, 10 days ago

Problem/Motivation

getInfo() in src/Element/AddressAutocomplete.php is cached by drupal, even in a dev environment with caching turned off.
If the site administrator changes the auto complete provider in the settings between google maps and the others the cached library will not update and the wrong library will be loaded.

Steps to reproduce

Change the provider from something other than google maps to google maps. Type an address in an autocomplete box. Check site logs. The session key from the google-maps.js is missing and you get a php error. Check the browser's network log. google-maps.js did not load.

Clear the site cache. Now it loads.

Proposed resolution

Add a cache tag to getInfo() so the cache is invalidated when the settings are changed.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rhovland Oregon

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

Comments & Activities

Production build 0.71.5 2024