When I save the form at admin/modules I got the following error:

Fatal error: [] operator not supported for strings in /var/www/web/sites/all/themes/stanley/template.php on line 576

This can be fixed with this code:

  if (!isset($form['#attributes']['class']) || !is_array($form['#attributes']['class'])) {
    $form['#attributes']['class'] = array();
  }

Rubik had a similar issue:
http://drupal.org/node/1248650

I can provide a patch later if you want.

CommentFileSizeAuthor
#8 enabledmodules.txt13.54 KBjbeckers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stijndm’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi,

I'd like to be able to reproduce this before committing anything. I haven't come across this yet and my gut tells me it has to do with a module not implementing drupal attributes correctly.

Could you provide me a list of the modules you were trying to install?

askibinski’s picture

Priority: Major » Normal

Indeed, the error does not occur on a fresh install of Drupal, so I guess it's a contrib module screwing things up.
It's a pretty long list of modules though, can't debug it right now.

stijndm’s picture

You could also post a list of all enabled modules, I can then cross-check with my list of modules. This should narrow down the list of suspects.

siilak’s picture

I get this error, if i use context module "Always active" in "Sitewide context"

siilak’s picture

Update to latest Context dev... and all works fine

jbeckers’s picture

Got this when trying to edit a page that uses panels.

Full output:

Fatal error: [] operator not supported for strings in /[snip]/sites/all/themes/stanley/template.php on line 718
Call Stack
# Time Memory Function Location
1 0.0447 646104 {main}( ) ../index.php:0
2 8.4509 58992392 menu_execute_active_handler( ) ../index.php:21
3 8.4666 59588528 call_user_func_array ( ) ../menu.inc:517
4 8.4666 59589088 page_manager_edit_page( ) ../menu.inc:517
5 8.7200 60768336 page_manager_get_operation_content( ) ../page_manager.admin.inc:407
6 8.7201 60775688 _page_manager_get_operation_content( ) ../page_manager.admin.inc:820
7 8.7290 61419264 ctools_wizard_multistep_form( ) ../page_manager.admin.inc:923
8 8.7375 61428976 drupal_build_form( ) ../wizard.inc:124
9 8.7375 61434328 drupal_retrieve_form( ) ../form.inc:331
10 8.7377 61443168 call_user_func_array ( ) ../form.inc:787
11 8.7377 61443864 page_manager_page_summary( ) ../form.inc:787
12 8.8333 63539392 page_manager_get_handler_summary( ) ../page_manager.admin.inc:1802
13 8.8334 63541096 panels_panel_context_admin_summary( ) ../page_manager.module:891
14 8.9657 63995848 theme( ) ../panel_context.inc:464
15 8.9658 63997432 stanley_table( ) ../theme.inc:1044
Page execution time was 9019.9 ms. XHProf output. Memory used at: devel_boot()=6.33 MB, devel_shutdown()=61.09 MB, PHP peak=64 MB.

jbeckers’s picture

No change with latest Context dev

jbeckers’s picture

FileSize
13.54 KB

Output of "drush pml | grep Enabled" is attached

stijndm’s picture

The problem with this is that a lot of contrib modules still have classes defined as strings in their code, instead of array's which is the D7 way to go.
At first i was reluctant to fix this in stanley because there is nothing wrong with how stanley does it. But way too many modules still use strings, sometimes crashing the site. While these contrib module should be fixed I'm adding a catch to all places where I add classes.

Barto.G’s picture

I add the same issue using versin 7.x-1.0-alpha2. On panels admin page the site gave a error 500. Reading this issue i updated to Stanley version 7.x-1.x-dev (2012 april 15) and the issue was still there... So i opened template.php and modified line 728 from:

$attributes['class'][] = 'zebra-striped';

to :

  if (isset($attributes['class']) && is_string($attributes['class'])) {
    $attributes['class'] .=  ' zebra-striped';
  }else{
	  $attributes['class'][] = 'zebra-striped';
  }

It's all good now !

BTW the theme is awesome! Thanks