Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter() (line 531 of /opt/development/yourhelps/sites/all/modules/boxes/boxes.module).
Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter() (line 538 of /opt/development/yourhelps/sites/all/modules/boxes/boxes.module).

CommentFileSizeAuthor
#1 Screenshot at 2012-04-03 23:59:37.png53.49 KBrogical
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rogical’s picture

kspal’s picture

Title: Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter() » Same issue in page " 'Add custom box' block"

Hi,

After having installed OpenEnterprise feature, I get a similar notice on "'Add custom box' block" page:

Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter() (line 531 of C:\wamp\www\drupal\profiles\openenterprise\modules\boxes\boxes.module).
Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter() (line 538 of C:\wamp\www\drupal\profiles\openenterprise\modules\boxes\boxes.module).

.

kspal’s picture

Title: Same issue in page " 'Add custom box' block" » Notice: Trying to get property of non-object in boxes_form_block_admin_configure_alter
jec006’s picture

Tagging as release blocker

e2thex’s picture

I can not dup this with the latest version of boxes.

Here are my steps
Create custom box.
Go to block admin/structure/block
find block and click delete

febbraro’s picture

Status: Active » Postponed (maintainer needs more info)
2pha’s picture

Issue summary: View changes

I am getting this issue with a custom module.
I am simply trying write a custom box module and it is not going so well.
I have not used boxes before and documentation is not real good.
This is my module file:

/**
 * Implementation of hook_boxes_plugins().
 */
function custom_boxes_boxes_plugins() {
  $info = array();
  $path = drupal_get_path('module', 'custom_boxes') .'/plugins';
  // Array key turns into block delta, don't make too long otherwise error
  // because delta database column is only 32 length.
  // "boxes_add__" is added to the key.
  $info['custom_boxes_cc'] = array(
    'title' => 'Credit card form',
    'handler' => array(
      'parent' => 'box',
      'class' => 'custom_boxes_credit_card_box',
      'file' => 'custom_boxes_boxes.inc',
      'path' => $path,
    )
  );
  return $info;
}

/**
 * Implements hook_ctools_plugin_api().
 */
function entity_boxes_ctools_plugin_api($module, $api) {
  if ($module == 'boxes' && $api == 'plugins') {
    return array('version' => 1);
  }
}

This is my class:

**
 * Boxes plugin for the custom boxes module.
 */
class custom_boxes_credit_card_box extends boxes_box {
  public function options_defaults() {
    return array();
  }
  public function options_form(&$form_state) {
    return array();
  }
  
  public function render() {
    //$ccform = drupal_get_form('custom_boxes_cc_form');
    return array(
      'delta' => $this->delta,
      'title' => $title,
      'subject' => $title,
      'content' => 'testing',
    );
  }
}

I must be doing something wrong, but I'm not sure what.
Every time I go to a page with this box/block, it asks me to configure it again.

EDIT:
I feel a bit stupid, I had the "add ...... box" set to display on node with context, instead of the actual box.