Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I am getting the below error on page http://www.example.com/admin/content/types/profile/profile
warning: Invalid argument supplied for foreach() in /home/example/public_html/includes/form.inc on line 1207
Can anyone please assist?
Comment | File | Size | Author |
---|---|---|---|
#17 | autoassignrole-761748-17.patch | 636 bytes | cyberswat |
#15 | autoassignrole_0_fixed.patch | 480 bytes | patcon |
#14 | autoassignrole_0_fixed.patch | 480 bytes | patcon |
#11 | autoassignrole.patch | 476 bytes | mwisner |
Comments
Comment #1
YK85 CreditAttribution: YK85 commentedThe error looks to be coming from this part.
I would really appreciate someone's help in fixing this bug.
Thank you!
Also, I am using Drupal 6.16 and didn't use to see this error message back in Drupal 6.15
Thanks!
Comment #2
obibas CreditAttribution: obibas commentedThanks for all of your help here, I have experienced the same problem since I am using drupal 6.16.
If I got all my modules uninstalled it works fine. But when I am installing the content profile module I get the same warning: Invalid argument supplied for foreach() in \includes\form.inc on line 1207. This warning is shown on my content profile admin page. Some help would be appreciated.
Comment #3
patcon CreditAttribution: patcon commentedHey guys, it seems that this might be a duplicate of #707008: Compatibilty issue with Auto Assign Role(?) warning message and #730472: Use on Auto Assign Role paths, but I'll mark this one as the main one... I don't suppose anyone else has Auto Assign Roles installed?
I'm getting the same issue on the same line as your guys, and the guy in the other thread was getting the same thing 14 weeks ago in the dev build.
I've done a fresh install, and only activated these modules:
Administration menu 6.x-1.5
Content 6.x-2.6
Content Profile 6.x-1.0
Path 6.16
Auto Assign Role 6.x-1.2
I still get it, so it seems pretty basic. It also shows up on content profile pages aside from the default, ie.
.../custom_profile/profile
Finally, when I inactivate Auto Assign Role, the error goes away.
Seems like it has to do with this checkbox array
Line 1207 is this one:
foreach ($form['#default_value'] as $key) {
so it seems it has to do with a lack of default? Guy in other thread just reverted to v1.1 and things worked fine... I'll try to dig up the change...
Comment #4
patcon CreditAttribution: patcon commentedFirst error was as early as Feb 7th, so checking CVS repository for relevant changes...
Big commit right after 6.x-1.1 was released... don't think I'll have time to look through tonight...
http://drupal.org/cvs?commit=267554
Comment #5
kennyh CreditAttribution: kennyh commentedHi, just to pitch in that I'm facing exactly the same problem described above by patcon. As in his case, when I disable Auto Assign Role the error message disappears.
Thanks
Comment #7
DrupT CreditAttribution: DrupT commentedI face the same problem and can confirm kennyh's comment
thanks
Comment #8
fagosounds like an auto assign role bug then.
Comment #9
JThan CreditAttribution: JThan commentedJust subscribing as I am that "Guy from the other Thread" and want to see where this ends up.
Comment #10
rotoheni_09 CreditAttribution: rotoheni_09 commentedHi same problem. Hoping this can get sorted as it sounds like a really useful module.
Comment #11
mwisner CreditAttribution: mwisner commentedHello,
Attached is a patch that I believe will resolve this issue. This is my first attempt ever at submitting a patch, (so i'm not sure if it's done correctly or not) In case it doesn't work, here is the fix:
Basically, the autoassignrole_use content profile setting must be defined in hook_content_profile_settings.
Currently, autoassignrole's implementation of this hook looks like this:
I found that by adding an additional line to define autoassignrole_use seems to have fixed the issue:
Comment #13
patcon CreditAttribution: patcon commentedHey mwisner,
I still have to get in the groove with SimpleTest as well, so I feel your pain. I think the issue with the fail was that you submitted a patch with the autoassignrole module directory changed to "autoassignrole-fixed" :)
Comment #14
patcon CreditAttribution: patcon commentedresubmitting, if nothing else than just to test my understanding of SimpleTest...
Comment #15
patcon CreditAttribution: patcon commentedAaaaaand... do-over.
Comment #17
cyberswat CreditAttribution: cyberswat commentedComment #18
cyberswat CreditAttribution: cyberswat commentedJust an fyi ... if you need help with generating these patches I tend to find the cvs instructions linked off the main project pages for each module is invaluable ... http://drupal.org/node/138844/cvs-instructions/DRUPAL-6--1 is the specific one for this particular branch of this module.
Comment #20
cyberswat CreditAttribution: cyberswat commentedIt looks like the patch failed but it may it looks more like the tests need to be updated in the dev branch vs the code change that you implement here actually breaking anything. I don't know enough about content_profile to be able to say if this is a good approach or not so am relying on the participants of this thread to help validate. If anyone wants to try and help update the SimpleTests themselves that would be great to ;)
Comment #21
cyberswat CreditAttribution: cyberswat commentedComment #22
ITMonkey CreditAttribution: ITMonkey commentedsubscribing =)
Comment #23
fayola CreditAttribution: fayola commented#15: autoassignrole_0_fixed.patch queued for re-testing.
Comment #24
fayola CreditAttribution: fayola commented#14: autoassignrole_0_fixed.patch queued for re-testing.
Comment #25
babycourageous CreditAttribution: babycourageous commented*subscribing as I face the issue as well.
Comment #26
barry769 CreditAttribution: barry769 commented*same problem, no solution.
Comment #27
patcon CreditAttribution: patcon commentedSorry guys, if it wasn't clear before, rolling back to v1.1 solves the problem. Not ideal But works in a pinch!
Comment #28
alexmoreno CreditAttribution: alexmoreno commenteddev version works perfect autoassignrole-6.x-1.x-dev.tar.gz
Comment #29
patcon CreditAttribution: patcon commentedThank urwen. Can anyone verify? I'll check when I get the chance, and report here, then maybe we could switch this to resolved
Comment #30
victorkane CreditAttribution: victorkane commented@patcon Yes, I can verify that upon replacing 6.x-1.2 with 6.x-1.x-dev information "sticks" (associating a content profile content type with a with a role path by editing the Content Profile tab of the content type). Selecting the checkbox and hitting Submit brings up "Your changes have been saved." with no error message, and selection "sticks". Also seems to have solved 699888.
Comment #31
thommyboy CreditAttribution: thommyboy commentedis the 1.xdev really working for you guys? i get "Illegal offset type in.." now instead of the old error. going back to 6.x-1.1 works for me though but throws an "security update required"...
Comment #32
calefilm CreditAttribution: calefilm commentedI'm getting this too, thommyboy--man i really want to get this resolved!
http://drupal.org/node/814870
Comment #33
patcon CreditAttribution: patcon commentedMarking this one a duplicate for ease of management.
#814870: Auto Assign Role - warning: Illegal offset type seems to have more info...
Comment #34
patcon CreditAttribution: patcon commentedShoot. Seems folks are saying this error (Invalid argument supplied for foreach()) was fixed in most recent dev, but now new error (Illegal offset type) is the problem, so I'll mark this as fixed. Discussion on new error should be in other issue, I suppose. Sorry for the confusion guys
Comment #35
ExTexan CreditAttribution: ExTexan commentedI uploaded a patch that fixes the illegal offset error... (at least it worked for me)...
http://drupal.org/node/814870#comment-3306836
Comment #36
fenstratAnyone here with this issue try the patch over at #699888-24: Auto Assign Role paths is broken
Comment #37
operations CreditAttribution: operations commentedHi, I had the content profile working fine with the auto assign role, the warning wasn't appearing. I was doing lot of configurations when suddenly It showed up. Uninstalling the two modules and re-installing wouldn't seem to fix the problem.
Auto assign role v6.x-1.2
Content Profile v6.x-1.0
Did anyone found a solution instead of rolling back to v6.x-1.1 of AAR module ?
Comment #38
manoloka CreditAttribution: manoloka commentedHi there,
I can confirm that the patch at http://drupal.org/node/755308 sorted this problem for me
Comment #39
fenstrat@manoloka This issue was fixed and committed in #699888-24: Auto Assign Role paths is broken
Comment #40
zhuzhuojiang CreditAttribution: zhuzhuojiang commentedmark...... works for me