Bug: Joker limits...Urgent Please

This Extension is Freeware and is available in our Extensions directory.
Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 8:32 pm

Okey first round of my prediction game everything was OK.....but now is second round and my members can't choose joker because the system gives them, they have already made ​​your choice (first round) I have over 250 users in my prediction game and ask if someone can help me for this bug, because otherwise everything becomes very frustrating for all ....


Thanks in advanse ....
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Aug 17, 2011 8:56 pm

ok, ofcourse I want to help you, but....
lets try a different way:
what do you not understand, 1st few lines?

http://wiki.joomleague.at/doku.php?id= ... #downloads
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 9:08 pm

I understand but I'm using JoomLeague for 4 years now and I aways support JoomLeague with Footer Link. With JoomLeague 0.93 in legacy mode the system was running very unstable. There was more CPU usage, Error 500 in users profile page and a lot of bugs. I know u want first of all to make JoomLeague 1.5 Stable but with start of the football season there is more users who will be happy to see Prediction Game with fewer imposible bugs.
What I'm trying to say is if u don't mind please pay attention over Prediction Game and u will make more users happy....I'm sure about that.

Thanks
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Aug 17, 2011 9:23 pm

ah yeah of course I understand, but without good testing of the current prediction game, you always find these kind of bugs...and is very #$$#$^# on a production website.....isnt it?
Kurt introduced the pred game September 2010 , and it is not tested very well, that's why we need your (community)help.
check the buglist:
http://bugtracker.joomleague.at/redmin ... ame/issues

But back to your problem:
I just tested here on my test website, I can choose a joker in round 2.....but maybe I misunderstood your problem?
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 9:31 pm

There is 2 screenshots ....


http://premierleaguebg.com/1.JPG - First Round
http://premierleaguebg.com/2.JPG - Second Round


JoomLeague - v1.5.2.7789af7
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Aug 17, 2011 9:34 pm

how many jokers did you set.....as far as i can see, just 1
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 9:36 pm

Yes ... one joker ... but what I know it shoud be one per round, not per Season ?
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Aug 17, 2011 9:40 pm

as far as i know its per season
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 9:46 pm

Opsss....so u want to tell me that u planed to use joker per season not per round :confused:

So there is two options ....

1st To add another one joker every round ...
2nd To edit my code to be joker per Round not per Project ??

Am I correct ?
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Aug 17, 2011 9:51 pm

yes, or just use joker per season, so for example"
lets say 100 matches
users get 10 jokers in a season, is not bad...imho
If 1 round have 10 matches and use all of his 10 jokers, its his bet....isnt it (no more jokers left)
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Wed Aug 17, 2011 9:58 pm

One last question :) Can u tell which files I shoud edit to try to make it to be per round.......
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Thu Aug 18, 2011 6:03 am

dont know the exact file(s)
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Thu Aug 18, 2011 8:06 am

I think default_view_tippentry_do.php in com_joomleague/extensions/predictiongame/views/predictionentry/tmpl shoud be edited.

Any other Dev who can help?
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
comraden
Joomleague Core Developer
Joomleague Core Developer
Posts: 1291
Joined: Thu Aug 16, 2007 2:27 pm
Location: Poland, Lublin
Contact:

Re: Bug: Joker limits...Urgent Please

Postby comraden » Thu Aug 18, 2011 8:21 am

Becks wrote:I think default_view_tippentry_do.php in com_joomleague/extensions/predictiongame/views/predictionentry/tmpl shoud be edited.

I think not in VIEWS, but in MODELS.
Becks wrote:Any other Dev who can help?

I can't help, too much other work to do... :confused:
http://llk.pl::jl_1.6 | jl_2.x | jl_3.x testing/production enviroment
samiec alfa koncernu 'Cham_Burak_Prostak' || proved: the most annoying person on the forum

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Thu Aug 18, 2011 8:35 am

In prediction.php in Models dir I found this

Code: Select all

function getMemberPredictionJokerCount($user_id,$project_id=0)


If I read it correctly it means that it get joker count from user_id and project_id and because there is no round and only have match_id this is the reason that jokers are for all project .... Am I correct ?
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Thu Aug 18, 2011 5:22 pm

Becks wrote:In prediction.php in Models dir I found this

Code: Select all

function getMemberPredictionJokerCount($user_id,$project_id=0)


If I read it correctly it means that it get joker count from user_id and project_id and because there is no round and only have match_id this is the reason that jokers are for all project .... Am I correct ?


Maybe, but I think its not that easy...
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Thu Aug 18, 2011 6:31 pm

:'(
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Thu Aug 18, 2011 9:22 pm

I did what timoline say ... I make it 38 joker for all season but when I test it....problem again.

It not allow me to make more than 3 jokers.
Take a look on my screens.

http://premierleaguebg.com/3.JPG
http://premierleaguebg.com/4.JPG

I test it with diferent rounds as well but it not allow me to put joker.
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Thu Aug 18, 2011 9:34 pm

what is the message?
@2, there is no result :confused: you cant add a joker without result
Joomla 1.5.x
Joomleague 1.5.....latest git version

Becks
.
Posts: 87
Joined: Wed May 07, 2008 5:33 pm
Contact:

Re: Bug: Joker limits...Urgent Please

Postby Becks » Thu Aug 18, 2011 10:09 pm

the message is "Please check your Jokers count. You have more than you are alloved to have !!!"

Its not because there is no result...just want it to show u ...
Joomla 2.5.11
JoomLeague - v2.0.84.f90c771
http://www.premierleaguebg.com

drcliff
Newbie
Posts: 4
Joined: Fri Jul 02, 2010 7:44 am

Re: Bug: Joker limits...Urgent Please

Postby drcliff » Sat Aug 20, 2011 2:24 pm

I can Report the same Error.
When I limit the Jokers per Saison to 30 i can max set 3 Jokers. At the fourth i get the error, that i already have used all Jokers. But there must only be an error in a formula, because when i set the maximum Jokers per Saison to 40, i can set 4 Jokers and get the error on the fifth. When i set the maximum to 50 i can set 5 Jokers...

I now wanted to set the maximum to 300, so i can use 30 Jokers ;)
But the max supported count is 127 :bash:

:Edit:
And now i tried something more:
When i use 127 as maximum, i also can set only 1 Joker.
But when i use 99, i can set more then 9 joker. (i tested it until 25 jokers, but maybe more is possible.
:/Edit:

drcliff

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Sat Aug 20, 2011 4:02 pm

cool :cool:
thats good testing guys!!! :thx:

created a ticket: http://bugtracker.joomleague.at/redmine/issues/1076
Joomla 1.5.x
Joomleague 1.5.....latest git version

Deppenliga2011
Newbie
Posts: 3
Joined: Wed Aug 03, 2011 10:24 am

Re: Bug: Joker limits...Urgent Please

Postby Deppenliga2011 » Sat Aug 27, 2011 2:30 pm

Hi,

same problem - is there no solution available?

User avatar
giulian
Donator
Donator
Posts: 184
Joined: Fri Aug 24, 2007 10:57 am

Re: Bug: Joker limits...Urgent Please

Postby giulian » Wed Sep 07, 2011 6:14 pm

same for me too

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: Bug: Joker limits...Urgent Please

Postby timoline » Wed Sep 07, 2011 7:05 pm

giulian wrote:same for me too

we already know...
Joomla 1.5.x
Joomleague 1.5.....latest git version

User avatar
farzad123
.
Posts: 171
Joined: Thu Nov 29, 2007 9:18 pm

Re: Bug: Joker limits...Urgent Please

Postby farzad123 » Wed Sep 07, 2011 9:32 pm

we know u know ! but this is urgent ! plz

raffael
.
Posts: 51
Joined: Thu Aug 16, 2007 12:25 am

Re: Bug: Joker limits...Urgent Please

Postby raffael » Fri Sep 16, 2011 10:02 am

In file "default_view_tippentry_do.php" in path "com_joomleague\extensions\predictiongame\views\predictionentry\tmpl" line 291 there should be something like

Code: Select all

<input   type='checkbox' id='cbj_


Find

Code: Select all

onchange='   if(this.checked)
                                                         {
                                                            document.<?php echo $formName; ?>.jokerCount.value++;
                                                            if (document.<?php echo $formName; ?>.jokerCount.value > document.<?php echo $formName; ?>.maxJokerCount.value)
                                                            {
                                                               alert("<?php echo JText::_('JL_PRED_ENTRY_MAX_JOKER_WARNING'); ?>");
                                                               this.checked=false;
                                                               document.<?php echo $formName; ?>.jokerCount.value--;
                                                            }
                                                           }
                                                           else
                                                         {
                                                            document.<?php echo $formName; ?>.jokerCount.value--;
                                                         }' />


and remove everything in onchange='' (including onchange) (but leave />)

Total limit of Jokers will still be checked on form submission but not on checkbox checking.

And for the lazy ones I've attached a modified file :)

Plus take a look at my recent post about joker limits here: viewtopic.php?f=108&t=14136
You do not have the required permissions to view the files attached to this post.

User avatar
giulian
Donator
Donator
Posts: 184
Joined: Fri Aug 24, 2007 10:57 am

Re: Bug: Joker limits...Urgent Please

Postby giulian » Sat Sep 17, 2011 11:01 am

i test soon thks for you re job

raffael
.
Posts: 51
Joined: Thu Aug 16, 2007 12:25 am

Re: Bug: Joker limits...Urgent Please

Postby raffael » Tue Sep 20, 2011 12:36 am

This solution is not complete as I have found out lately. One can set more Jokers but he will have the warning (and lock) on next change to the same matchday.

raffael
.
Posts: 51
Joined: Thu Aug 16, 2007 12:25 am

Re: Bug: Joker limits...Urgent Please

Postby raffael » Wed Sep 21, 2011 4:43 pm

Ha! I've found the real cause of all the hassle :)

The problem is that during the check there is something like this:

Code: Select all

if(document.formName.jokerCount.value > document.formName.maxJokerCount.value)


after looking at it more thoroughly it occured to me that it was comparing strings, not numbers.

So using parseInt() saved the day :)
Now it's

Code: Select all

if(parseInt(document.formName.jokerCount.value) > parseInt(document.formName.maxJokerCount.value))


Edit it on Your own file ["default_view_tippentry_do.php" in path "com_joomleague\extensions\predictiongame\views\predictionentry\tmpl"] or get the attached file.

So, does it work finally? Yes it does work as it was intended to.
Is it safe and secure? No, it's flawed by design as I stated early here: viewtopic.php?f=108&t=14136
You do not have the required permissions to view the files attached to this post.


Return to “Predictiongame / Tipspiel”

Who is online

Users browsing this forum: No registered users and 1 guest