Swiftsmoke / openwowcms

Open Source Web frontend for the private WoW servers.
http://swiftsmoke.github.com/openwowcms
GNU General Public License v3.0
5 stars 0 forks source link

TrinityCore - users characters are not pulling up in the voteshop page #24

Closed bj21 closed 11 years ago

bj21 commented 11 years ago

The dropdown box does not pull the character list for the logged on user.

bj21 commented 11 years ago

I added some debug code to the PHP scripts to write out the contents of the variables to a log file as they are extracted and exploded. From what I can tell, the variables are assigned but the query ($q) never runs -- at least not successfully. The following was extracted from the mysql server log files when a user clicked on the vote shop link.

BEGIN REPLACE INTO openwowcms.wwc2_active_users VALUES ('bj21', '14352658681') BEGIN DELETE FROM openwowcms.wwc2_active_users WHERE timestamp < 1352658081 COMMIT DELETE FROM openwowcms.wwc2_active_guests WHERE timestamp < 1352658381 COMMIT REPLACE INTO openwowcms.wwc2_active_users VALUES ('bj21', '1352658681') BEGIN DELETE FROM openwowcms.wwc2_active_users WHERE timestamp < 1352658081ï

COMMIT BEGIN DELETE FROM openwowcms.wwc2_active_guests WHERE timestamp < 1352658381 COMMIT

There is no character database query run there. I'll post if I find anything.

bj21 commented 11 years ago

Found it! The backticks were missing from around the database name so the sql query was failing.

I would imagine this might affect all of the cores and not just trinity.php

bj21 commented 11 years ago

Here is a git diff of how I fixed this issue:

diff --git a/engine/core/trinity.php b/engine/core/trinity.php index 0e3853a..091e403 100644 --- a/engine/core/trinity.php +++ b/engine/core/trinity.php @@ -114,7 +114,7 @@ class User extends SessionUser implements BaseUser { /* loop realms then loop characters */ $db_realmconnector = connect_realm($key); if ($db_realmconnector) {