Closed (fixed)
Project:
Bio
Version:
5.x-1.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2007 at 11:30 UTC
Updated:
5 Dec 2008 at 03:28 UTC
Jump to comment: Most recent file
Hi,
I just installed the actual dev version of bio, applied the patch "The first argument should be an array" and got another warning:
"Wrong datatype for second argument in ... bio_views.inc on line 111"
The fields mentioned further down in this warning are all cck text fields (2 x text, 1 x date). My modules are all up-to-date.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | bio-views-error-190745-14.patch | 607 bytes | webchick |
| #13 | bio-views-error-190745-13.patch | 1.54 KB | webchick |
Comments
Comment #1
kriskd commentedI'm getting the same errors too.
Comment #2
michelleMe too in 1.1, not dev.
Michelle
Comment #3
webchickWell that's no good. ;P
Comment #4
webchickAlso moving to a more specific version number.
Comment #5
michelleSome trouble shooting.
The first error is:
warning: array_keys() [function.array-keys]: The first argument should be an array in snip/sites/all/modules/bio/bio_views.inc on line 39. That's this bit:
And that's called from here:
If I'm understanding correctly, this will only happen if both views and cck are enabled before bio.
Michelle
Comment #6
grantkrugerThat's the case with me too. Is there any workaround?
Here are my errors:
Comment #7
Mark Theunissen commentedSame problem here.
Comment #8
webchickHm. I can't duplicate this. :(
Could you try against the newly created as of tonight 5.x-1.2 release?
Comment #9
webchickAnd if it's still a problem, can you please give me explicit, step-by-step instructions on how to reproduce?
Comment #10
Mark Theunissen commentedHi Angie
I've tried version 1.2 and I still get the barf... :(
I think these steps should reproduce:
1) Enable
- CCK 5.x-1.6-1
- Views 5.x-1.6
2) Make a view or two, not sure if that makes a difference.
3) Enable the Bio module
Error:
warning: in_array() [function.in-array]: Wrong datatype for second argument in bio_views.inc on line 137.
Sometimes there are many of these errors, sometimes just the one.
From looking at the code, I would say it's happening because $bio_fields has not been initialized to anything when it is passed to the in_array() function on line 137.
It's not being initialized because the CCK type for Bio is not created. This initialization happens on line 49.
Just a guess... ;)
Cheers
Mark
Comment #11
michelleI'm having the same issue and I plan on doing a clean install of advprofile later today, which will hit the error again. I'll put in some debugging code and see if I can figure it out for you. If you look at #5, you can see that content_types($bio_type) isn't returning what it should. I'll dig in a bit to find out why.
Michelle
Comment #12
webchickFrom Michelle on IRC:
My test results were the same.
So I say again, can someone post stupidly explicit instructions on how to reproduce in 5.x-1.2?
Comment #13
webchickMargh! Somehow in between uninstalling and trying a bunch of other things, I did manage to reproduce this once. But have no idea what I did and can't get it to do it again. :(
But could you try testing this patch, perhaps?
Comment #14
webchickAnd by "this patch," I actually meant this one. :P
Comment #15
Mark Theunissen commentedHey Angie
I can confirm that the patch removes the error messages! No more barf..
Thanks for that
Mark
Comment #16
ryo commentedThe patch worked for me, too.
Thanks!
Comment #17
webchickOk, great. Committed. Will be part of the 5.x-1.3 release. Thanks for the tests!
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #19
dugh commentedCan you go ahead and release 1.3.
This error still exists.
Comment #20
darkpollo commentedI have got the same error.
Comment #21
bonobo commentedOkay -- completely bizarre -- I saw this exact same error with bio 5.x-1.2.
Uninstalled bio (inlcuding the uninstall step at admin/build/modules/uninstall ) and then cleared the cache tables. Then, when I reinstalled bio, I saw no errors.
Same codebase, same db. The only changes I made were to disable the module at admin/build/modules; uninstall the module at admin/build/modules/uninstall, clear the cache* tables in the db, and then re-install the module. Poof! error gone.
Comment #22
dugh commentedComment #23
Sven_S commented# 22 :
Good idea! I did the same ... and it works ...
Comment #24
henrrrik commented# 22 :
So did I.
Comment #25
bonobo commentedSetting to fixed as this has been dormant for a while, and a documented workaround exists.
Comment #26
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #27
radyaweb commentedThanks the first patch worked for me.
The second patch is the same as the first patch, so if you already patch with the first one, you don't need to use the second one.