WooMinecraft / woominecraft-wp

A FREE Minecraft Donation Plugin for WordPress designed to work in conjunction with WooMinecraft for Bukkit/Spigot & WooCommerce to allow the purchasing of virtual items in MineCraft and have them delivered to the servers.
https://wordpress.org/plugins/woominecraft/
GNU General Public License v2.0
31 stars 14 forks source link

Multi-server Support #17

Closed JayWood closed 7 years ago

theodore-zd commented 8 years ago

hey, so are you adding Multi-Server Support?

JayWood commented 8 years ago

@TheSodaPopPanda yes, I am, it's actually in the works, I have some issues IRL to handle first. I will update this thread when I start working on it.

theodore-zd commented 8 years ago

OK awesome, I don't mean to push you or anything but when do you think you will have a working version?

JayWood commented 8 years ago

I'm pretty sure there's a working version on this branch https://github.com/WooMinecraft/woominecraft-wp/tree/dev you can download and beta test there.

I know of one bug currently that you cannot re-send donations, and if you do it resets all servers. So be aware of that. Other than that I think it was working last time I tested it a month or so ago.

Just know that if you install this and already have commands stored, you can't go back, so take a database backup.

For now, I have some RL issues that I have to deal with so I'll get back on this when possible. I know you weren't pushing, so no worries.

theodore-zd commented 8 years ago

Ok, thanks you very much, GL with life :P

theodore-zd commented 8 years ago

hey, just thought I would let you know I got this when I tried to activate.

"Fatal error: Cannot redeclare wmc_autoload_classes() (previously declared in /home/sodapop2/public_html/wp-content/plugins/woominecraft/woominecraft.php:18) in /home/sodapop2/public_html/wp-content/plugins/woominecraft-wp-dev/woominecraft.php on line 32"

could be from because of the WordPress update/new version.

JayWood commented 8 years ago

@TheSodaPopPanda that's becuase you have two versions of the same plugin active. Notice the folder names woominecraft/ vs woominecraft-wp-dev/ the -dev/ folder is what you downloaded from github.

theodore-zd commented 8 years ago

Ah, I could. Swear I deleted it! Sorry for wasting you time. And thank you.

theodore-zd commented 8 years ago

also, sorry I can't seem to add a server. is it not under settings anymore? I have it activated & it seems to be working, I see it in the product "options" but I do not see anything under settigns...

settings

JayWood commented 8 years ago

Oh, yea forgot about that detail. It's now under WooCommerce -> Settings at the end of the page.

theodore-zd commented 8 years ago

AH, found it Thanks!!! I will close this now. :)

theodore-zd commented 8 years ago

ok, so I am having a problem. I have reinstalled woocommerce and woominecraft, but It still won't work. when go to add a server I click the button and nothing happens? am I just missing something or...

theodore-zd commented 8 years ago

also sorry to bug you.

JayWood commented 8 years ago

@TheSodaPopPanda it's totally fine. At this point without diving back into the code I can't say for sure what the issue is. I intend by end of this week to get back into the grove of things, but for now I have to handle some family things tomorrow.

I'll let you know more in a few days.

theodore-zd commented 8 years ago

OK, thank you very much! If I may keep the thread open and you can simple reply when you have the time? also, I wish you the best of luck with you "family things"

JayWood commented 8 years ago

@TheSodaPopPanda I can't replicate the issue!

As of my last push I've not had issues adding another server - http://g.recordit.co/dcCtsklqRu.gif

It's possible there's a javascript error on the page from another plugin maybe? Do you have any issues in the debug console, like JavaScript fatal errors?

theodore-zd commented 8 years ago

HI, yes I have checked the console for java error's and none show up now I did uninstall and reinstall both woo commerce and woo Minecraft, still nothing I have also deactivated all other plugins, that did not work either.

theodore-zd commented 8 years ago

hey, ok, so I reset my nite and just copied the plugins and a couple of things and now it is working I can add servers. But I it has t 2 there that have this in them I deleted them last time and I think that's what broke it... (here it is)


Warning: Illegal string offset 'key' in /home/sodapop2/public_html/wp-content/plugins/woominecraft-wp-dev/includes/views/server-section.php on line 20
M

what is this if I may ask and is it a bug? do I just leave it?

JayWood commented 8 years ago

@TheSodaPopPanda you can add/remove servers yea? I have checks for this, though I'm not perfect. Can you tell me exactly what happened to get this error? Did you delete one server, or just it's field data?

theodore-zd commented 8 years ago

NO this was there when I install 'WooMinecraft-wp-dev' and I removed the message/error the last time (I reset my WordPress installation to try and fix the problem ) and removing it is what made the plugin stop working capture

JayWood commented 8 years ago

That's weird. I'll work on this over the weekend to see if I can replicate. In the mean time, would you care to delete those two and save? It should show up with just one labeled Main but no key.

theodore-zd commented 8 years ago

last time I deleted them the plugin broke and I had to reset my WordPress installation to fix it are you sure?

JayWood commented 8 years ago

What?? Wow, okay, I'll get to testing later today and let you know. You should never have to reset your WordPress install, only delete the plugin.

theodore-zd commented 8 years ago

Yeah, that's when I could not add servers, I tried to delete the Pugin and reupload it and it did not work so I tried that with woocommerce as well and that did not work so I deleted my install and, tried again and, then I had the messages again and,have not touched it since. now it is the same as when it was first installed I have the messages. (note: last time I deleted them and that stopped me from adding servers, I could click the button but nothing would happen and there were no java errors in console)

JayWood commented 8 years ago

@TheSodaPopPanda that should fix it ^ https://github.com/WooMinecraft/woominecraft-wp/archive/dev.zip

theodore-zd commented 8 years ago

OK!, I will check now just let me backup 😐

theodore-zd commented 8 years ago

ok, hey sorry I took so long IRL stuff, anyways yes that fixed it. the error. Thanks :)

LPGamersRob commented 8 years ago

Hi there i know this has been set as fixed and would like to use this feature on my server / website also.

i have follwed everything on here and where you mention "It's now under WooCommerce -> Settings at the end of the page." This does not show for me at all, an i correct in thinking that i use just the "woominecraft-wp-dev" on it's own or will / do i need to use the original woominecraft plugin also ?

For people trying to do this is there any chance (if not already made) a small tutorial on how to do the setup and how it should look.

if any of you could help that would be amazing @TheSodaPopPanda @JayWood

JayWood commented 8 years ago

@LPGamersRob The settings page should be on the admin menu ( left sidebar ), just hover over WooCommerce, then click settings.

If you want this beta release you can get it here - https://github.com/WooMinecraft/woominecraft-wp/releases/tag/1.1-pr1

What Woocommerce version are you on?

LPGamersRob commented 8 years ago

Oh right now i have found it. im such a gorpe.

and im using the latest version of woo commerce. Version 2.6.6 it says im using,

but once i had found this i was playing around with having my server set up and keep getting thrown this message

[13:40:20 WARN]: [WooMinecraft] www.rpcreative.xyz: unknown error
[13:40:20 WARN]: java.net.UnknownHostException: www.rpcreative.xyz: unknown error
[13:40:20 WARN]:        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
[13:40:20 WARN]:        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
[13:40:20 WARN]:        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
[13:40:20 WARN]:        at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
[13:40:20 WARN]:        at java.net.InetAddress.getAllByName(InetAddress.java:1192)
[13:40:20 WARN]:        at java.net.InetAddress.getAllByName(InetAddress.java:1126)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
[13:40:20 WARN]:        at com.plugish.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
[13:40:20 WARN]:        at com.plugish.woominecraft.Util.RcHttp.request(RcHttp.java:46)
[13:40:20 WARN]:        at com.plugish.woominecraft.WooMinecraft.check(WooMinecraft.java:128)
[13:40:20 WARN]:        at com.plugish.woominecraft.Util.BukkitRunner.run(BukkitRunner.java:18)
[13:40:20 WARN]:        at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71)
[13:40:20 WARN]:        at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[13:40:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[13:40:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[13:40:20 WARN]:        at java.lang.Thread.run(Thread.java:745)

This is thrown at me on every server i have places the jar file in and set up, knowing me it will be something simple but i cant seem to figure it out.

theodore-zd commented 8 years ago

Hey I'm not the dev but what dose you woo minerrant configuration file set up like?

JayWood commented 8 years ago

@LPGamersRob This issue says it all:

[13:40:20 WARN]: java.net.UnknownHostException: www.rpcreative.xyz: unknown error

Look at the wiki here - https://github.com/WooMinecraft/WooMinecraft/wiki/Step-1:-Server-Plugin-Installation#plugin-config

Notice how the URL config has http:// at the beginning. The java plugin isn't a browser, so it doesn't know what protocol to use. There's http, https, sftp, ftp and others.

Basically you MUST have a protocol in the URL field.

LPGamersRob commented 8 years ago

that is the problem. This is what my config looks like. https://gyazo.com/83018febcec8503464df4cd6520c8eda

there has always been a http:// in it. and i have tried both ways with and without the www. aswell.

it did work before hand but when going over to the multi server way it just tells me there is an error.

JayWood commented 8 years ago

@LPGamersRob I think I know what it is 😢 - the HTTP library I'm using requires that we hard-code in TLD's, it's possible .xyz isn't in there, I believe that's a new TLD ( within the past year or so ).

Without your domain extension white-listed, I'm pretty sure that's where the issue is stemming from.

LPGamersRob commented 8 years ago

oh that makes sense, and yeah it is fairly new.

is there any chance that this will be updated soon ?

Thanks Robert

(i do understand you have alot going on so no rush or is there a way i can do this ?)

JayWood commented 8 years ago

@LPGamersRob the weekend is here, should be able to swing it in.

LPGamersRob commented 8 years ago

@JayWood Thank you very much :)

ill let you know how it goes on my end if and when you do it :)

LPGamersRob commented 8 years ago

@JayWood i have just thought, has the http library you use changed to what you have on the single server version of the plugin if so that may be it but if not i dont know why it would be that as it was making out the orders before hand, this only stopped working when i transferred to the multi server setup.

JayWood commented 8 years ago

@LPGamersRob okay, I officially suck at time management. I do have this planned for Friday though, sorry for my delay 😞

To your point, yes I am using a different library now, the previous one was hand-coded by me. Instead now I'm using Apache HTTP Client for ease of posting data to the server. From a dev perspective, there's less code needed.

With that being said, this is definitely an issue with my implementation of the library, and at this point I'm not confident that simply adding your .xyz domain to the TLD list will solve this. So I will be looking deeper into this as well.

LPGamersRob commented 8 years ago

@JayWood Don't worry about you time management you have a lot going on and you are obviously doing this plugin and such for free so i'm not in no rush for a fix.

i'm glad that you will be making a change / fix for this soon and appreciate the fact that you will be spending the time on this to help me out. and that all makes a lot more sense that the library is different.

Thanks again Robert.

JayWood commented 8 years ago

@LPGamersRob

https://github.com/WooMinecraft/WooMinecraft/releases/tag/1.0.10-PR1

Give that a go and let me know. Also I did more digging into this issue and it would appear that if there's some weird characters in the URL that it may fail to find the server. So if for some reason this doesn't work change your key to an alphanumeric key ( numbers and letters only ) see if that helps.

If this does not help, please post a log ( obviously ) and if it does help, please let me know!

JayWood commented 8 years ago

Based on comments in #23 the issue here seemed to be server side.