vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - gWoWEvents - World of Warcraft Event Signup (https://vborg.vbsupport.ru/showthread.php?t=170592)

Ninok 03-11-2008 05:24 PM

Quote:

Originally Posted by LostPhoenix (Post 1461820)
If they have incorrect info put into the user friend it will give an error, but should just skip them and move on to the next one... I was able to update 200 users with my fix yesterday and the cron has been working fine since.

Are you getting the same error with my hack? Server has gone away?

Yea, its the same error, lost connection to mysql server. I find this odd as each user is making 1 call. Is there a way you can set it to update just 1 user? Or break it down to that level for testing?

Mother_Dee 03-12-2008 07:50 PM

PHP Fatal error:

Cannot use string offset as an array in /XXX/XXX/XXX/forum/includes/cron/cron.gwowevents.charinfo.php on line 50

Mother_Dee 03-14-2008 06:41 PM

I've been hung up suddenly with a fatal error and no cron running since the 12th. Before that, character imports were doing fine. See above. Any thoughts?

Collyn 03-14-2008 08:39 PM

I'm getting the same error. *shrugs* I'm not sure what's generating the error since nothing in cron.gwowevents.charinfo.php has changed.

Eviserator 03-16-2008 04:19 PM

I am getting the following error:

Code:

gWoWEvents Armory Import
Fatal error: Cannot use string offset as an array in /data/6/0/97/80/423406/user/431220/htdocs/pandemicfear/forums/includes/cron/cron.gwowevents.charinfo.php on line 64

This seems to have started after PHP was upgraded to version 5.2.5.

Eviserator 03-17-2008 06:12 PM

Quote:

Originally Posted by Gryphon (Post 1457740)
Please put code tags around such large data pastes in the future. I am not positive, but it appears that the Armory is telling you that there is no such character as Spinochio, Scoopjackson, or Ely. Ensure that the users profile fields are entered properly. I will see if I can recreate this error.

Sorry about the code tag, I am new and did not know about them but I corrected my previous message. Anyway, I figure that the issue for this problem listed in my previous email was that the REALM name in the user added field CAN NOT have a plus (+) sign in it:

US|Shattered+Hand|Alliance|Eviserator <======= Faulty Entry

US|Shattered Hand|Alliance|Eviserator <======= Good Entry

Eviserator 03-20-2008 12:12 AM

If you are receiving the following error:

PHP Fatal error:

Cannot use string offset as an array in /XXX/XXX/XXX/forum/includes/cron/cron.gwowevents.charinfo.php on line 50

I have rewritten the CRON process and it is working fine for me now.

Try replacing ALL of the code in your cron.gwowevents.charinfo.php file with the following:

Code:

<?php
        // ########################################################################
        //
        // gWoWEvents, Copyright ? 2006, Ryan Snook (www.gryphonllc.com )
        //
        // If you have fixes, improvements or other additions to make to
        // gWoWEvents, please contact me at rsnook@gmail.com for collaboration.
        // I appreciate your kind consideration.
        //
        // This work is licensed under the Creative Commons
        // Attribution-Noncommercial-No Derivative Works 3.0 United States License.
        // To view a copy of this license, visit
        // http://creativecommons.org/licenses/by-nc-nd/3.0/us/ or send a letter to
        // Creative Commons, 171 Second Street, Suite 300,
        // San Francisco, California, 94105, USA.
        //
        // ########################### SVN info ###################################
        // $Id: cron.gwowevents.charinfo.php 830 2008-01-23 20:18:51Z gryphon $
        // $Rev: 830 $
        // $LastChangedBy: gryphon $
        // $Date: 2008-01-23 12:18:51 -0800 (Wed, 23 Jan 2008) $

        // ######################## SET PHP ENVIRONMENT ###########################
        error_reporting(E_ALL & ~E_NOTICE);
        if (!is_object($vbulletin->db))
        {
                exit;
        }
        // ########################## REQUIRE BACK-END ############################
        require_once('./includes/functions_gwowevents.php');
                // Following line provided by LostPhoenix 
        $res = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "gwowevents WHERE `armorydata` != '1' GROUP BY `realmchar` ORDER BY `armorydata` ASC");

        while ($char = $vbulletin->db->fetch_array($res))
        {
                require_once('./includes/class_gwowarmory.php');
                $x = new gWoWArmory;
                $x->SetLocale($char['locale']);
                $x->SetRealmName($char['realm']);
                $x->SetCharName($char['character']);

                sleep(5);
                $character['sheet'] = $x->FetchCharacterSheet();
                sleep(5);
                $character['skills'] = $x->FetchCharacterSkills();

                if ($character['characterInfo']['errCode'] != 'noCharacter')
                {
                  $charinfo_query = "
                  `charurl` = '" . $character['sheet']['characterInfo']['character']['charUrl'] . "',
                  `level` = '" . $character['sheet']['characterInfo']['character']['level'] . "',
                      `title` = '" . $character['sheet']['characterInfo']['character']['prefix'] . "',
                  `faction` = '" . $character['sheet']['characterInfo']['character']['faction'] . "',
                  `factionid` = '" . $character['sheet']['characterInfo']['character']['factionId'] . "',
                  `gender` = '" . $character['sheet']['characterInfo']['character']['gender'] . "',
                  `genderid` = '" . $character['sheet']['characterInfo']['character']['genderId'] . "',
                  `race` = '" . $character['sheet']['characterInfo']['character']['race'] . "',
                  `raceid` = '" . $character['sheet']['characterInfo']['character']['raceId'] . "',
                  `class` = '" . $character['sheet']['characterInfo']['character']['class'] . "',
                  `classid` = '" . $character['sheet']['characterInfo']['character']['classId'] . "',
                  `talentspec` = '" .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "," .
                    $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] . "',
                  `talent1` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeOne'] . "',
                  `talent2` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeTwo'] . "',
                  `talent3` = '" . $character['sheet']['characterInfo']['characterTab']['talentSpec']['treeThree'] .

"',
                  `guild` = '" . $character['sheet']['characterInfo']['character']['guildName'] . "',
                  `guildurl` = '" . $character['sheet']['characterInfo']['character']['guildUrl'] . "',
                  `hp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'] . "',
                  `mp` = '" .

$character['sheet']['characterInfo']['characterTab']['characterBars']['secondBar']['effective'] . "',
                  `str` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['effective'] . "',
                  `agi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['effective'] . "',
                  `sta` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['effective'] . "',
                  `int` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['effective'] . "',
                  `spi` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['effective'] . "',
                  `arm` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['effective']

. "',
                  `strbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['strength']['base'] . "',
                  `agibase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['agility']['base'] . "',
                  `stabase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['stamina']['base'] . "',
                  `intbase` = '" .

$character['sheet']['characterInfo']['characterTab']['baseStats']['intellect']['base'] . "',
                  `spibase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['spirit']['base']

. "',
                  `armbase` = '" . $character['sheet']['characterInfo']['characterTab']['baseStats']['armor']['base']

. "',
                  `prof1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['name'] . "',
                  `skill1` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['0']['value']['0'] . "',
                  `prof2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['name'] . "',
                  `skill2` = '" .

$character['sheet']['characterInfo']['characterTab']['professions']['skill']['1']['value']['0'] . "',
                  `cooking` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['0']['value']['0'] . "',
                  `firstaid` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['1']['value']['0'] . "',
                  `fishing` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['2']['value']['0'] . "',
                  `riding` = '" .

$character['skills']['characterInfo']['skillTab']['skillCategory']['1']['skill']['3']['value']['0'] . "',
                  ";
                  $char['realmchar'] = addslashes($char['realm'] . "." . $char['character']);
                  if ($character['sheet']['characterInfo'] &&

$character['sheet']['characterInfo']['characterTab']['characterBars']['health']['effective'])
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET " . $charinfo_query . "

`armorydata` = '1' WHERE `realmchar` = '" . $char['realmchar'] . "'");
                  }
                  else
                  {
                        $vbulletin->db->query("UPDATE " . TABLE_PREFIX . "gwowevents SET `armorydata` = '2' WHERE

`realmchar` = '" . $char['realmchar'] . "'");
                      }
                }

                if (VB_AREA == 'AdminCP')
                {
                    echo $char['character'] . '<pre>';
                    print_r($character['skills']);
                    echo '<pre><hr />';
                }
                $char_updated .= $char['character'] . ", ";
        }
        echo $char_updated;
?>


stevewwm 03-20-2008 08:03 PM

Getting this error when trying to add an event to the calendar.

Code:

Database error in vBulletin 3.6.8:

Invalid SQL:

                SELECT        gwe.*,
                        user.username,
                        userfield.field0
                FROM        forumgwowevents gwe
                        LEFT JOIN forumuserfield AS userfield ON userfield.userid = gwe.userid
                        LEFT JOIN forumuser AS user ON user.userid = gwe.userid
                WHERE        eventid = 07
                ORDER BY
                        gwe.response ASC, gwe.date;

MySQL Error  : Unknown column 'userfield.field0' in 'field list'
Error Number : 1054
Date        : Thursday, March 20th 2008 @ 04:01:35 PM
Script      : http://WEBSITENAME.com/forum/calendar.php?do=getinfo&e=7&day=2008-12-20
Referrer    : http://WEBSITENAME.com/forum/calendar.php?do=add&type=single&c=1
IP Address  :
Username    :
Classname    : vB_Database


LostPhoenix 03-24-2008 05:07 PM

If found by grouping by character name you put a lot less stress on the armory. The current SQL Call to get the array of characters that needs to be updated will put the same character in multiple times.

By changing:
Code:

        $res = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "gwowevents WHERE `armorydata` != '1' ORDER BY `armorydata` ASC");
to:
Code:

        $res = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "gwowevents WHERE `armorydata` != '1' GROUP BY `realmchar` ORDER BY `armorydata` ASC");
It will only put each character to be updated once, but it will update the info for all events the character is signed up for.

Gryphon 03-24-2008 05:50 PM

@stevewwm You need to update the field id in the options.

@LostPhoenix, @Eviserator I will look in these changes.


All times are GMT. The time now is 06:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01232 seconds
  • Memory Usage 1,797KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete