[XFA] Tournament - XF2

[XFA] Tournament - XF2 [Paid] 3.5.3

No permission to buy (€40.00)
This product is currently not fit for purpose. I am very disappointed that several of these game-breaking bugs were released without any testing, and that the patch has clearly not been tested either. Please be more thorough with your next release, it shouldn't be on me to point these kind of issues out to you.
 
1. Running the update has overwritten my Public Navigation changes, my Development > Route changes, and also overwritten my phrase changes. It has also overwritten my usergroup permission changes!! Please ensure this doesn't happen with each update!

You have to use route filters and change phrases in the secondary languages.
If you did not do that then it's not the proper way to do and I can't do anything, that's how xF works.

2. When you click Generate Matches for Double Elimination, you only get a confirm button - you don't get the matches preview. However if you cancel the page and click Generate Matches again you get the full preview as normal. You cannot generate matched for Single Elimination - you just get a blank page, and it doesn't work at all.

For double elimination ? Just tried didn't get that.
Maybe your browser cache had kept the previous js file cached.

For single elimination, this was indeed reported, my bad, gotta fix that.

3. For Double Elimination, the winner is declared before the final match takes place, the result is also posted to the forum. See below:

View attachment 181839

I haven't tested the other modes yet.

Right will investigate, had done some big changes, perhaps did a too quick last one not tested.

4. The total number of tournaments is adding 1 to the total. So I have 14 test tournaments, however it is displaying 15.

Hum really ? During upgrade it was supposed to be recomputed, it is fine on my test setup.
 
Last edited:
This product is currently not fit for purpose. I am very disappointed that several of these game-breaking bugs were released without any testing, and that the patch has clearly not been tested either. Please be more thorough with your next release, it shouldn't be on me to point these kind of issues out to you.

I did test, only one change was perhaps too quick.
However, we don't do full regression testing before releasing.

For some of the bugs you reported, I am not having these issues as stated in my previous post.
 
For the number of tournaments in category in fact they are there, there is just a problem of potential duplicate bracket generated.
Going to fix that as well in upcoming release.
 
You have to use route filters and change phrases in the secondary languages.
If you did not do that then it's not the proper way to do and I can't do anything, that's how xF works.

You are right about the phrases - I may have inadvertently edited the master language by mistake. My bad. However I should be able to change the Route 'Section Context', right? I've done this with other addons with no problems, and I don't want Tournaments to have it's own tab / subnav, so I am changing the section context to 'forums'. Also it did overwrite my Public Navigation changes also.

Anyway, I shall download the latest version and report back with my findings :)
 
Ok, good progress, but still some bugs. Here we go:

1. Public navigation changes are reset upon upgrade. This does not happen with other add-on upgrades - are you sure you can't change this?

2. Development > Routes > 'Section context' changes are reset upon upgrade. This does not happen with other add-on upgrades - are you sure you can't change this?

3. Double Elimination - the bracket reset is still included. This is absolutely fine by me, just wanted to be sure you were aware of this behaviour as you said you would remove it. No reason to change it however - it is working correctly.

4. Single Elimination: Generate matches page is blank - gives no preview of matches. However clicking 'Confirm' will generate the matches correctly. I have tested this in a different browser.

tourn7.webp

5. Round Robin and Round Robin (2 way) is declaring the winner early after each round.

tourn8.webp

EDIT TO ADD: I'm pretty sure running the upgrade also overwrote my usergroup permission changes, as I had disabled Registered from joining or creating tournaments. However I will have to confirm this next update.

Here are my Phrases changes - you may wish to implement these as default. They are a little more friendly than the defaults:

1. xfa_tourn_end_registering to "Closing" - this will fix the line break display issue:

tourn9.webp

2. xfa_tourn_message_create_tournament to:

Code:
{username} created a new tournament: [url={link}][plain]{title}[/plain][/url].

{snippet}

[url={link}]Click here for more details...[/url]

3. xfa_tourn_message_matches_started to:

Code:
Matches have just started in the tournament: [url={link}][plain]{title}[/plain][/url].

[url={link}]Click here for more details...[/url]

4. xfa_tourn_message_x_won_tournament to:

Code:
Congratulations to [url={userLink}]{username}[/url] who won the tournament: [url={link}][plain]{title}[/plain][/url].

[url={link}]Click here for more details...[/url]

5. xfa_tourn_mode to "Tournament type".

Finally, I added this to extra.less and it makes the tournament listings much nicer. You may wish to add a style option for these at some stage:

Code:
.structItem-metaItem--winner > dd, .structItem-metaItem--winner > dt {
    color: #ffd700; // Gold winner in Tournament listing
}
.structItem-metaItem--endRegistering > dd, .structItem-metaItem--endRegistering > dt {
    color: #0fc30f; // Green signup in Tournament listing
}

tourn10.webp
 
Last edited:
This is more for other users of this add-on, but perhaps in the future this may be considered for an option in the admin settings.

I don't have much use for some of the options in the Create Tournament page, and I'd prefer they were hidden from my members when they create a tournament. Specifically, I don't use Registration Type, Rules, or Min. players [Team] (optional). So this is how to remove them.

BEFORE and AFTER:

create_before.webp create_after.webp

Edit the template xfa_tourn_tournament_create as follows:

For Registration Type, replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="type"
                      arg-tournament="{$tournament}"
                      arg-category="{$category}" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="type"
                      arg-tournament="{$tournament}"
                      arg-category="{$category}" /> -->
<xf:hiddenval name="type">solo</xf:hiddenval>

for Rules, replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="rules"
                      arg-tournament="{$tournament}" />

            <hr class="formRowSep" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="rules"
                      arg-tournament="{$tournament}" />

            <hr class="formRowSep" /> -->
<xf:hiddenval name="rules"></xf:hiddenval>

and finally for Min. players [Team] (optional), replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="min_players"
                      arg-tournament="{$tournament}" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="min_players"
                      arg-tournament="{$tournament}" /> -->
<xf:hiddenval name="min_players">0</xf:hiddenval>

I hope this helps someone else out there :)
 
1. Public navigation changes are reset upon upgrade. This does not happen with other add-on upgrades - are you sure you can't change this?(

2. Development > Routes > 'Section context' changes are reset upon upgrade. This does not happen with other add-on upgrades - are you sure you can't change this?

I don't do anything on those part so I have no idea.

3. Double Elimination - the bracket reset is still included. This is absolutely fine by me, just wanted to be sure you were aware of this behaviour as you said you would remove it. No reason to change it however - it is working correctly.

I wanted to but it's finally not a real issue since I changed completely the way to define the winner so it's fine.

4. Single Elimination: Generate matches page is blank - gives no preview of matches. However clicking 'Confirm' will generate the matches correctly. I have tested this in a different browser.

View attachment 181846

I fixed the issue on the tournament page but forgot to do the same on the generation page... dumb me !
Fixed.

5. Round Robin and Round Robin (2 way) is declaring the winner early after each round.

I was fooled yesterday by the third party script I use that handles the display and which outputs the results.
I have reviewed the condition to make it 100% fine.

EDIT TO ADD: I'm pretty sure running the upgrade also overwrote my usergroup permission changes, as I had disabled Registered from joining or creating tournaments. However I will have to confirm this next update.

The auto permission set is based on previous version id, if you upgraded the permission set code shall not run.

Here are my Phrases changes - you may wish to implement these as default. They are a little more friendly than the defaults:

English is not my mother tongue so I may have not been 100% perfect :)
Thanks for the interesting suggestions, I changed them all.

Finally, I added this to extra.less and it makes the tournament listings much nicer. You may wish to add a style option for these at some stage:

Code:
.structItem-metaItem--winner > dd, .structItem-metaItem--winner > dt {
    color: #ffd700; // Gold winner in Tournament listing
}
.structItem-metaItem--endRegistering > dd, .structItem-metaItem--endRegistering > dt {
    color: #0fc30f; // Green signup in Tournament listing
}

It was interesting as well. Added the two style properties, that was quick to do.
 
This is more for other users of this add-on, but perhaps in the future this may be considered for an option in the admin settings.

I don't have much use for some of the options in the Create Tournament page, and I'd prefer they were hidden from my members when they create a tournament. Specifically, I don't use Registration Type, Rules, or Min. players [Team] (optional). So this is how to remove them.

BEFORE and AFTER:

View attachment 181853 View attachment 181852

Edit the template xfa_tourn_tournament_create as follows:

For Registration Type, replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="type"
                      arg-tournament="{$tournament}"
                      arg-category="{$category}" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="type"
                      arg-tournament="{$tournament}"
                      arg-category="{$category}" /> -->
<xf:hiddenval name="type">solo</xf:hiddenval>

for Rules, replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="rules"
                      arg-tournament="{$tournament}" />

            <hr class="formRowSep" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="rules"
                      arg-tournament="{$tournament}" />

            <hr class="formRowSep" /> -->
<xf:hiddenval name="rules"></xf:hiddenval>

and finally for Min. players [Team] (optional), replace:

Code:
<xf:macro template="xfa_tourn_tournament_edit_macros" name="min_players"
                      arg-tournament="{$tournament}" />

with:

Code:
<!--            <xf:macro template="xfa_tourn_tournament_edit_macros" name="min_players"
                      arg-tournament="{$tournament}" /> -->
<xf:hiddenval name="min_players">0</xf:hiddenval>

I hope this helps someone else out there :)

That could be configured through options maybe, don't hesitate to request that as new feature here:
https://www.xen-factory.com/index.php?forums/add-ons-support.123/
 
XFA updated [XFA] Tournament - XF2 with a new update entry:

Maintenance release

Corrected bugs:
  • Single elimination bracket doesn't show on match generation page
  • Round robin tournament winner awarded before end

Modifications:
  • Few phrases changes
  • Highlighting of closing date and winner elements in tournaments list (css - style properties based)
  • Style properties to tweak even further the bracket tournament type display

Read the rest of this update entry...
 
Thanks for the fast updates, and also for including my suggestions. I can confirm that everything that has been reported so far now appears to be working. There are certain parts I am unable to test until I put the script on my live website, but I think I'm ready to do that now. Yay!

I don't do anything on those part so I have no idea.

It did it again with this upgrade - both the Public Navigation and the Routes were reset to default, but NOT the usergroup permissions. I am not aware of this happening with any other updates. I guess I'll post a general support request on the forums asking if this is normal behaviour, a bug with Xenforo, or is more likely to be a bug specific to this add-on.

Anyway, I'll let you know how things go once I let my users at this!
 
  • Like
Reactions: XFA
Just a quick one - it seems that everyone is getting tournament alerts even if this is set to No in all the alert permissions.

tourn11.webp
 
Ohhhhhh right ! I think when porting to xF2 I didn't keep the permission condition, only based it on the opt out.
 
This app looks awesome, I would love to be able to migrate from smash.gg and keep the tournament run locally. I have a question regarding Power Rankings? It doesn't appear to be built in at the moment, would it be possible to assign points based on where the player finished in the tournament and have an overall rankings page included? This would need to be on a per game basis as well. Is that something within the realm of possible?
 
This app looks awesome, I would love to be able to migrate from smash.gg and keep the tournament run locally. I have a question regarding Power Rankings? It doesn't appear to be built in at the moment, would it be possible to assign points based on where the player finished in the tournament and have an overall rankings page included? This would need to be on a per game basis as well. Is that something within the realm of possible?

Currently we are only handling winner that's all.
While we might be able to do that for round robin one, doing so for single elimination or double elimination would be very complicated as per the js api we use to display tournament.
 
Ran our first tournament tonight - nothing critical, but a couple of issues.

1. User alerts are still going to everyone even though they are completely disabled in the permissions. Analyse permissions also confirms that all are set to "no".

2. I have been getting the following server errors. This is on a fresh install on my live site with no previous testing / tournaments installed:

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '1' for key 'tournament_id' src/XF/Db/AbstractStatement.php:212

Stack trace
INSERT  INTO `xfa_tourn_bracket` (`tournament_id`, `bracket`, `bracket_id`) VALUES (?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xfa_tourn_brack...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/XFA/Tournament/Service/Tournament/GenerateBracket.php(239): XF\Mvc\Entity\Entity->save()
#7 src/addons/XFA/Tournament/Repository/Tournament.php(60): XFA\Tournament\Service\Tournament\GenerateBracket->generate(true)
#8 src/addons/XFA/Tournament/Cron/Tournament.php(21): XFA\Tournament\Repository\Tournament->execAutomaticBracketGeneration()
#9 [internal function]: XFA\Tournament\Cron\Tournament::automaticBracketGeneration(Object(XF\Entity\CronEntry))
#10 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#11 src/XF/Job/Manager.php(241): XF\Job\Cron->run(7.9999988079071)
#12 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9999988079071)
#13 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9999988079071)
#14 job.php(15): XF\Job\Manager->runQueue(false, 8)
#15 {main}

Idea / Request: When a tournament is created, during the sign-up stage, the content page shows a blank draw / rounds. This seems unnecessary until the draw has been made. Perhaps instead of a blank draw, you should simply list the participants instead? This would also make it more user friendly when the tournament organiser has set the maximum entries to a higher number. Thanks!
 
Ran our first tournament tonight - nothing critical, but a couple of issues.
1. User alerts are still going to everyone even though they are completely disabled in the permissions. Analyse permissions also confirms that all are set to "no".

Even with latest version ?

2. I have been getting the following server errors. This is on a fresh install on my live site with no previous testing / tournaments installed:

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '1' for key 'tournament_id' src/XF/Db/AbstractStatement.php:212

Stack trace
INSERT  INTO `xfa_tourn_bracket` (`tournament_id`, `bracket`, `bracket_id`) VALUES (?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xfa_tourn_brack...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/XFA/Tournament/Service/Tournament/GenerateBracket.php(239): XF\Mvc\Entity\Entity->save()
#7 src/addons/XFA/Tournament/Repository/Tournament.php(60): XFA\Tournament\Service\Tournament\GenerateBracket->generate(true)
#8 src/addons/XFA/Tournament/Cron/Tournament.php(21): XFA\Tournament\Repository\Tournament->execAutomaticBracketGeneration()
#9 [internal function]: XFA\Tournament\Cron\Tournament::automaticBracketGeneration(Object(XF\Entity\CronEntry))
#10 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#11 src/XF/Job/Manager.php(241): XF\Job\Cron->run(7.9999988079071)
#12 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9999988079071)
#13 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9999988079071)
#14 job.php(15): XF\Job\Manager->runQueue(false, 8)
#15 {main}

Hum really ? It was fixed in one of the very last version. Perhaps some remainings of the previous tries with bugs.

Is the very first tournament you created still existing and having non generated matches ?
You would need to go to your phpmyadmin in the xfa_tourn_bracket and remove the

Idea / Request: When a tournament is created, during the sign-up stage, the content page shows a blank draw / rounds. This seems unnecessary until the draw has been made. Perhaps instead of a blank draw, you should simply list the participants instead? This would also make it more user friendly when the tournament organiser has set the maximum entries to a higher number. Thanks!

Yeah that would make sense, except if the participants tab option is not active.
 
Yes, Im using the latest version. However the tournament was created on the previous version for members to sign up, and during that process it was upgraded.

This was a clean install with no previously created / deleted tournaments.

Btw, everyone loved it - I shall post a positive review later today :)
 
Top Bottom