When I go to edit a node that has a repeating date option, I get the WSOD. The error it is throwing is

Fatal error: Call to undefined function date_repeat_after_build() in /[blocked]/includes/form.inc on line 1787

Forgive me if this has already been addressed. I looked through the queue, but didn't see this specific error.

Thank you!

Comments

arlinsandbulte’s picture

Status: Active » Postponed (maintainer needs more info)

I cannot reproduce this issue.
Created a repeating date on a node. Edited the node. No Problems.

Please, follow the debug steps here: http://drupal.org/node/755312

Anonymous’s picture

Same problem, tried debug steps, problem remains…

brandy.brown’s picture

Status: Postponed (maintainer needs more info) » Active

Yes the problem still persists. I now see that it is throwing that error on the node/add page as well.

arlinsandbulte’s picture

Status: Active » Postponed (maintainer needs more info)

As I said, I could not reproduce the problem.
We need instructions on how to reproduce the problem, preferably starting from a clean Drupal install.

Until the issue can be reproduced, there is nothing we can do.

brandy.brown’s picture

Status: Postponed (maintainer needs more info) » Active

OK. I didn't have the repeat field option enabled under modules. I enabled it, created a new field. On the first try it doesn't save the data in that field and then it redirects to the same node/edit form. Consequently, I now am receiving this error

Fatal error: Call to undefined function element_validate_integer_positive() in includes/form.inc on line 1336

Which I see a closed ticket for...
I'll keep investigating.

KarenS’s picture

Status: Active » Fixed

If you are seeing "undefined function element_validate_integer_positive()" you are using an outdated version of core. Get core current and things should work fine.

ironkiat’s picture

I encountered this problem too, so what I did was activate all the relevant date repeat api and repeat field module, the error is gone after that.
See Screenshot

fleepp’s picture

worked for me. I only had to activate "date repeat field".
thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Paulraj Augustin’s picture

Issue summary: View changes

Myself too... Enabling date repeat field module has worked for me. Thanks

Breakerandi’s picture

Sorry, but this is not real fixed. Activating the module if you don't need it is always not a good solution due to performance reasons..

bisonbleu’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active

Reopening - I'm also running into this issue. Currently, the only way out is to leave date_repeat and date_repeat_field enabled. Disabling these modules leads to a fatal error.

Fatal error: Call to undefined function date_repeat_after_build() in /Applications/MAMP/htdocs/mysite/includes/form.inc on line 1914

Lord Pachelbel’s picture

Today I turned on date_repeat and date_repeat_field as an experiment and decided I didn't need them, so I disabled them, and that triggered this error.

How to reproduce:

  1. enable the date_repeat and date_repeat_field modules
  2. add a date field to a content type, e.g. Basic Page
  3. set the date field's "Repeating date" field to Yes
  4. disable date_repeat_field
  5. create a Basic Page node (or whatever content type you added the date field to)

If you set the field's "Repeating date" field to No before disabling date_repeat_field, things will work fine.

The error happens in date_elements.inc inside the date_field_widget_form() function:

if (!empty($field['settings']['repeat'])) {
  if ($delta == 0) {
    $form['#after_build'][] = 'date_repeat_after_build';
    $form_state['storage']['repeat_fields'][$field_name] = array_merge($form['#parents'], array($field_name));
    $form_state['storage']['date_items'][$field_name][$langcode] = $items;
  }
  else {
    return;
  }
}

Even after uninstalling the modules, not just disabling them, that if-statement was evaluating true because not only is $field['settings']['repeat'] not empty, it contains the value 1 if you leave the "Repeating date" set to Yes before disabling the module. So this quick patch didn't work:

if (!empty($field['settings']['repeat'])  && $field['settings']['repeat'] == TRUE) {

But this one did:

if (!empty($field['settings']['repeat'])  && module_exists('date_repeat_field')) {

I'm not sure if it's desirable or not to leave data from the module hanging around after it's uninstalled, but that's basically why this error is happening.

Incidentally, enabling date_repeat_field for the first time causes this one-time error: Notice: Undefined index: repeat in date_repeat_field_bundles() (line 189 of /sites/all/modules/date/date_repeat_field/date_repeat_field.module). which is like the inverse of this issue.

Lord Pachelbel’s picture

When I cloned the Git repo for the dev version of this module, the exact code I came up with was already there. So this issue has already been fixed at some point.