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

Apparent race condition: Admin form for link plugin does not display url select2 box #82

Open
fsbraun opened this issue Mar 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@fsbraun
Copy link
Sponsor Member

fsbraun commented Mar 16, 2022

Setup:

Result: Only roughly 50% of the time an error is thrown

  • The url field renders as TextInput.
  • Console says query function not defined for Select2 s2id_id_site
  • If in edit mode, a number appears in the text input field

image

Since this sometimes a server restart, a clearing of the browser cache helps, I fear it is some kind of race condition. Which prevents the two select2 fields to link.

A potential solution might be to catch the error and retry after a delay if the error is due to parts of the site / scripts not yet fully loaded.

@marksweb
Copy link
Member

I get this issue all the time. It did stop for a bit while I was working on cms 4 integration [locally], but now in production, it's 100% of the time.

From "Add URL" admin I get Uncaught TypeError: $element.select2 is not a function

@fsbraun fsbraun added the bug Something isn't working label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants