Selecting structure/Pages throws:

Fatal error: Unsupported operand types in D:\xxx\includes\theme.inc on line 989

Using AdaptiveTheme with Drupal 7.x

Page manager 7.x-1.0
Requires: Chaos tools (enabled)
Required by: Chaos Tools (CTools) Plugin Example (enabled), Panelizer (enabled)

Admin with all permissions enabled.

Version of theme.inc attached

CommentFileSizeAuthor
#8 Capture.JPG25.08 KBpumin
theme.zip26.13 KBdavid137

Comments

david137’s picture

Probably related to this, when trying to edit CTools example plugin get:

Notice: Array to string conversion in page_manager_render_operations() (line 1211 of D:\xxx\sites\all\modules\ctools\page_manager\page_manager.admin.inc).

Thanks for your response.

david137’s picture

Priority: Normal » Major

I cannot complete website design without this being addressed, please help.

merlinofchaos’s picture

Have you tried the CTools -dev?

david137’s picture

The dev release states it is not functional yet.

david137’s picture

Some additional information - clickon on CTools example throughs the same failure:

Fatal error: Unsupported operand types in D:\xxx\includes\theme.inc on line 989

Robin Millette’s picture

adamdicarlo’s picture

> ... when trying to edit CTools example plugin get:

What do you mean by "edit" CTools example plugin?

pumin’s picture

StatusFileSize
new25.08 KB

I think he meant to click on "Ctools plugin example" link from menu on top. (need to enable this module first) Please see pic attached.

david137’s picture

Pumin is correct, clicking on the Ctools plugin example cause the same error as clicking on structure/pages.

david137’s picture

I applied this patch and problem still occurs.

david137’s picture

Here is code snippet line 957-995

  $info = $hooks[$hook];
  global $theme_path;
  $temp = $theme_path;
  // point path_to_theme() to the currently used theme path:
  $theme_path = $info['theme path'];

  // Include a file if the theme function or variable processor is held elsewhere.
  if (!empty($info['includes'])) {
    foreach ($info['includes'] as $include_file) {
      include_once DRUPAL_ROOT . '/' . $include_file;
    }
  }

  // If a renderable array is passed as $variables, then set $variables to
  // the arguments expected by the theme function.
  if (isset($variables['#theme']) || isset($variables['#theme_wrappers'])) {
    $element = $variables;
    $variables = array();
    if (isset($info['variables'])) {
      foreach (array_keys($info['variables']) as $name) {
        if (isset($element["#$name"])) {
          $variables[$name] = $element["#$name"];
        }
      }
    }
    else {
      $variables[$info['render element']] = $element;
    }
  }

  // Merge in argument defaults.
  if (!empty($info['variables'])) {
    $variables += $info['variables'];    <<<<--------- line 989
  }
  elseif (!empty($info['render element'])) {
    $variables += array($info['render element'] => array());
  }

 
swentel’s picture

Priority: Major » Normal

Disable the ctools example plugin module, you really don't need it for your website to run.

david137’s picture

Disabling Ctools plugin solved the problem, thanks.

adamdicarlo’s picture

Status: Active » Closed (works as designed)
dimitrov.adrian’s picture

I have such problem too, I noticed that this occur Drupal 7 with PHP >= 5.4.x

So, the ways to solve problems are two:

1) Downgrade to recomended PHP version ex.: PHP 5.3

2) Little patch on your 'includes/theme.inc'

line 989:

  $variables += $info['variables'];

to become

 $variables = array_merge($info['variables'], $variables);

This is enough to solve the problem.

Cheers!