I get this error when:
1) I try to preview without and uploaded image with an uploaded video, but in reverse it fine.
2) I try to save it with just the image or video and in addition I get the White Screen w/this url http://drupal7.com/node/59/edit
3) I try to save it with no fields populated and in addition w/the White Screen.

[Wed Jul 13 17:29:59 2011] [error] [client 192.168.0.101] PHP Fatal error:  Call to undefined function mediafront_field_is_empty() in /media/webserverdocs/7/development/drupal-7.4/modules/field/field.module on line 489, referer: http://drupal7.com/node/59/edit?render=overlay&render=overlay

Using Firefox....

Comments

travist’s picture

Status: Active » Closed (won't fix)

This function does not exist in the mediafront module. Did you have some custom code using this function? Otherwise, this is probably not something I can fix.

Vc Developer’s picture

I made no custom functions, it does this when I don't have the required flag set and my Node Type fields is like this:

name:video_upload field:[File] widget:[File]
......video_image....[Image]....[Image]
......osplayer...........[Media Player]....[Media Player]

Why does it call this none existed function? I just tested it and came up with the same results as above. Is this function code holding a function that needs to be use to validate the node's fields for the Media Front Player?

file.module:

    // Uploads take priority over all other values.
    if ($file = file_managed_file_save_upload($element)) {
      $fid = $file->fid;
    } <---------------------------------------------- line 489  why is it referring to a mediafront_field_is_empty() function?
    else {
      // Check for #filefield_value_callback values.
      // Because FAPI does not allow multiple #value_callback values like it
      // does for #element_validate and #process, this fills the missing
      // functionality to allow File fields to be extended through FAPI.
      if (isset($element['#file_value_callbacks'])) {
        foreach ($element['#file_value_callbacks'] as $callback) {
          $callback($element, $input, $form_state);
        }
      }

This isn't making any sense that I can't find this function in any of the mod's, but it says its there and its breaking my site.
Steps to reproduce this is:
1) Create the fields above and leave the default settings
2) Create the content and just name the title.
3) Preview it (nothing to preview)
4) Save it. (I can save it before a preview and everything is fine)

It's really not a biggy if I make the fields required, but if someone wanted to save it for later after doing the above, they would get this critical bug. Do I send this to the File.Module Issue Cue?

Vc Developer’s picture

Actually it does this every time when I try to save it after a preview even with the fields populated. I will forward this to the file.module also.

webchick’s picture

Status: Closed (won't fix) » Active

I think the problem is that this function doesn't exist. It's part of the interface for defining a field.

See http://api.drupal.org/api/drupal/modules--file--file.field.inc/function/... for an example implementation.

travist’s picture

Assigned: Unassigned » travist

Thanks Angie,

I will get a release out that adds this function.

travist’s picture

Status: Active » Fixed

Just committed a fix for this. Will be in the next version.

Thanks,

Travis.

Status: Fixed » Closed (fixed)

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

NenadP’s picture

Sorry to reopen this, just to pass a useful info (to someone with same scenario).
I had same issue after upgrading from 1.5 to 2.0 .
Problem was, i have not deleted old hacky field in content type, that Travis removed in new version of module.
When i removed that field, everything was fine again.