I just upgraded a site from 7.9 to 7.17 and everything is working as expected except I am getting errors on the User Edit page. Here is what I am getting:

Notice: Undefined index: 1 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 1 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 1 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 1 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 5 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 5 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 5 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 5 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 2 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 2 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 2 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).
Notice: Undefined index: 2 in block_form_user_profile_form_alter() (line 571 of /homepages/6/d106006861/htdocs/Clients/TheTestKing/drupal-7.17/modules/block/block.module).

This is happening for all users. I did notice that if the user is an Administrator, they see all of the above. If they are a normal user, only about half of those show up.

I have disabled any module that might make any modifications to the user profile page (I dont think any of them did) without any change.

Please Help.

Thanks,

Keith Hummel

Comments

VM’s picture

are there any custom module's which are hooking into the user.module? specifically using the block_form_user_profile_form_alter function

salvis’s picture

I've seen the same thing on a site that was upgraded from Bluemarine D6 to (non-Bluemarine) D7.

The numbers that you're seeing are the block deltas, which used to be numeric under D6. The block records for the Bluemarine theme were not adjusted because D7 does not have Bluemarine, but they remained in the database.

Disabling, uninstalling, and re-enabling the corresponding modules has cured the issue.

OpsTao’s picture

I have this same, almost identical error on the user edit page. Just upgraded core to 7.23 but had this error in 7.22, and only recently after using 7.22 for many months. I am having other user-specific problems and suspecting that the cause of this error is also creating the other problems – but don't understand how this all works together. The other problem: A function that works fine for Admin and for the first-created Authenticated User, does not work for any subsequently added Authenticated Users. Would surely appreciate any insights on possible solutions or diagnostics.

darvanen’s picture

I had the same problem and while it disappeared when I disabled the 'views' module, the devel error stack was showing me functions from the 'block' module.

I went digging in the database for the undefined index (luckily in my case it was a 20 character string, easy to find) and deleted it from the blocks table as it was definitely bogus data.

I would suggest making a copy of your site and doing the same, with plenty of backups, until you find the culprit.

scott_earnest’s picture

For me, the block's "custom" value (i.e. for user block visibility) did not match up with the values I was seeing in the block administration. My "custom" values in the block table were "2", but the website had "Not customizable", which should be a value of "0". I searched the block table for the delta that was listed as the undefined index in the error and updated the 2 to 0 and the error went away. There was one row for each active theme in that table.