Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | enabledmodules.txt | 13.54 KB | jbeckers |
Comments
Comment #1
stijndm CreditAttribution: stijndm commentedHi,
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?
Comment #2
askibinski CreditAttribution: askibinski commentedIndeed, 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.
Comment #3
stijndm CreditAttribution: stijndm commentedYou 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.
Comment #4
siilak CreditAttribution: siilak commentedI get this error, if i use context module "Always active" in "Sitewide context"
Comment #5
siilak CreditAttribution: siilak commentedUpdate to latest Context dev... and all works fine
Comment #6
jbeckers CreditAttribution: jbeckers commentedGot this when trying to edit a page that uses panels.
Full output:
Comment #7
jbeckers CreditAttribution: jbeckers commentedNo change with latest Context dev
Comment #8
jbeckers CreditAttribution: jbeckers commentedOutput of "drush pml | grep Enabled" is attached
Comment #9
stijndm CreditAttribution: stijndm commentedThe 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.
Comment #10
Barto.G CreditAttribution: Barto.G commentedI 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:
to :
It's all good now !
BTW the theme is awesome! Thanks