I get this error when trying to run cron now and as a result i am not able to get League Standings working:

Fatal error: Call to undefined function now() in ....\ULT\modules\ult_matches\ult_matches.module on line 1496

Anyone had a similar issue and resolved it?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hitman007’s picture

Ok, did some trial-and-error investigation and realise that this issue is directly related to http://drupal.org/node/1214358

Firstly, I removed the code now() from line 1496 of the file ult_matches.module. I then ran cron and it worked but got the error as in http://drupal.org/node/1214358 and then I disabled the module ULT Registration and that worked to get League Standings working.

jthorson’s picture

hitman007:

I've fixed the now() function with the latest commit to 6.x-1.x.

Have you activated the ult_divisions module? If not, I suspect that enabling and disabling the ult_divisions module may help get around the missing table issue identified in #1214358: Standings problem.

jthorson’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
963 bytes

hitman007:

Please try this patch (along with 6.x-1.x) and let me know if it resolves the issue, allowing you to use both the ult_registrations and ult_standings modules simultaneously.

LiCra’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc1

I have the same type of issue I believe, I have setup a league, teams and some players. have not attached players to a roster yet and I have not added any games to create standings. When cron runs, it reports:
user warning: Unknown column 'field_ult_leaguestatus_value' in 'where clause' query: Select nid from content_type_ult_division where field_ult_leaguestatus_value = "Active" in /sites/all/modules/ULT/modules/ult_standings/ult_standings.module on line 370.

Would this patch fix this issue?

jthorson’s picture

The patch in #3 should already be in place for anything after 6.x-1.0-alpha5 (including rc1).

The root cause here is the use of direct SQL queries instead of proper use of the Field API commands (a terrible habit I have since corrected, but haven't backported to ULT). Can you verify that the 'ult_leaguestatus' field exists on the ult_divisions content type?

LiCra’s picture

ah, okay. let me look.... no,
'ult_leaguestatus' does not exist as a field on the Divisions content type