1

I'm trying to remove sections of an authorization form that is in a contrib module oauth2 sever module, but it's not working and I get the following warning : Warning: Illegal offset type in isset or empty in drupal_theme_access() (line 53 of /Applications/MAMP/htdocs/drupal/includes/theme.inc).

This is the code that i used:

function test_menu_alter(&$items){
  $items['oauth2/authorize']['theme callback'] = 'test_theme';
}

function test_theme() {
  return array( 'test_theme' => array(
    'render element' => 'form',
    'path' => 'sites/all/themes/test',
    'template' => 'test',
    ),
  );
}

The contrib module menu item has a page callback which performs a number of checks before returning a form callback. Essentially I want to remove the header and page bottom from the authorization form. The template theme that I am using is:

<?php?>
<!DOCTYPE html>
<html>

<head profile="<?php print $grddl_profile; ?>">
  <?php print $head; ?>
  <title><?php print $head_title; ?></title>
  <?php print $styles; ?>
  <?php print $scripts; ?>
</head>
<body class="<?php print $classes; ?>" <?php print $attributes;?>>
  <?php print $page_top; ?>
  <?php print $page; ?>
</body>
</html>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.