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

Cannot read property 'error' of null #2044

Closed
FinlayDaG33k opened this issue Jan 17, 2017 · 9 comments
Closed

Cannot read property 'error' of null #2044

FinlayDaG33k opened this issue Jan 17, 2017 · 9 comments
Labels

Comments

@FinlayDaG33k
Copy link

Hii there,

I'm trying to setup Dynmap with an external web server.
However, all I get when doing the stuff below is a black screen with an error in the Javascript Console.
the error is:

Uncaught TypeError: Cannot read property 'error' of null
    at map.js?_=2.3-2074:29
    at success (jquery.json.js?_=2.3-2074:82)
    at Object.obj.success (jquery.json.js?_=2.3-2074:19)
    at fire (jquery-1.11.0.js?_=2.3-2074:3099)
    at Object.fireWith [as resolveWith] (jquery-1.11.0.js?_=2.3-2074:3211)
    at done (jquery-1.11.0.js?_=2.3-2074:9310)
    at XMLHttpRequest.callback (jquery-1.11.0.js?_=2.3-2074:9720)
    (anonymous) @ map.js?_=2.3-2074:29
    success @ jquery.json.js?_=2.3-2074:82
    obj.success @ jquery.json.js?_=2.3-2074:19
    fire @ jquery-1.11.0.js?_=2.3-2074:3099
    fireWith @ jquery-1.11.0.js?_=2.3-2074:3211
    done @ jquery-1.11.0.js?_=2.3-2074:9310
    callback @ jquery-1.11.0.js?_=2.3-2074:9720

This is what I've done:

  1. Create config.js on the Bukkit server in ~/server/plugins/dynmap/web/standalone
  2. Restart the server (not reloading as said in Cannot get config.js?_=2.1-SNAPSHOT-2032 #1816)
  3. copy the web directory over to the webserver
  4. Profit??

However, this didn't work as I get an error thrown at my face.
This is my config.js:

var config = {
 url : {
  configuration: 'standalone/MySQL_configuration.php',
  update: 'standalone/MySQL_update.php?world={world}&ts={timestamp}',
  sendmessage: 'standalone/MySQL_sendmessage.php',
  login: 'standalone/MySQL_login.php',
  register: 'standalone/MySQL_register.php',
  tiles: 'standalone/MySQL_tiles.php?tile=',
  markers: 'standalone/MySQL_markers.php?marker='
 }
};

I hope somebody can help me :)

Cheers

@wioxjk
Copy link

wioxjk commented Jan 17, 2017

And if you change the DocumentRoot to the standalone map directly into the dynmap catalogue?
Your config.js does not write into the files you copied...

@FinlayDaG33k
Copy link
Author

And if you change the DocumentRoot to the standalone map directly into the dynmap catalogue?
Then all I get is a tree view of the standalone-folder.

Your config.js does not write into the files you copied...
How do you mean?

@wioxjk
Copy link

wioxjk commented Jan 20, 2017

You have to create a symlink of your documentroot to the standalone catalogue in dynmap.

Follow this guide, and it will work (assuming you already configure the webserver correctly)
https://github.com/webbukkit/dynmap/wiki/Setting-up-without-the-Internal-Web-Server

@FinlayDaG33k
Copy link
Author

there's a slight problem I think: namely, my tiles are NOT in a folder, they are in a MySQL database :\

@wioxjk
Copy link

wioxjk commented Jan 20, 2017

well, then you have to re-render it.
Why do you want to use standalone and not the internal server?

@FinlayDaG33k
Copy link
Author

FinlayDaG33k commented Jan 20, 2017

Because my webhost and VPS can use the same MySQL Database, but my webhost can't access my VPS' files.

@wioxjk
Copy link

wioxjk commented Jan 20, 2017

Are you really trying to send mysql data over WAN?

@FinlayDaG33k
Copy link
Author

No?
the webserver and the VPS can see each other.
But the webserver can NOT access the files on the VPS.
But, the webserver CAN access a MySQL database that is hosted on my VPS.
Which is why I use MySQL for the communication.
It's not WAN, just LAN.

@samuelbertrand
Copy link

Had the same issue. You need to enable PHP on your website to be able to use MySQL.

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

No branches or pull requests

4 participants