Unable to create or edit banner
marcelovb - July 5, 2006 - 00:17
| Project: | Advertisement |
| Version: | 4.7.x-1.x-dev |
| Component: | ad module |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
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

#1
Do you get the same error if you disable all publishing options for one of the built-in content types (page, story)?
#2
Yeah, I get the same errors.
Jim
#3
According 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?
SELECT * FROM VARIABLE WHERE NAME LIKE 'node_options%';#4
I get the same errors using the CVS install as of a few minutes ago, but I can create banners without a problem.
#5
I 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.
#6
from 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
#7
Making 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
#8
I 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.
#9
jwilde: 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.
#10
You have to enable E_NOTICE error reporting in php.ini to see those, I believe...
#11
I have error_reporting set to E_ALL on my development server.
#12
I'm on PHP version 4.3.11
#13
Was there a solution to this problem, because I am having the same issue.
Thanks,
Sean
#14
banner is dead, long live ad.