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

javascript errors #10

Open
e1z0 opened this issue Dec 11, 2022 · 1 comment
Open

javascript errors #10

e1z0 opened this issue Dec 11, 2022 · 1 comment

Comments

@e1z0
Copy link

e1z0 commented Dec 11, 2022

Hi,

I've got javascript console errors when trying to load map, map loads but without any point data, the database is already filled, api key is set correctly. Error looks like:

Uncaught TypeError: xml is null
    loadMap https://wifi.lan/js/index.js:124
    onreadystatechange https://wifi.lan/js/index.js:201
    downloadUrl https://wifi.lan/js/index.js:198
    loadMap https://wifi.lan/js/index.js:122
    loadSettings https://wifi.lan/js/settings.js:98
    loadMapThemes https://wifi.lan/js/mapthemes.js:614
    setVariables https://wifi.lan/js/index.js:23
    onload https://wifi.lan/:1

Update: already fixed it, there was no global settings for mysql database/password etc, i've made that it reads them from environment variables, now working \o/

Fixed the code using Null coalescing operators if environment variables are not available then use your default values, i can make pull request if you want and merge the changes.

@Znerox
Copy link
Owner

Znerox commented Dec 11, 2022

So you're building your own docker image based on this code? I have not really considered that use case, so the code in this repo does not look for environment variables (the code used to build the docker image is slightly changed).

This wiki article explains what files needs to be changed, as I see you've already figured out.

I'll look into the suggested changes.

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

2 participants