rathena / FluxCP

A web-based Control Panel for rAthena servers written in PHP. Manage player accounts, databases, support tickets, etc via your browser.
GNU Lesser General Public License v3.0
180 stars 211 forks source link

Error in recent commit. #374

Closed Pokye closed 11 months ago

Pokye commented 12 months ago

Environment

- PHP: 8.2.4
- MySQL: MariaDB 10.4.28

Current Behavior

After this commit https://github.com/rathena/FluxCP/commit/a2a068a28fa2e95caad853276650b62f36f66f6a, there is an error when entering the page to see the account. (?module=account&action=view) Error in modules/account/view.php

[2023-11-12 11:33:23] (PDOException) Exception PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM rathena.`char` AS ch LEFT OUTER JOIN rathena.guild ON guild.guild_id = c...' at line 1
[2023-11-12 11:33:23] (PDOException) **TRACE** #0 C:\xampp\htdocs\fluxcp\lib\Flux\Connection\Statement.php(50): PDOStatement->execute(Array)
[2023-11-12 11:33:23] (PDOException) **TRACE** #1 C:\xampp\htdocs\fluxcp\modules\account\view.php(158): Flux_Connection_Statement->execute(Array)
[2023-11-12 11:33:23] (PDOException) **TRACE** #2 C:\xampp\htdocs\fluxcp\lib\Flux\Template.php(375): include('C:\\xampp\\htdocs...')
[2023-11-12 11:33:23] (PDOException) **TRACE** #3 C:\xampp\htdocs\fluxcp\lib\Flux\Dispatcher.php(170): Flux_Template->render()
[2023-11-12 11:33:23] (PDOException) **TRACE** #4 C:\xampp\htdocs\fluxcp\index.php(153): Flux_Dispatcher->dispatch(Array)
[2023-11-12 11:33:23] (PDOException) **TRACE** #5 {main}

Expected Behavior

No response

Steps To Reproduce

Login > My Account

Anything else?

No response

Pokye commented 12 months ago

More error: (?module=guild&action=view&id=3) image

Not show emblem (?module=character&action=view&id=150020) image

sanasol commented 12 months ago

1,2 should be fixed,

Not show emblem (?module=character&action=view&id=150020)

not sure about this, code looks ok.

Same as on guild view page. While guild page shows emblem, character view doesnt as I can see from your screenshots.

Maybe some logs with errors? Or try copy emblem image link and open in new tab to see some errors.

Pokye commented 12 months ago

One thing I noticed is that when you click to see the player's profile for the first time, it takes a long time to load the page. image The emblem is still not showing on this page. (?module=character&action=view&id=150020) image

Pokye commented 12 months ago

It appeared after refreshing the page 2x times. image

sanasol commented 12 months ago

It appeared after refreshing the page 2x times.

Oh, looks like expected issue from comments of original PR.

Not sure how to fix it, need working db dump for testing probably :) I dont have one.

If you can dump char/guild(map/web) tables for me, I can try :)