You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were having issues getting the explore-your-area page to work.
It seemed to be stuck "loading".
Debugging a little seems to indicate this is because the code never manages to load the translation messages. Meaning it never exits this loop.
Reason is the BC_CONF global config is not updated properly.
Because in the app.js script (not sure how that is generated) the BC_CONF global is already initialized to: {autocompleteURL: 'https://species-ws.biodiversiteitsportaal.dev.svdev.be/search/auto.json'}
Working on a quick-fix workaround for our purposes by just updating the BC_CONF in some extra JS script I can inject.
If you would like, I can try an open a PR with a suggestion for a fix.
Also, it might be a good idea to add some logging to the init loop, so it becomes a bit more obvious when something is wrong with the loading.
The way the BC_CONF global is being used seems a little dangerous as well.
Maybe a longer term idea could be to make it more of a read-only immutable by extracting it to a separate module that is required everywhere else. 🤷
That way the order of loading in the code should not affect the behavior.
Thank you! 🙇
The text was updated successfully, but these errors were encountered:
We were having issues getting the explore-your-area page to work.
It seemed to be stuck "loading".
Debugging a little seems to indicate this is because the code never manages to load the translation messages.
Meaning it never exits this loop.
Reason is the BC_CONF global config is not updated properly.
Because in the app.js script (not sure how that is generated) the BC_CONF global is already initialized to:
{autocompleteURL: 'https://species-ws.biodiversiteitsportaal.dev.svdev.be/search/auto.json'}
And therefor this if-statement always evaluates as false.
Working on a quick-fix workaround for our purposes by just updating the BC_CONF in some extra JS script I can inject.
If you would like, I can try an open a PR with a suggestion for a fix.
Also, it might be a good idea to add some logging to the init loop, so it becomes a bit more obvious when something is wrong with the loading.
The way the BC_CONF global is being used seems a little dangerous as well.
Maybe a longer term idea could be to make it more of a read-only immutable by extracting it to a separate module that is required everywhere else. 🤷
That way the order of loading in the code should not affect the behavior.
Thank you! 🙇
The text was updated successfully, but these errors were encountered: