ArmorySync with latest SVN

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

ArmorySync with latest SVN

Postby trelis » Mon Nov 29, 2010 7:51 pm

I tried armorysync with the latest SVN and so far haven't been able to get it to work.

It goes badly here:
Code: Select all
378    0.5828    ArmorySync    _contentcheck    Checked if is_object    Fail


When I try to do "ArmorySync Memberlist for a new guild" I get the following PHP error:

Code: Select all
PHP Errors
addons/armorysync/inc/armorysync.class.php
  Notice line 378: Undefined property: SimpleClass::$characterInfo


I enabled the debug aprint above that line of code:

Code: Select all
            $content = $this->_parseData($armory->fetchCharacter( $this->memberName, '', $roster->config['locale'], $this->server ));
             aprint($content);
            if ( $this->_contentcheck($content->characterInfo, array('character', 'characterTab' ) ) )


And I get the following, which definitely doesn't have a characterinfo property.

Code: Select all
SimpleClass object(
   'properties' =>  Array(
      0 => 'globalSearch',
      1 => 'lang',
      2 => '_TAGNAME',
      3 => '_CDATA',
      4 => 'errorhtml'
      ),
   'globalSearch' => 1,
   'lang' => 'en_us',
   '_TAGNAME' => 'page',
   '_CDATA' => '',
   'errorhtml' =>  SimpleClass object(
      'properties' =>  Array(
         0 => '_TAGNAME',
         1 => '_CDATA'
         ),
      '_TAGNAME' => 'errorhtml',
      '_CDATA' => ''
      )
   );


I will work on debugging more tomorrow, but I figure it doesn't hurt to post in case someone has already come across it.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby Ulminia » Mon Nov 29, 2010 8:35 pm

'
'_TAGNAME' => 'errorhtml',


the armory was down when you tryed ... ial be committing a bunch of changes to our new svn
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 1:55 am

Ulminia wrote:'
'_TAGNAME' => 'errorhtml',


the armory was down when you tryed ... ial be committing a bunch of changes to our new svn


Just for your reference some problems I saw with your latest commit:

The installer has buttons 4 and 5 commented out.
The icon for the new button 6 wasn't uploaded to the svn.

Fatal error: Call to undefined method RosterArmory::pull_xmln() in roster/addons/armorysync/inc/armorysync.class.php on line 438
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 2:06 am

Ulminia wrote:the armory was down when you tryed


That is not what is causing the issue. Still trying to figure it out.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 2:44 am

In roster/lib/armory.class.php I added "print $url;" to fetchArmory and found the following bad url seems to be causing the error:

Code: Select all
http://www.wowarmory.com/character-sheet.xml?n=&r=Proudmoore


Now to figure out why a bad URL is being generated.

BTW, one of the things that slowed down my debugging is that I was trying to add debugging code to roster/addons/armorysync/armory.class.php when that file appears to not be used and the one in roster/lib is used instead. I am not sure why roster/addons/armorysync/armory.class.php is present.

Edit: $this->memberName is not set in _getCharacterInfo().

Edit2:
Code: Select all
In synchMemberByID
Server: Proudmoore, memberID: 0, memberName: , region: US, guildID: 1
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby Ulminia » Tue Nov 30, 2010 4:05 am

The installer has buttons 4 and 5 commented out.
The icon for the new button 6 wasn't uploaded to the svn.


i know this is on purpose and button 6 ... woops i did for get it ... its there now

roster/addons/armorysync/armory.class.php when that file appears to not be used and the one in roster/lib is used instead. I am not sure why roster/addons/armorysync/armory.class.php is present.


this has been my standard practice because it needs to be copyed over the existing on in roster lib for the addon to work ... untill roster 2.1 is released since i have been coding armory sync for use with the new version of the roster

svn 514 is up you have to copy the armory.class.php to the roster/lib folder with this commit
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 5:30 am

Ulminia wrote:this has been my standard practice because it needs to be copyed over the existing on in roster lib for the addon to work ... untill roster 2.1 is released since i have been coding armory sync for use with the new version of the roster


Thanks, that was one of my problems. I had followed the install instructions and the one in my lib directory was from the .rar file rather than the standalone file.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby Ulminia » Tue Nov 30, 2010 5:35 am

yes i have removed the rar file and just the file is in the main dir of as this should solve alot of issues but armory is allways changing and when cata is released i can see more issues comming ....
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 5:45 am

So I tried a fresh install of the latest svn.

Ulminia wrote:i know this is on purpose and button 6 ... woops i did for get it ... its there now


So how do you do the initial upload for the guild without the guild_add button?

I tried using the new guild_update button for a guild without any information and I get the error:

Code: Select all
ArmorySync for Guilds
  Nothing to do at the moment


Code: Select all
148    0.0009    ArmorySyncJob    _isRequiredArmorySyncVersion    Check required ArmorySync version    OK
1321    0.0013    ArmorySyncJob    _getMembersToUpdate    Fetched members to update from DB    EMPTY
478    0.0013    ArmorySyncJob    _getGuildMembersToUpdate    Fetched guild members to update from DB    EMPTY
221    0.0014    ArmorySyncJob    _prepareUpdate    Prepared character update job    Failed
228    0.0014    ArmorySyncJob    _nothingToDo    Printed error message    OK


Edit: Is the guild_update supposed to update the guild membership for an initial install where "Members: 0"?

Edit2: I'm going to try adding back the buttons in the install and seeing if the currently checked in _startAddGuild code works.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 6:51 am

This error doesn't seem to do much (fixes the tooltip over the Faction field), but it's an easy one to fix:

Code: Select all
addons/armorysync/inc/armorysyncjob.class.php
  Notice line 966: Undefined index: factionname
  Notice line 966: Undefined index: factionname


Add to addons/armorysync/locale/enUS.php

Code: Select all
$lang['factionname']  = 'Faction name';
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 6:58 am

The add button didn't work after uncommenting it in the install, but I don't know if it's supposed to be functional so I am not sure if you care about the errors for it.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby Ulminia » Tue Nov 30, 2010 7:20 am

as it stands there has to be a inital upload of guild cp file this is an issue i cannot overcome as of yet .. im working on it...
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 7:24 am

Ulminia wrote:as it stands there has to be a inital upload of guild cp file this is an issue i cannot overcome as of yet .. im working on it...


And there isn't any working CP with WoW 4.0, correct? I tried both the version on this forums (CharacterProfiler.rar) and the one on curse (3.0.3) and neither works. It sounds like WoWRoster-Profiler is under development.
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Tue Nov 30, 2010 11:06 am

Another possible bugfix:

Code: Select all
Fatal error: Cannot redeclare class RosterArmory in roster/lib/armory.class.php on line 55


In armorysyncjob.class.php

In _updateGuild change:

Code: Select all
include (ROSTER_LIB .'armory.class.php');


to:

Code: Select all
include_once (ROSTER_LIB .'armory.class.php');


In _startAddGuild "$id" is used but not defined, I believe it can be defined as:
Code: Select all
$id = $this->id;
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm

Re: ArmorySync with latest SVN

Postby trelis » Wed Dec 01, 2010 4:14 pm

Below is my current diff set against SVN 516. With these changes it seems to be working for me. Although one thing I don't like and I may try to change is that instead of the update memberlist deleting everyone in the guild and re-adding the names (but losing all the additional meta data), it should compare the two member lists and only delete ones that are no longer in the guild and add ones that weren't there before. Ideally the character sync should fetch the current data and not delete any fields, but replace any that it has new data for.

BUGFIXES:
  • No longer uses website_address wowroster setting for the wowroster URL. It now uses ROSTER_URL which wowroster sets. You can now correctly set your website_address to your main guild page.
  • Now correctly handles characters with special characters in their name (at least on US servers, if the old code is correct for EU it should have a case statement?)
  • Fixes a few PHP errors, two of which are hard failures and the page won't load under certain error conditions (with these fixes you get the proper error messages instead of PHP errors).

Code: Select all
~/wowroster/wowroster-addons-read-only
$ svn diff
Index: armorysync/locale/enUS.php
===================================================================
--- armorysync/locale/enUS.php  (revision 516)
+++ armorysync/locale/enUS.php  (working copy)
@@ -15,6 +15,7 @@
 */

 // -[ enUS Localization ]-
+$lang['factionname'] = 'Faction name';

 // Button names
 $lang['async_button1']                 = 'ArmorySync Character|Synchronize your character with Blizzard\'s Armory';
Index: armorysync/armory.class.php
===================================================================
--- armorysync/armory.class.php (revision 516)
+++ armorysync/armory.class.php (working copy)
@@ -149,8 +149,8 @@
        {
                global $roster;

-               $this->base_url                   = $roster->config['website_address'].'/'; // gotta have a trailing slash here..... allways....
-               $this->url_prefix_armory          = isset($roster->data['armoryurl']) ? $roster->data['armoryurl'] : $this->url_prefix_armory;
+               $this->base_url                   = ROSTER_URL; // gotta have a trailing slash here..... always....
+               $this->url_prefix_armory          = isset($roster->data['armoryurl']) ? $roster->data['armoryurl'].'/' : $this->url_prefix_armory;
                $this->url_prefix_char            = $this->url_prefix_armory . $this->url_prefix_char;
                $this->url_prefix_itemtooltip     = $this->url_prefix_armory . $this->url_prefix_itemtooltip;
                $this->url_prefix_talents         = $this->url_prefix_armory . $this->url_prefix_talents;
@@ -181,29 +181,29 @@
     // change the first part of the $url to the armory link that you need
     if( $query === 'roster' ){
         $filename_type = 'guild-info';
-        $url = $this->url_prefix_armory.'/'.$filename_type.'.xml?r=' . urlencode( utf8_encode( $server ) ) . '&gn=' . urlencode( utf8_encode(  $guild ) );
+        $url = $this->url_prefix_armory.$filename_type.'.xml?r=' . urlencode( $server ) . '&gn=' . urlencode( $guild );
     } elseif( $query === 'character' ){
         $filename_type = 'character-sheet';
-        $url = $this->url_prefix_armory.$filename_type.'.xml?r=' . urlencode( utf8_encode( $server ) ) . '&cn=' . urlencode( utf8_encode($guildie));
+        $url = $this->url_prefix_armory.$filename_type.'.xml?r=' . urlencode( $server ) . '&cn=' . urlencode( $guildie );
     } elseif( $query === 'achievement' ){
         $filename_type = 'character-achievements';
-        $url = $this->url_prefix_armory.$filename_type.'.xml?r=' . urlencode( utf8_encode( $server ) ) . '&cn=' . urlencode( utf8_encode($guildie));
+        $url = $this->url_prefix_armory.$filename_type.'.xml?r=' . urlencode( $server ) . '&cn=' . urlencode( $guildie );
     }
     //$url_prefix_itemtooltip
     elseif( $query === 'itemtooltip' ){
         $filename_type = 'character-item';
         //$url = $base_url.'item-tooltip.xml?i='.$item->id.'&n=' . urlencode($this->memberName) . '&r=' . urlencode($this->server);
-        $url = $this->url_prefix_itemtooltip.''. $guild . '&cn=' . urlencode( utf8_encode($guildie)) . '&r=' . urlencode( utf8_encode( $server ) );
+        $url = $this->url_prefix_itemtooltip.''. $guild . '&cn=' . urlencode( $guildie ) . '&r=' . urlencode( $server );
         //echo $url.'<br>';
     }

     elseif( $query === 'talents' ){
         $filename_type = 'character-talents';
-        $url = $this->url_prefix_talents.''. $guild . '&cn=' . urlencode( utf8_encode($guildie)) . '&r=' . urlencode( utf8_encode( $server ) );
+        $url = $this->url_prefix_talents.''. $guild . '&cn=' . urlencode( $guildie ) . '&r=' . urlencode( $server );
     }
     elseif( $query === 'rep' ){
         $filename_type = 'character-rep';
-        $url = $this->url_prefix_rep.''. $guild . '&cn=' . urlencode( utf8_encode($guildie)) . '&r=' . urlencode( utf8_encode( $server ) );
+        $url = $this->url_prefix_rep.''. $guild . '&cn=' . urlencode( $guildie ) . '&r=' . urlencode( $server );
     }


Index: armorysync/inc/armorysyncjob.class.php
===================================================================
--- armorysync/inc/armorysyncjob.class.php      (revision 516)
+++ armorysync/inc/armorysyncjob.class.php      (working copy)
@@ -1821,7 +1821,7 @@
         if ( ! $ret ) {
         // we are gona get a lil more guild info now a days......

-        include (ROSTER_LIB .'armory.class.php');
+        include_once (ROSTER_LIB .'armory.class.php');
        $armory = new Rosterarmory;
        $data = $armory->pull_xmln('', $name, $server, 'roster');

Index: armorysync/inc/armorysync.class.php
===================================================================
--- armorysync/inc/armorysync.class.php (revision 516)
+++ armorysync/inc/armorysync.class.php (working copy)
@@ -120,7 +120,7 @@
                 }
                 else
                 {
-                $var = 'US';
+                $val = 'US';
                 }
                 return $val;
         }
trelis
WR.net Apprentice
WR.net Apprentice
 
Posts: 19
Joined: Fri Nov 26, 2010 1:14 pm


Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 1 guest

cron