• 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 Fixed Errors on fresh install.

Hecter

Member
Joined
Jan 16, 2016
Messages
79
Complete fresh install of the tournament mod and roster mod, and I have multiple errors, I have tried uninstalling and reinstalling, deleting out all the files, reuploaded them and these errors persist.

I cannot even test a tournament as I can't add anyone to any single tournament I try to make.

Error when trying to register to add someone to a tournament.
Code:
ErrorException: Fatal Error: Can't use method return value in write context - library/XFA/Tournament/DataWriter/Participant.php:99
Generated By: Unity Bluefin, 3 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(68) "mydomainwashere/forum/tournaments/testing-1v1.2/add-users"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["usernames"] => string(15) "Unity Bluefin, "
    ["_xfToken"] => string(8) "********"
    ["_xfConfirm"] => string(1) "1"
    ["_xfRequestUri"] => string(33) "/forum/tournaments/testing-1v1.2/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
Error when trying to register for a tournament:
Fatal error: Can't use method return value in write context in /var/www/mydomainwashere/public_html/forum/library/XFA/Tournament/DataWriter/Participant.php on line 99

Error when trying to create a tournament with a roster involved this is via my forums:
Undefined index: hasRosterInGame

I have errors all over the place rendering both the roster and tournament system utterly useless.
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
Hi,

Which version of php to you use ?

Clément
 

Hecter

Member
Joined
Jan 16, 2016
Messages
79
Hi,

Which version of php to you use ?

Clément
5.4.45, I've upgraded so the errors are fixed, I do have one issue though which is annoying me....

My register or unregister button is messed up, any ideas on how to fix this?
 

Attachments

Last edited:

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
Hi,

Please only deal of one topic per thread, so open a new thread for your other issue.

I think I'll have to fix something anyways related to your initial request as it should have worked with earlier php version.

Clément
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
Yup indeed, as written on xf.com (please avoid posting duplicates), if you can't upgrade then I'll do a quick fix ASAP.
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
I must admit I don't know which one.
But wait I'll be releasing a bug fix version today.
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
I think I had this fixed.
You are using the latest version ?

Clément
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
No no, I can't recall how we fixed it with robert9
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
Edit the file library/XFA/Tournament/DataWriter/Participant.php.

Replace lines 99 and 100, which are:
PHP:
                $viewIds = $tournDw->get('view_ids');
                if (empty($viewIds))
By:
PHP:
                $viewIds = $tournDw->get('view_ids');
                if (!$viewIds)
[/php
 

Motobaka

New Member
Joined
Sep 13, 2016
Messages
29
Lines 99 and 100 do not contain what you say. I have found the first line to be identical to line 146 and the second line is nowhere to be found.

Could you please send me the file with the corrections?
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
In version 2.3.1 ? The lines are 99 and 100.

If not it means you are not editing the right file.
 

Motobaka

New Member
Joined
Sep 13, 2016
Messages
29
From a fresh download the lines 99 - 102 in the file you are talking about are:

if (empty($tournDw->get('view_ids')))
{
$viewIds = implode(',', $rosterUsersIds);
}
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
5,209
ah ok replace just the first line (the if) by the bit of code I gave
 

Motobaka

New Member
Joined
Sep 13, 2016
Messages
29
Is the [/php part supposed to be like that?

It does not work with it or without it or with the closing ]

Could you please just send the file with the corrections?