I just got a fatal error while manually running a cron.php from the link on the admin/build/block page.

Fatal error: Cannot redeclare signup_reminder_sql() (previously declared in /apache/example.com/sites/all/modules/signup/signup_event_5.x-1.inc:10) in /apache/example.com/sites/all/modules/signup/signup_event_5.x-1.inc on line 16

I threw it in here until I can figure out why it's being caused and then I'll write a followup.

Comments

senpai’s picture

It's repeatable on my 5.2 site by using the admin/logs/status/run-cron link found on the admin/logs/status page. All systems are green, all modules are up-2-date, and db schema is fine. More info as I have it.

senpai’s picture

I cannot figure out why it's making this error. Somebody ask me a question and I'll troubleshoot the answer for you.

gerhard killesreiter’s picture

in function _signup_initialize_event_backend pleae change include() to include_once()

senpai’s picture

Assigned: Unassigned » senpai
Status: Active » Needs review
StatusFileSize
new478 bytes

Patch attached, thanks to killes' good eye. I hope this is right?

senpai’s picture

The patch I attached only addresses the first line of code, but the entire function has three more include() statements in it. Here, look for yourself:

function _signup_initialize_event_backend() {
  define('SIGNUP_PATH', drupal_get_path('module', 'signup'));
  if (defined('EVENT_API') && EVENT_API == '5.2') {
    include_once(SIGNUP_PATH .'/signup_event_5.x-2.inc');
  }
  else if (module_exists('event')) {
    include(SIGNUP_PATH .'/signup_event_5.x-1.inc');
  }
  else if (module_exists('date')) {
    // include(SIGNUP_PATH .'/signup_date.inc');
    // Until date.module support exists, fall back to the no event case.
    include(SIGNUP_PATH .'/signup_event_none.inc');
  }
  else {
    include(SIGNUP_PATH .'/signup_event_none.inc');
  }
}

Should I change those to include_once() as well?

senpai’s picture

Priority: Minor » Normal

Following up to my own follow-up.

Changing all the lines from include() to include_once() doesn't fix the fatal error that is triggered during a manual cron run. Site is D5.2, and module is 5.x.2-2. Also using Event 5.x-1.0.

senpai’s picture

StatusFileSize
new443 bytes

The first patch was wrong. Don't use it. This is the correct one. it was an include_once, but not the one I suspected.

jdy98p’s picture

Would this be related to the problem I am having at http://drupal.org/node/171363 in the signup.theme file?

dww’s picture

Component: Database » Code
Assigned: senpai » dww
Status: Needs review » Fixed

I just committed a change to convert *all* occurances of include() into include_once() in signup.module (http://drupal.org/cvs?commit=79906). That should fix everything.

dh@tbed.org’s picture

thanks. for those of us not comfortable with cvs, when will this fix make the official release or even the "all releases" link? i had to disable signup because this bug was preventing poormanscron from executing properly. thank you.

dww’s picture

it'll be in an official release the next time i make another official release release (in this case, 5.x-2.3). no idea how soon that will be -- depends on what other bugs are fixed or new features are added. however, IMHO, this alone isn't enough of a bug to warrant a new release.

Anonymous’s picture

Status: Fixed » Closed (fixed)
dh@tbed.org’s picture

With respect, your answer #11 above seems to pertain to when you would post an "official release" containing the fix, which certainly makes sense. Meantime, is there any chance you can post an interim version of the module with this fix under the "all releases" page? Thank you.