Jeremy I apologize for posting that on the other issue.
I checked and the list check box is in fact checked, shows:
"Unable to mark ad as active as you have not uploaded any valid images. Setting ad as pending."
Jeremy I apologize for posting that on the other issue.
I checked and the list check box is in fact checked, shows:
"Unable to mark ad as active as you have not uploaded any valid images. Setting ad as pending."
Comments
Comment #1
jeremy commentedThat message will only be displayed if $node->fid is set to 0. I'm not sure why it would ever be 0 if you have an image uploaded.
I assume you've tried uploading another image?
Perhaps you can edit the ad_image.module and add the following block of code at line 394 (my snippet includes lines 392 and 393 to show you where this goes):
Now submit the ad again and you'll get a data dump of your node structure. Please paste that here.
Comment #2
Gentoo7 commentedComment #3
Anonymous (not verified) commentedI do notice the same problem.
Could it be related to private images option? That is the setting I currently use.
Comment #4
jeremy commentedYes, you are correct, the issue is with the private download method. Now that I can duplicate this I will look into a proper fix. Thanks for the bug report.
Comment #5
Gentoo7 commentednp,
so no ads for me till bug is fixed
Comment #6
jeremy commentedA workaround until I am able to look into this: you can temporarily disable private download, upload all your ad images, then re-enable private downloads. In my brief testing, this seems to work.
Of course, I do plan to ultimately implement a proper fix.
Comment #7
Gentoo7 commentedthanks jeremy, you the man!
Comment #8
appds commentedHello, please, where I should go to "disable private download" ?
Comment #9
jeremy commentedadminister >> settings >> File system settings >> Download method
Comment #10
j_norwood_young commentedHi there
This is my first Drupal posting - I'm pretty new to all of this.
I found a problem with the Advertising module in version 5 in the ad_image_load_image function. The $node->files data is being accessed as an object, although it's actually an array. The function should actually be as follows:
After I made that change, I had no hassle with it claiming that I didn't have an image.
Comment #11
dru5sher commentedSorry I am not sure how I can set it up here to be notified about developments about this issue, so I just post a message here and hope that I will then be notified.
Thx.
Comment #12
jeremy commentedI have applied a fix for the private download issue to the 4.7.x and 5.x development trees. The fix will also be part of -beta9 which I hope to release within an hour.
Comment #13
dru5sher commentedWow what a quick response, thanks a lot Jeremy!!!
Comment #14
j_norwood_young commentedDown the rabbit-hole we go. Once I'd done the change above, adverts were getting set as width=0, height=0 when I viewed them through the adserver. I eventually figured out that for some reason, when editing a node, the $node->files is type array, but at other times (like viewing the advert) it is type object. I guess it's a Drupal bug or something. Here's new code that checks which type it is and sets the size correctly:
Comment #15
jeremy commentedj_norwood_young, please do not clutter existing bug reports with new bug reports, open new issues instead. Appending additional issues to existing issues just confuses things.
In any case, the bug you are reporting is already fixed and will be part of -beta9. If you still have problems with -beta9, open a new issue.
Comment #16
j_norwood_young commentedSorry Jeremy - like I said I'm new to all this. I thought it might be the cause of the bug because it was responsible for the "Unable to mark ad as active as you have not uploaded any valid images. Setting ad as pending" error. Also I thought it would be best to have the working code near my previous post, which caused its own bugs. In future I'll open new bug posts. Any other tips for a Drupal newbie?
Thanks
Jason
Comment #17
appds commentedThank you so much Jeremy!
Problem fixed! ;-)
Comment #18
Gentoo7 commentedhey jason, take it easy on my man Jeremy, he's helping everyone fast as hell, so take a chill pill.
Comment #19
Anonymous (not verified) commentedWell done!
Thanks for your quick solution!
Joep
Comment #20
(not verified) commented