Did a search, but couldn't find a similar issue, so am submitting a bug report. I'm getting the following error messages on viewing the homebox:

Notice: Undefined index: module in homebox_build() (line 360 of /home/sammyd56/public_html/drupal7/sites/all/modules/homebox/homebox.module).
Notice: Undefined index: delta in homebox_build() (line 360 of /home/sammyd56/public_html/drupal7/sites/all/modules/homebox/homebox.module).
Notice: Undefined index: module in homebox_build() (line 360 of /home/sammyd56/public_html/drupal7/sites/all/modules/homebox/homebox.module).
Notice: Undefined index: delta in homebox_build() (line 360 of /home/sammyd56/public_html/drupal7/sites/all/modules/homebox/homebox.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JaakkoL’s picture

Getting a similar error in line 202 of 2.0-beta6.

Notice: Undefined property: stdClass::$module in homebox_forms() (line 202 of ../sites/all/modules/contrib/homebox/homebox.module).
Notice: Undefined property: stdClass::$delta in homebox_forms() (line 202 of ../sites/all/modules/contrib/homebox/homebox.module).

Seems to be caused by the switch statement in homebox_forms() hook. In my case, I have a url alias, where the $args[1] is the user object. Therefore the second test returns true, while there's no such properties as module or delta in the user object. That produces the error.

/**
 * Implements hook_forms().
 */
function homebox_forms($form_id, $args) {
  switch ($form_id) {
    case 'homebox_admin_new_page':
      return array('homebox_admin_new_page' => array('callback' => 'homebox_admin_page'));

    case isset($args[1]) && is_object($args[1]) ? 'homebox_block_edit_' . $args[1]->module . '_' . $args[1]->delta . '_form' : NULL:
      return array($form_id => array('callback' => 'homebox_block_edit_form_builder'));
  }
}
JaakkoL’s picture

Ok. Actually the two errors are not related. I see that now. Your error comes from a totally different block of code.

Anyways, created a quick patch for the problem I was faced with.

JaakkoL’s picture

Here's the same patch that follows Drupal coding standards. Had tabs instead of spaces in the previous one.

Yuri’s picture

has this patch been committed? I guess not since it still appears.
Although it points to a different line:
Notice: Undefined property: stdClass::$module in homebox_forms() (line 202 of /home/groups/public_html/sites/all/modules/homebox/homebox.module).

rv0’s picture

#1, #2, #3 and #4 are unrelated to the original issue.

They are related to this issue:
#1167978: Error Editing Profile Type

I will post the patch from #3 there.

andrea.cavattoni’s picture

the patch it not fixing the problem for me...
changing the line in this way yes:

      if (isset($block['module']) && isset($allowed_blocks[$block['module']][$block['delta']])) {
        $blocks[$key] = $user_blocks[$key];
      }

hope it helps

drumm’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Line 360 is a comment in the current version. Please re-open with details if this is still an issue.