[XFA] Tournament - XF2

[XFA] Tournament - XF2 [Paid] 3.5.3

No permission to buy (€40.00)
XFA updated [XFA] Tournament - XF2 with a new update entry:

Maintenance release

Corrected bugs:
  • Error: Attempt to increment/decrement property "xfa_tourn_wins" on null in src/addons/XFA/Tournament/Entity/Tournament.php at line 926
  • LogicException: Entity XFA\Roster:Roster (class: XFA\Roster\Entity\Roster) could not be found in src/XF/Mvc/Entity/Manager.php at line 53
  • Missing link in latest tournament widget header

Modifications:
  • Renamed all database table to add xf_ prefix

Read the rest of this update entry...
 
Error when viewing leaderboard after latest update.

XF\Db\Exception: MySQL statement prepare error [1146]: Table '[dbname]_xenforo.xfa_tourn_tournament' doesn't exist in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 167
  6. XF\Db\AbstractAdapter->fetchAllKeyed() in src/addons/XFA/Tournament/Pub/Controller/Leaderboard.php at line 108
  7. XFA\Tournament\Pub\Controller\Leaderboard->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
  12. XF\App->run() in src/XF.php at line 524
  13. XF::runApp() in index.php at line 20

More info:
Code:
XF\Db\Exception: MySQL statement prepare error [1146]: Table ''[dbname]_xenforo.xfa_tourn_tournament' doesn't exist src/XF/Db/AbstractStatement.php:230
Generated by: Tex Jan 25, 2023 at 1:04 AM
Stack trace
            SELECT winner_id, COUNT(tournament_id) AS wins
            FROM xfa_tourn_tournament
            WHERE xfa_tourn_tournament.type <> 'team'
                    AND (
                        (end_date = 0 AND creation_date > ?)
                        OR
                        end_date > ?
                    )
            GROUP BY user_id
            ORDER BY wins DESC
            LIMIT ?
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(167): XF\Db\AbstractAdapter->query('
            SE...', Array)
#5 src/addons/XFA/Tournament/Pub/Controller/Leaderboard.php(108): XF\Db\AbstractAdapter->fetchAllKeyed('
            SE...', 'winner_id', Array)
#6 src/XF/Mvc/Dispatcher.php(352): XFA\Tournament\Pub\Controller\Leaderboard->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XFA\\Tournament:...', 'Index', Object(XF\Mvc\RouteMatch), Object(XFA\Tournament\Pub\Controller\Leaderboard), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFA\Tournament\Pub\Controller\Leaderboard), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(24) "/tournaments/leaderboard"
  ["referrer"] => string(69) "/tournaments/participated-tournaments"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
Still error on leaderboard..

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'xfa_tourn_tournament.type' in 'where clause' in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 167
  6. XF\Db\AbstractAdapter->fetchAllKeyed() in src/addons/XFA/Tournament/Pub/Controller/Leaderboard.php at line 108
  7. XFA\Tournament\Pub\Controller\Leaderboard->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
  12. XF\App->run() in src/XF.php at line 524
  13. XF::runApp() in index.php at line 20
  • XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'xfa_tourn_tournament.type' in 'where clause'
  • src/XF/Db/AbstractStatement.php:230
  • Generated by: Tex
  • Jan 26, 2023 at 8:33 AM

Stack trace​

SELECT winner_id, COUNT(tournament_id) AS wins
FROM xf_xfa_tourn_tournament
WHERE xfa_tourn_tournament.type <> 'team'
AND (
(end_date = 0 AND creation_date > ?)
OR
end_date > ?
)
GROUP BY user_id
ORDER BY wins DESC
LIMIT ?
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(167): XF\Db\AbstractAdapter->query('
SE...', Array)
#5 src/addons/XFA/Tournament/Pub/Controller/Leaderboard.php(108): XF\Db\AbstractAdapter->fetchAllKeyed('
SE...', 'winner_id', Array)
#6 src/XF/Mvc/Dispatcher.php(352): XFA\Tournament\Pub\Controller\Leaderboard->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XFA\\Tournament:...', 'Index', Object(XF\Mvc\RouteMatch), Object(XFA\Tournament\Pub\Controller\Leaderboard), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFA\Tournament\Pub\Controller\Leaderboard), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}

Request state​

array(4) {
["url"] => string(24) "/tournaments/leaderboard"
["referrer"] => string(69) "https://www.boardgamedungeon.net/tournaments/participated-tournaments"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Tournament links in "who's online" is broken. It will show the correct tournament the user is viewing, but clicking that link from the who's online list will provide a broken URL. It seems it places a $ sign in the url.
 
Tournament links in "who's online" is broken. It will show the correct tournament the user is viewing, but clicking that link from the who's online list will provide a broken URL. It seems it places a $ sign in the url.

Also counter on tournament page is wrong?
View attachment 280790
Cant recall if you had reported those on our website ?
Where can I edit the words "1st" and "2nd"?

View attachment 281173

Thank you.
They are hardcoded in the JavaScript library I use I think.
I know it's been discussed in the past about adding ladder tournaments. Was wondering if it was planned for a future release?
It’s on my tab, just not sure if/when I will implement it as it’s driven by the sales as well.
 
Cant recall if you had reported those on our website ?

They are hardcoded in the JavaScript library I use I think.

It’s on my tab, just not sure if/when I will implement it as it’s driven by the sales as well.

I did.


(it is marked as fixed, but no update to fix it has been released yet).
 
Maybe I'm missing or overlooking a setting but how do you set tournaments where low scores win/advance ie golf, racing (fastest lap) etc?
 
I did.


(it is marked as fixed, but no update to fix it has been released yet).
Oh right, I think I had started working on a new release but haven't finished it.
Maybe I'm missing or overlooking a setting but how do you set tournaments where low scores win/advance ie golf, racing (fastest lap) etc?
That's not something that is implemented.
 
Installing this on a busy addon site generates a ton of errors briefly that is fairly disruptive since installing isn't quite atomic.

Template error: [E_USER_WARNING] Method canViewTournaments is not callable on the given object

This is because of display condition [COLOR=rgb(20, 20, 20)]$xf.visitor.canViewTournaments() in the xfa_tourn navigation entry.[/COLOR]

This can be prevented by adding the term callable() like so:
PHP:
callable($xf.visitor, 'canViewTournaments') && $xf.visitor.canViewTournaments()
 
Top Bottom