• 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
Joined
Sep 21, 2016
Messages
28
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?
 

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,853
@MtoR you haven't override it to implement roster in tournament ?
I have maybe update it on last version of roster
 

netkingZ

New Member
Joined
Sep 21, 2016
Messages
28
@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.
 

MtoR

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

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,853
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
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,159
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 ?
 

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,853
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 ?