svn[1314] Character/No Guild not being deleted

Posts from previous Beta sessions

svn[1314] Character/No Guild not being deleted

Postby boyo » Sat Sep 08, 2007 2:13 pm

Problem:
I added a character to the upload rules that is not in my guild, this is my personal bank char. I then decided I didnt want the char's information on there, so I removed the permission for it to upload. Character profile stayed and a dropdown for "Guildless-H" and "My Guild Name" still present.

To reproduce:
* RosterCP->Upload Rules->Character->Allow - Fill in my bank char's information.
* Upload data thru UniUploader.
* Dropdown appears for Guildless-H and My Guild.
* RosterCP->Upload Rules->Character->Allow - Delete my bank char.
* Upload data thru UniUploader.
**Character is still present on Guildless-H page.
**Guildless-H page still exists even though there are no members with upload permissions.
**Guildless-H still exists and shows after manually deleting character from _members

Manual solution:
*Delete Guildless-H out of _guild
**Reset auto_increment to 2 (or whatever appropriate)
*Delete "Bank Char" out of _members
***Not sure of possible side effects.

Possible solution:
*For each guild in _guild verify there is at least one member in that guild by searching _members
**Downside - An extra query for each guild.
*On deletion of permission in Upload Rules, search _members and delete said member, as well as any other references that may be in other places in the db that I am unaware of.
*Have not tested, but am assuming that on deletion of a guilds permissions, the same thing may happen.

Thanks for the great product, and hard work.

Sql when adding.
Code: Select all
SQL Queries
Line Time Query
lib/roster.php
  125 0.0004 SELECT `config_name`, `config_value` FROM `roster20_config` ORDER BY `id` ASC;
  387 0.0002 SELECT * FROM `roster20_addon`;
lib/login.php
  70 0.0002 SELECT * FROM `roster20_account` ORDER BY `account_id` DESC;
admin/upload_rules.php
  53 0.0005 INSERT INTO `roster20_upload`
(`name`,`server`,`region`,`type`,`default`) VALUES
('Wolfminer','Blackwater Raiders','US','2','0');
  105 0.0003 SELECT * FROM `roster20_upload` WHERE `type` = '2' OR `type` = '3';
lib/functions.lib.php
  1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '1' ORDER BY `id` ASC;
  1043 0.0003 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '2' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '3' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '4' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '5' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '6' ORDER BY `id` ASC;
lib/menu.php
  374 0.0002 SELECT count(`member_id`) AS `amount`, IF(`officer_note` LIKE '%ALT-%',1,0) AS 'isalt', FLOOR(`level`/10) AS label FROM `roster20_members` WHERE `level` >= 10 GROUP BY isalt, label;
  567 0.0002 SELECT `mb`.*, `a`.`basename` FROM `roster20_menu_button` AS mb LEFT JOIN `roster20_addon` AS a ON `mb`.`addon_id` = `a`.`addon_id` WHERE `a`.`addon_id` IS NULL OR `a`.`active` = 1;
  584 0.0001 SELECT * FROM `roster20_menu` WHERE `section` IN ('util','realm','guild') ORDER BY `config_id`;
addons/memberslist/inc/search.inc.php
  36 0.0002 SELECT `member_id`, `name` FROM `roster20_members` ORDER BY `name`;


Sql when deleting.
Code: Select all
SQL Queries
Line Time Query
lib/roster.php
  125 0.0004 SELECT `config_name`, `config_value` FROM `roster20_config` ORDER BY `id` ASC;
  387 0.0002 SELECT * FROM `roster20_addon`;
lib/login.php
  70 0.0002 SELECT * FROM `roster20_account` ORDER BY `account_id` DESC;
admin/upload_rules.php
  69 0.0006 DELETE FROM `roster20_upload` WHERE `rule_id` = '4' LIMIT 1;
  105 0.0003 SELECT * FROM `roster20_upload` WHERE `type` = '2' OR `type` = '3';
lib/functions.lib.php
  1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '1' ORDER BY `id` ASC;
  1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '2' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '3' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '4' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '5' ORDER BY `id` ASC;
  1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '6' ORDER BY `id` ASC;
lib/menu.php
  374 0.0002 SELECT count(`member_id`) AS `amount`, IF(`officer_note` LIKE '%ALT-%',1,0) AS 'isalt', FLOOR(`level`/10) AS label FROM `roster20_members` WHERE `level` >= 10 GROUP BY isalt, label;
  567 0.0002 SELECT `mb`.*, `a`.`basename` FROM `roster20_menu_button` AS mb LEFT JOIN `roster20_addon` AS a ON `mb`.`addon_id` = `a`.`addon_id` WHERE `a`.`addon_id` IS NULL OR `a`.`active` = 1;
  584 0.0001 SELECT * FROM `roster20_menu` WHERE `section` IN ('util','realm','guild') ORDER BY `config_id`;
addons/memberslist/inc/search.inc.php
  36 0.0002 SELECT `member_id`, `name` FROM `roster20_members` ORDER BY `name`;
 


Edit: Added sql queries.
Last edited by boyo on Sat Sep 08, 2007 2:18 pm, edited 1 time in total.
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

svn[1314] Character/No Guild not being deleted

Postby boyo » Sat Sep 08, 2007 2:28 pm

It also appears that even with the upload permission removed from _upload, if the character is still in _members it will still allow it to upload.

[quote=UniUploader Server Response]
...
Updating Character Data for [Wolfminer@US-Blackwater Raiders]
About to update player
Updating Equipment ....
Updating Inventory : Bag4 : Bag0 : Bag1 : Bag2 : Bag3
Updating Bank : Bag2 : Bag0 : Bag1
No New Mail
Updating Skills ...........
No Recipe Data
Updating Spellbook : General : Arms
No Talents Data
Updating Reputation .....
No Quest Data
No Buffs
Updating Character Data for [Telenvale@US-Blackwater Raiders]
About to update player
Updating Equipment ..................
Updating Inventory : Bag5 : Bag4 : Bag0 : Bag1 : Bag2 : Bag3
Updating Bank : Bag5 : Bag4 : Bag0 : Bag1 : Bag2 : Bag3 : Bag6
Updating Mailbox: 4
Updating Skills .................
Updating Professions : Cooking : Mining : First Aid : Jewelcrafting
Updating Spellbook : Demonology : General : Destruction : Affliction
Updating Talents : Demonology : Affliction : Destruction
Updating Reputation .............................
Updating Quests: 18
Updating Buffs: 2
Updating pet [Shaadhun]
Updating Spellbook....
Character Jarvin @ US-Blackwater Raiders not accepted
...
[/quote]

After manually deleting from database, uniupload responds with
[quote=UniUploader Server Response]
...
Character Wolfminer @ US-Blackwater Raiders not accepted
...
[/quote]
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

svn[1314] Character/No Guild not being deleted

Postby zanix » Sat Sep 08, 2007 3:10 pm

Deletion of members is not coded into Roster as of yet
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

svn[1314] Character/No Guild not being deleted

Postby boyo » Mon Sep 24, 2007 7:35 am

Any work on this yet?
Would it be possible to delete/change the guildid to 0 for a character when they are deleted out of hte upload permissions and also check if there are no more in guildless or the guild they were in and remove that from the _guild table.
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

svn[1314] Character/No Guild not being deleted

Postby zanix » Mon Sep 24, 2007 7:58 am

We are still working on the details of this, currently the remover is coded incorrectly by setting the guild_id to 0 for removed members
It should be setting them to the correct guild_id for a guildless guild
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Archived

Who is online

Users browsing this forum: No registered users and 0 guests

cron