Can anyone help please?

I keep getting the following issue with Auto Role Assign when the content profile module is installed:

warning: Illegal offset type in /home/australi/public_html/staging/includes/form.inc on line 1208

Cheers

Comments

rotoheni_09’s picture

Title: warning: Illegal offset type in /home/australi/public_html/staging/includes/form.inc on line 1208 » Auto Assign Role - warning: Illegal offset type
rotoheni_09’s picture

Priority: Critical » Normal
matthieu01’s picture

I've the same problem, did you fixe the issue ?

webindustries’s picture

same here - havent been able to find a response to a fix.

matthieu01’s picture

return to the 6.x-1.1 and its ok

webindustries’s picture

worked a charm - thanks!

betz’s picture

Same here.

I got the same errors, plus the integration with content profile didnt work out.

Going back to 1.1 fixed it.

leilyrken’s picture

same problem. same fix I came back on 1.1 it fix the problem.

It happen combine with contentprofile. I create my new content type, enable content content profile. then edit the profile content settings on my content type to use it during the registration for a role only. Save and error appear.

aaronup’s picture

I was suffering the same bug, came across this patch that fixed the problem for me without having to downgrade the module

The patch mentioned in the issue link below actually fixes the problem in the 6.x-1.2 release:
#755308: Content profile settings are not saved

I realize it says that the issue is closed, however, it would seem the patch apparently was only committed to the dev and not the release of 1.2?

Bushidoman’s picture

I have the same issue as well. Only mine is located in /html/includes/form.inc on line 1373. This occurred when I was adding a user account.

/**
* Retrieve the default properties for the defined element type.
*/
function _element_info($type, $refresh = NULL) {
static $cache;

$basic_defaults = array(
'#description' => NULL,
'#attributes' => array(),
'#required' => FALSE,
'#tree' => FALSE,
'#parents' => array()
);
if (!isset($cache) || $refresh) {
$cache = array();
foreach (module_implements('elements') as $module) {
$elements = module_invoke($module, 'elements');
if (isset($elements) && is_array($elements)) {
$cache = array_merge_recursive($cache, $elements);
}
}
if (sizeof($cache)) {
foreach ($cache as $element_type => $info) {
$cache[$element_type] = array_merge_recursive($basic_defaults, $info);
}
}
}

return $cache[$type];
}

return $cache[$type]; is line 1373.

weizrd’s picture

unfortunately that patch doesn't change anything on my system. tried to clear cache, update, cron, rebuild permissions. that 1208 error still appears along with the lack of content profile fields into the registration page.

downgrading to 1.1 solves the issue, but 1.2 is flagged as security update.

anyone any idea on a solution please?

gewillson’s picture

6.x-1.2 of May 11 had the form.inc line 1207 error on my Drupal 6.17
Disabling Auto Assign Role stopped the error from appearing. I then re-enabled the AAR module.

6.x-1.x-dev of July 23 did not fix it - but gave a type error on line 1208 of form.inc

6.x-1.1 of Sept 25, 2009 stopped the error from appearing

The text at the bottom of the Content Profile tab

Use on Auto Assign Role paths:
The Auto Assign Role module gives you the ability to assign paths a user can register from for a role. After associating a path with a role your selection can associate this content type with a path.

does not contain a checkbox - in any version;and I sort of expected one.

calefilm’s picture

I'm confused... to fix this problem you've downgraded from 6.x-1.2 to 6.x-1.1? How do I find 1.1? All I see is 6.x-1.2 and 6.x-1.x-dev

1) I'm having the same issue as everyone has stated on both 6.x-1.2 and dev.

2) On Version 6.x-1.2 I was having a separate issue setting the path settings: "Wrong datatype for second argument" ( http://drupal.org/node/699888 )

note: I attached patch as seen in message #10: http://drupal.org/node/699888 which fixed my second issue

BUT I cannot get rid of the message that I am getting pertaining to this issue queue: "warning: Illegal offset type in /Users/Cale/Sites/acquia-drupal/includes/form.inc on line 1208."

This message appears twice... btw, WILL THIS MESSAGE EFFECT MY SITE (specifically, my content type) IF I CAN'T GET RID OF IT?

Currently I am able to allow users to set their role. Mostly, everything works, however, when I go to content type and select 'Add this type to User Registration' and click SAVE, nothing happens and the check disappears. If I go lower and click 'Use on Auto Assign Role paths: (example) example it doesn't work either.

Thus, all I can do is allow users to choose their role... even if I set up the tabs correctly, the content profile user registration form does not appear with the Registration Username and Password fields.

Thanks for any help.

patcon’s picture

Seems we have duplicate issues. Marking other as such:
#761748-33: warning: Invalid argument supplied for foreach()

NecroHill’s picture

calefilm How do I find 1.1?
http://drupal.org/node/138844/release

extexan’s picture

StatusFileSize
new1.29 KB

Hi All,

This patched fixed the offset error for me. This is the first time I've uploaded a patch, so I apologize in advance if it's not done right. I read somewhere that the patch file naming convention should include the issue number, but I couldn't see the issue number anywhere on this page, and not knowing if the node id is the same as the issue, I thought it best to just avoid that altogether.

fenstrat’s picture

Status: Active » Closed (duplicate)

Anyone here with this issue try the patch over at #699888-24: Auto Assign Role paths is broken

@ExTexan - you're on the right path, but content_profile_get_settings() actually takes a second param. Have a look at the patch in the linked issue.

extexan’s picture

@fenstrat, I see that. Thanks for the heads-up. And thanks for the link to the new patch.

dspring0021’s picture

Worked for me (same issue). Thanks, fenstrat!

Miko.’s picture

If this is a closed duplicate issue- where do I find the "duplicate"? I'm still having the problem.

fenstrat’s picture

This is a duplicate of 699888 - there's a summary at #699888-64: Auto Assign Role paths is broken