Znote / ZnoteAAC

Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server.
MIT License
145 stars 127 forks source link

Errors #429

Closed luanluciano93 closed 4 years ago

luanluciano93 commented 4 years ago
  1. On the characterprofile page after enabling EnableQuests

Warning: Invalid argument supplied for foreach() in characterprofile.php on line 843

https://github.com/Znote/ZnoteAAC/blob/master/characterprofile.php#L843

  1. After trying to click on give points in the admin.php

Fatal error: Call to undefined function hash_equals() in admin.php on line 22

https://github.com/Znote/ZnoteAAC/blob/master/admin.php#L22

  1. In characterprofile in the "Other visible characters on this account:" part, if you have one more character and he is like hide, the bar appears without a character, this is an error.

https://github.com/Znote/ZnoteAAC/blob/master/characterprofile.php#L888-L933

luanluciano93 commented 4 years ago

Warning: Invalid argument supplied for foreach() in engine\function\users.php on line 113

Warning: array_values() expects parameter 1 to be array, boolean given in users.php on line 120

luanluciano93 commented 4 years ago

Warning: Invalid argument supplied for foreach() in topguilds.php on line 137

https://github.com/Znote/ZnoteAAC/blob/master/topguilds.php#L137

Znote commented 4 years ago

Should all be fixed now.

luanluciano93 commented 4 years ago
  1. characterprofile.php

    The character page did not work. I tested on an account with two characters (X and Y). When the X is visible and the Y is invisible, on the page the character who is invisible has the list visible and vice versa for the other. When both are invisible or visible it works correctly.

  2. engine/function/general.php

    Tested and everything is correct.

  3. engine/function/users.php

    When the support page was updated, the users.php file gave the error. The error stopped, but there is no support.

  4. topguilds.php

    I don't know if it's correct, I have a guild war ended with 15 deaths in total and even so the topguilds page is listed as: No frags yet.

Znote commented 4 years ago
  1. characterprofile.php

The character page did not work. I tested on an account with two characters (X and Y). When the X is visible and the Y is invisible, on the page the character who is invisible has the list visible and vice versa for the other. When both are invisible or visible it works correctly.

  1. engine/function/general.php

Tested and everything is correct.

  1. engine/function/users.php

When the support page was updated, the users.php file gave the error. The error stopped, but there is no support.

  1. topguilds.php

I don't know if it's correct, I have a guild war ended with 15 deaths in total and even so the topguilds page is listed as: No frags yet.

  1. Fixed in latest commit, forgot to omit results if searched char is hidden.
  2. Are there any staffs on the server yet? What group id/account type they got?
  3. Could be an issue with the SQL query perhaps. What happens when you execute this query in phpmyadmin?:
    SELECT 
    `g`.`id` AS `id`, 
    `g`.`name` AS `name`, 
    COUNT(`g`.`name`) as `frags` 
    FROM `players` p 
    LEFT JOIN `player_deaths` pd 
    ON `pd`.`killed_by` = `p`.`name` 
    LEFT JOIN `guild_membership` gm 
    ON `p`.`id` = `gm`.`player_id` 
    LEFT JOIN `guilds` g 
    ON `gm`.`guild_id` = `g`.`id` 
    WHERE `pd`.`unjustified` = 1 
    GROUP BY `name` 
    ORDER BY 
    `frags` DESC, 
    `name` ASC 
    LIMIT 0, 10;
luanluciano93 commented 4 years ago
  1. Fixed in latest commit, forgot to omit results if searched char is hidden.

now if only one player has hidden, all are hidden by the site.

  1. Are there any staffs on the server yet? What group id/account type they got?

    SELECT `group_id`
    FROM `players`
    WHERE `group_id` > 1;

    Showing rows 0 - 1 (2 total)

    • my server uses group_id 3 for god.
  2. Could be an issue with the SQL query perhaps. What happens when you execute this query in phpmyadmin?:

SELECT 
  `g`.`id` AS `id`, 
  `g`.`name` AS `name`, 
  COUNT(`g`.`name`) as `frags` 
FROM `players` p 
LEFT JOIN `player_deaths` pd 
  ON `pd`.`killed_by` = `p`.`name` 
LEFT JOIN `guild_membership` gm 
  ON `p`.`id` = `gm`.`player_id` 
LEFT JOIN `guilds` g 
  ON `gm`.`guild_id` = `g`.`id` 
WHERE `pd`.`unjustified` = 1 
GROUP BY `name` 
ORDER BY 
  `frags` DESC, 
  `name` ASC 
LIMIT 0, 10;

MySQL did not return any records