problem with datapicker

Questions about how to maintain your Zuluru installation

problem with datapicker

Postby hjirms » Sun Jul 20, 2014 3:24 am

I have installed zuluru successfully but I am having a problem while adding a league. The website mysql does not seem to recognise the values sent the by the datapicker.js

Each time I try to add a league, I get the following error:

Warning (512): SQL Error: 1364: Field 'open' doesn't have a default value [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
Query: INSERT INTO `leagues` (`affiliate_id`, `sport`, `season`, `is_open`, `schedule_attempts`, `display_sotg`, `stat_tracking`, `tie_breaker`, `name`, `sotg_questions`, `numeric_sotg`, `expected_max_score`) VALUES (1, 'soccer', 'Summer', 0, 100, 'all', 'never', 1, 'League 1', 'none', 0, 17)

As you can see, the mysql does not get any values from the league open dates although I have entered the right dates.
hjirms
 
Posts: 9
Joined: Fri Jul 18, 2014 3:11 pm

Re: problem with datapicker

Postby GregS » Sun Jul 20, 2014 12:38 pm

Can you confirm that the type of the "open" column in the "leagues" table of the database is "date"? (I can't imagine why it wouldn't be, but if it's something else that would explain this nicely.)

Assuming that it is, can you change the debug setting in config/core.php to 2 (it might already be), and add the line "pr($this->data);" around line 240 of controllers/leagues_controller.php (right after "if (!empty($this->data)) {" is a good spot) and post the data you get from that?
GregS
Site Admin
 
Posts: 234
Joined: Thu Jan 06, 2011 4:58 pm

Re: problem with datapicker

Postby hjirms » Sun Jul 20, 2014 8:04 pm

Thanks for your help Gregs,
I have checked the type for open and close and it is date. Here is the error that I get now after the addition with debug level 2
Array
(
[League] => Array
(
[name] => Football for All
[affiliate_id] => 1
[sport] => soccer
[season] => Summer
[Day] => Array
(
[0] => 7
)

[schedule_attempts] => 100
[sotg_questions] => none
[numeric_sotg] => 0
[display_sotg] => all
[tie_breaker] => 1
[expected_max_score] => 17
)

[Division] => Array
(
[name] => Football for All
[coord_list] =>
[capt_list] =>
[header] =>
[footer] =>
[open] => Array
(
[month] => 08
[day] => 08
[year] => 2014
)

[close] => Array
(
[month] => 09
[day] => 28
[year] => 2014
)

[roster_deadline] => Array
(
[month] => 08
[day] => 06
[year] => 2014
)

[ratio] => mens
[roster_rule] =>
[roster_method] => invite
[flag_membership] => 0
[flag_roster_conflict] => 1
[flag_schedule_conflict] => 1
[schedule_type] => none
[exclude_teams] => 0
[double_booking] => 0
[rating_calculator] => none
[email_after] => 0
[finalize_after] => 0
[allstars] => never
[allstars_from] => opponent
)

[q5] => 0
[q6] => 0
[q7] => 0
[q8] => 0
[q1] => 1
[q2] => 2
[q3] => 2
[q4] => 2
)
Warning (512): SQL Error: 1364: Field 'open' doesn't have a default value [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
Query: INSERT INTO `leagues` (`affiliate_id`, `sport`, `season`, `is_open`, `schedule_attempts`, `display_sotg`, `stat_tracking`, `tie_breaker`, `name`, `sotg_questions`, `numeric_sotg`, `expected_max_score`) VALUES (1, 'soccer', 'Summer', 0, 100, 'all', 'never', 1, 'Football for All', 'none', 0, 17)
hjirms
 
Posts: 9
Joined: Fri Jul 18, 2014 3:11 pm

Re: problem with datapicker

Postby GregS » Sun Jul 20, 2014 11:00 pm

How strange that nobody has reported this before! Maybe a bug introduced fairly recently, as I have done some improvements to how leagues and divisions work together. This bug and a related one are now fixed, just pull the latest version from github and you should be good to go.
GregS
Site Admin
 
Posts: 234
Joined: Thu Jan 06, 2011 4:58 pm

Re: problem with datapicker

Postby hjirms » Mon Jul 21, 2014 2:05 am

Thank you Gregs,
Now I can easily add leagues and divisions
hjirms
 
Posts: 9
Joined: Fri Jul 18, 2014 3:11 pm


Return to Administration

Who is online

Users browsing this forum: No registered users and 1 guest

cron