Design and Web Development
Home
BearDev
Forum is transfered to our new web site www.JoomSport.com
Problem editing matchday results: played match - SOLVED!
Post Problem editing matchday results: played match - SOLVED!
on 08/23/2010 11:10

Hello everybody.
First of all let me say "thanks!" to beardev team and to all users on the forum, but I've a problem with the matchday edit page and I've not found a solution searching in the forum.

Here's the situation:

0) Joomla 1.5.15 + BearLeague 1.1.0
1) I have 1 tournament, without groups, with 18 teams (and so 9 matchs per matchday)
2) I have 1 season (2010-2011) linked with this tournament
3) I have putted in all matchday for all season.
4) Now, I'm editing the first matchday just to put in its's results

And now the problem:
I' can't set each match as played and so no result appears on frontend. When I check all checkboxes in the "Played" Column, they simply are resetted when i click on Apply.
Furthermore, trying to do some debug, I have made a dump of $_POST var and found a strange thing: while values for ExtraTime checkboxes are posted correctly, for example:
Code:
[extra_time] => Array
(
[0] => 1
[1] => 0
[2] => 1
[3] => 0
[4] => 0
[5] => 1
[6] => 1
[7] => 1
[8] => 1
)

values for PlayedMatch instead aren't posted in the right way. If I check every checkbox, here is what i get:
Code:
[match_played] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
)

Furthermore, if I post the form with some checkbox unchecked, that checkboxes are removed from the array causing a disaster like this:
Code:
[match_played] => Array
(
[0] => 1
[1] => 1
[2] => 1
[3] => 1
[4] => 1
)

where 3 matches are totally missing and checked values are assigned to the wrong match index.

Please, can someone help with this?
Thanks, Daniele.


offsidepisa
offsidepisa
Posts: 3

Naive
Naive
Registered

Joined Board
08/23/2010 10:36
Offline User is Offline

View all users posts

----- My code is bug-free. It just implements some random, undocumented features.

Post Me too!
on 08/23/2010 11:41

Dear Daniele,

Im having the same trouble too.....

I cant work out what is going on either...hopefully someone can help soon!

Thanks
Anthony


Anthony Jones
Posts: 3

Naive
Naive
Registered

Joined Board
08/23/2010 11:39
Offline User is Offline

View all users posts

Post Problem editing matchday results: played match
on 08/23/2010 12:26

hello anthony, I'm trying to go further with test and debug. If I'll find something useful, I'll post a reply here.

Bye, Daniele.


offsidepisa
offsidepisa
Posts: 3

Naive
Naive
Registered

Joined Board
08/23/2010 10:36
Offline User is Offline

View all users posts

----- My code is bug-free. It just implements some random, undocumented features.

Post problem solved!
on 08/23/2010 13:17

Dear Anthony,
good news, problem solved!!

There's a typo in /administrator/components/com_bearleague/admin.bearleague.html.php on line 1686 (or so).
If you search for "legth" you should find the right line. Obviously the right js property for an array is "length", not "legth"!

so change the line from

Code:if(played.legth){
to

Code:if(played.length){
and all seems to work fine!

Please Dev Team, correct this in the next release.

Daniele


offsidepisa
offsidepisa
Posts: 3

Naive
Naive
Registered

Joined Board
08/23/2010 10:36
Offline User is Offline

View all users posts

----- My code is bug-free. It just implements some random, undocumented features.