Closed (won't fix)
Project:
Advertisement
Version:
4.7.x-1.x-dev
Component:
ad module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2006 at 00:17 UTC
Updated:
28 Apr 2008 at 22:39 UTC
When trying to create or edit a banner the following message displays in the top of the page:
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
Repeated 5 times.
And the banner is not created.
Trying it on a Drupal 4.7.2. There are more people on the same situation as seen on http://drupal.org/node/66063
Comments
Comment #1
wulff commentedDo you get the same error if you disable all publishing options for one of the built-in content types (page, story)?
Comment #2
jwilde commentedYeah, I get the same errors.
Jim
Comment #3
wulff commentedAccording to the line of code mentioned above, it seems like something is wrong with the node_options_banner variable.
What is the output of the following query on your system?
Comment #4
Steel Rat commentedI get the same errors using the CVS install as of a few minutes ago, but I can create banners without a problem.
Comment #5
thetoast commentedI find that whenever you get an in_array error, if you locate the error line in the file that is mentioned and then change in_array to array then this seems to solve the problem.
Comment #6
jwilde commentedfrom SELECT * FROM `variable` WHERE NAME LIKE 'node_options%';
a:2:{i:0;s:6:"status";i:1;s:7:"promote";}
I fixed the with arrays by turning published in admin/seeting/content type. Thank you.
But, I am not able to display the block.
I ran, SELECT * FROM variable WHERE name LIKE 'banner_block%';
name value
Edit Delete banner_blocks s:1:"5";
Edit Delete banner_block_0_count s:1:"1";
Edit Delete banner_block_0_position s:1:"1";
Edit Delete banner_block_1_count s:1:"1";
Edit Delete banner_block_1_position s:1:"1";
Edit Delete banner_block_2_count s:1:"1";
Edit Delete banner_block_2_position s:1:"0";
and with SELECT nid, vid, position FROM banner;
Showing rows 0 - 0 (1 total, Query took 0.1256 sec)
30 29 1
any ideas.
Thanks,
Jim
Comment #7
jwilde commentedMaking progress. I made the assumption that killes pathe was in the cvs version of banner since the date of the last update was the same as killes patch. The patch did not make it in. After patching banner.module and banner_file.php the ads displayed.
My testing is limited but one problem I notied is that the stats, clicks, views, percents, are not working.
Jim
Comment #8
Steel Rat commentedI can create banners, display them within the content area, and the clicks and such all seem to work fine, I just get the In_array errors mentioned originally.
Comment #9
wulff commentedjwilde: Re the stats: Are you taking into account that admin and owner clicks/views are not counted?
I can't seem to reproduce the in_array error. Which version of PHP are you using? I'll have to try and install and see if I can find out what is happening.
Comment #10
bdragon commentedYou have to enable E_NOTICE error reporting in php.ini to see those, I believe...
Comment #11
wulff commentedI have error_reporting set to E_ALL on my development server.
Comment #12
Steel Rat commentedI'm on PHP version 4.3.11
Comment #13
newms commentedWas there a solution to this problem, because I am having the same issue.
Thanks,
Sean
Comment #14
bdragon commentedbanner is dead, long live ad.