There is probably a better way to handle this

Comments

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.85 KB

also contains a small whitespace fix

mikeytown2’s picture

StatusFileSize
new1.9 KB

one more fix

andy inman’s picture

Thanks for the info and patch, but I think the real bug is elsewhere as "Configuration per group type" was a feature that was never completed and should be disabled completely. Could you tell me steps to reproduce? At what point does this error message appear?

mikeytown2’s picture

Relevant info:
Presssflow 6.19
Error happens on cron

andy inman’s picture

Ok, I've found the underlying problem - some code for an experimental feature that should have been disabled but got left in...

File: groupadmin.menu.inc.php
Lines: 27-43

  // If enabled, extra configuration by group-type.
  if(_groupadmin_settings('x_configuration_per_group_type')) {
  ...

So, put /* */ around that section, and the error message will go away. Your patch will work too, obviously - what is happening is that _groupadmin_settings() is being called with an invalid $key parameter, but that in itself is an error/bug so probably shouldn't just be ignored (as with your patch.)

Thanks for the info.

andy inman’s picture

Status: Needs review » Fixed

Found that I'd already fixed this in dev - will be in version 2.2.

AntiNSA’s picture

Status: Fixed » Needs work

I have updated and cleared cache.. I
have this

/*** this part is not finished!
  // If enabled, extra configuration by group-type.
  if(_groupadmin_settings('x_configuration_per_group_type')) {
    // Add a menu item to the content-type edit page for each group type.
    // Tried to do this using a single menu path with %  but it didn't work.'
    $types = _groupadmin_group_types();
    foreach($types as $type) {
      $path = sprintf('admin/content/node-type/%s/groupadmin', $type);
      $items[$path] = array(
        'title' => 'GroupAdmin',
        'access arguments' => array('administer content types'),
        'description' => 'Configure <em>Group Admin</em> for .',
        'page arguments' => array('_groupadmin_settings_form', 2, 3),
        'page callback' => 'drupal_get_form',
        'type' => MENU_LOCAL_TASK,
      );
    }
  }
  * ***/ 

Its still giving me the same error even after clearing cache?

andy inman’s picture

Status: Needs work » Fixed

See http://drupal.org/node/934164#comment-3542490 - please don't reopen the issue here, either there is a separate bug in 2.2beta1 (which seems very unlikely from all the checks I've done) or you are actually running 2.1 in which case it's a configuration problem with your modules directories or something like that.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.