I am posting this as a step back from my post on #411666: Ad items added to channels not displayed at all if "specific URLs" is used. I get the above error and cannot set an ad to active. I have tried moving ad groups, setting it to none, then stepping it up to active. I manually set it to active in Mysql and the script set it back to pending. This is a remotely hosted image so I am not sure if it is trying to validate an image that is not existent.

I had commented out this entire block and was able to set an add as active, but not sure what else this affected:

if ($op == 'insert') {
db_query("INSERT INTO {ad_image} (aid, fid, url, tooltip, remote_image, width, height) VALUES(%d, %d, '%s', '%s', '%s', %d, %d)", $node->nid, $node->fid, $node->url, $node->tooltip, $node->remote_image, isset($node->width) ? $node->width : 0, isset($node->height) ? $node->height : 0);
}
else {
db_query("UPDATE {ad_image} SET fid = %d, url = '%s', tooltip = '%s', remote_image = '%s', width = %d, height = %d WHERE aid = %d", $fid, $node->url, $node->tooltip, $node->remote_image, isset($node->width) ? $node->width : 0, isset($node->height) ? $node->height : 0, $node->nid);
}
// No valid image has been uploaded, don't allow ad to be 'active'.
if ($image === FALSE || !ad_image_active_file(($node->files))) {
db_query("UPDATE {ads} SET adstatus = '%s' WHERE aid = %d AND adstatus = '%s'", t('pending'), $node->nid, t('active'));
if (db_affected_rows()) {
drupal_set_message(t('Image validation failed, unable to mark ad as %active. Setting ad as %pending.', array('%active' => t('active'), '%pending' => t('pending'))), 'error');
}
}
else if (!$node->remote_image && !$fid) {
db_query("UPDATE {ads} SET adstatus = '%s' WHERE aid = %d AND adstatus = '%s'", t('pending'), $node->nid, t('active'));
if (db_affected_rows()) {
drupal_set_message(t('Unable to mark ad as active until uploaded image is validated. If you do not see any more errors, you should now be able to set your ad as active.'), 'error');
}
}

If I can get to the point where I can add ADs without hacking the code, I will next go to the showing adds only on specified pages.

Thanks for the quick response.

Dave

Comments

Also, I can create and set a text ad as Pending, approved AND active..

Status:Active» Postponed (maintainer needs more info)

Does the problem go away if you disable the ad_channel and ad_weight_probability modules? If so, get the latest code as it may be fixed by this issue:
#436234: CCK nodes do not save on initial creation when ad_channel or ad_weight_probability is enabled

Status:Postponed (maintainer needs more info)» Fixed

I finally duplicated this, a fix has been committed.

Status:Fixed» Closed (fixed)

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

I am receiving this error "Image validation failed, unable to mark ad as active." and wondering if the fix mentioned above has been
implemented and for what version/build ?

thanks

Image validation failed, unable to mark ad as active. Setting ad as pending.
Same issue

Image validation failed, unable to mark ad as active. Setting ad as pending. Getting Same

I'm getting the same, I have gone thru every ticket I can find on this similar issue with others recommendations and it just does not work. My only way to make this happen is to try commenting out sections of the code as per the OP.

same here