What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug No Answer Error in Log - Invite or Add Team/club

netkingZ

New Member
Hello @MtoR ,

i have bought XFA Tournament add-on but when i invite or add a team/club Loge make this error:

Code:
Log Server Error
Info Errore
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: 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 '))' at line 13 - library/Zend/Db/Statement/Mysqli.php:77
Generato Da: usertest, 2 minuti fa
Analisi dello Stack
#0 /home/server/namesite.it/forum/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT rost...')
#1 /home/server/namesite.it//forum/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tSELECT rost...')
#2 /home/server/namesite.it//forum/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT rost...')
#3 /home/server/namesite.it//forum/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT rost...', Array, 2)
#4 /home/server/namesite.it/forum/library/XFA/Roster/Model/Roster.php(41): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT rost...', 'roster_id')
#5 /home/server/namesite.it/forum/library/XFA/Tournament/ControllerPublic/Tournament.php(1627): XFA_Roster_Model_Roster->getAllRosters(Array, Array)
#6 /home/server/namesite.it//forum/library/XenForo/FrontController.php(351): XFA_Tournament_ControllerPublic_Tournament->actionAddRosters()
#7 /home/server/namesite.it//forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/server/namesite.it//forum/index.php(13): XenForo_FrontController->run()
#9 {main}
Stato Richiesta
array(3) {
  ["url"] => string(71) "http://game.namesite.it//index.php?tournaments/prova.3/add-rosters"
  ["_GET"] => array(1) {
    ["tournaments/prova_3/add-rosters"] => string(0) ""
  }
  ["_POST"] => array(6) {
    ["roster_names"] => string(8) "pavbur80"
    ["_xfToken"] => string(8) "********"
    ["_xfConfirm"] => string(1) "1"
    ["_xfRequestUri"] => string(31) "/index.php?tournaments/prova.3/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

how can fix this error?
 

Fred

Administrator
Staff member
@MtoR you haven't override it to implement roster in tournament ?
I have maybe update it on last version of roster
 

netkingZ

New Member
@MtoR you haven't override it to implement roster in tournament ?
I have maybe update it on last version of roster

i have the last version of XFA Roster add-on.
i have made my team and after i added my new team to tournament but your add-on makes the error described.
 

Clement

Freaky Coder
Staff member
PHP:
        $rosters = $this->_getRosterRosterModel()->getAllRosters(
           array(
               'captain_id'    => XenForo_Visitor::getUserId(),
                'game_id'       => $tournament['game_id'] 
            ),
            array(
                'club'          => true
            )
        );
 

Fred

Administrator
Staff member
PHP:
        $rosters = $this->_getRosterRosterModel()->getAllRosters(
           array(
               'captain_id'    => XenForo_Visitor::getUserId(),
                'game_id'       => $tournament['game_id']
            ),
            array(
                'club'          => true
            )
        );

it's should work
Conditions are good and fetchOptions too oO
 

Clement

Freaky Coder
Staff member
In fact I was looking at the wrong part.

It's :
PHP:
            $rosters = $this->_getRosterRosterModel()->getAllRosters(
                array(
                    'roster_name'   => explode(',', $rosterNames),
                    'game_id'       => $tournament['game_id']
                ),
                array(
                    'captain'   => true,
                    'club'      => true
                )
            );

Maybe a case where $rosterNames were empty ?
 

Fred

Administrator
Staff member
I have try it here and it's good for me.
  • with 1 roster
  • with multiple roster
  • with no roster
  • with 1 good roster and 1 bad roster name
And i don't think i have update this part, so it's should be work.

@netkingZ can you describe your process to add roster please
If possible can you record your screen ?
 
Top