Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address lookup does not populate address in localgov_scarfolk / base #53

Open
andybroomfield opened this issue Nov 28, 2023 · 5 comments
Assignees

Comments

@andybroomfield
Copy link
Contributor

Encountering an error whilst testing the address lookup on a clean install.
When using localgov_scarfolk (and I assume the same would happen on localgov_base) the address lookup element does not populate the found addresses. I do get found address when I use Olivero so this might be a theme issue.

localgov.address.lookup.scarfolk.no.addresses.mp4
@Adnan-cds
Copy link
Contributor

Hi Andy,
I see a Javascript console error symbol in the screencast above. Could you please check that error. This screencast has been very useful by the way.

@andybroomfield
Copy link
Contributor Author

andybroomfield commented Dec 8, 2023

@Adnan-cds I think thats an extension (WGAG colour checker so not releated).

Screenshot 2023-12-08 at 12 28 14 pm

Issue is also present without the extension with no console error.

Screenshot 2023-12-08 at 12 30 17 pm

@Adnan-cds Adnan-cds self-assigned this Dec 8, 2023
@Adnan-cds
Copy link
Contributor

Okay, thanks. I will check.

@Adnan-cds
Copy link
Contributor

This is breaking address lookup on localgov_base. I have a feeling there is a typo in the relevant code.

This ...

if ($id == 'edit-actions') {
  $id .= '--' . Crypt::randomBytesBase64(8);
}
$variables['attributes']['id'] = $id;
$variables['attributes']['data-drupal-selector'] = $id;
$variables['element']['#attributes']['data-drupal-selector'] = $id;
$variables['element']['#id'] = $id;

... may intended to look like

if ($id == 'edit-actions') {
  $id .= '--' . Crypt::randomBytesBase64(8);

  $variables['attributes']['id'] = $id;
  $variables['attributes']['data-drupal-selector'] = $id;
  $variables['element']['#attributes']['data-drupal-selector'] = $id;
  $variables['element']['#id'] = $id;
}

Copying Mark and Maria to confirm @markconroy @msayoung

@msayoung
Copy link
Member

Here's the original issue we were trying to fix with that: https://www.drupal.org/project/drupal/issues/1852090
i suspect the address lookup field doesn't appreciate a random string.

I'll have to dig in to my memory of where the original problem was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants