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.
Hi, not sure if this is an issue with Omega 4 or Commerce Kickstart, but with a fresh install of the kickstart profile, and after enabling an Omega4 subtheme and going to the cart, I'm getting a blank page and the following error.
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in /Users/Tom/Sites/tc_kickstart/profiles/commerce_kickstart/modules/contrib/views_megarow/theme/views-view-table.tpl.php on line 35 and defined in drupal_attributes() (line 2375 of /Users/Tom/Sites/tc_kickstart/includes/common.inc).
Comments
Comment #1
msmithcti CreditAttribution: msmithcti commentedThis looks like an issue with Views Megarow passing a string to drupal_attributes() rather than an array. When using Omega warnings tend to get thrown for this. @see #2028045: fail row classes in views_view_grid for a similar issue.
Comment #2
wunderdog CreditAttribution: wunderdog commentedSame issue here. Please help!!!
Comment #3
pippal CreditAttribution: pippal commentedI had the same problem - using Omega 4 with drupal commerce and getting the above error when trying to view the shopping cart - the link to the issue above didn't help me so adding this for any one else that ends up in the same place.
The Views Megarow module in the latest drupal commerce is 1.0 but the latest version - 1.1 - has this commit http://drupalcode.org/project/views_megarow.git/commit/6573655
Updating Views Megarow to 1.1 fixed the problem.
Comment #4
janvonmulert CreditAttribution: janvonmulert commentedJust in case it may help someone I had similar error.
Using Omega 7.x-4.2 and Commerce 7.x-1.9
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in /var/www/.../sites/all/themes/..../templates/hack/views-view-table.tpl.php on line 41 and defined in drupal_attributes() (line 2376 of /var/www/.../includes/common.inc).
This error was coming from the shopping cart. A real bizzarre one too, worked fine on my dev server but error on prod. Gives me the creeps.
Fixed with adding is_array() check onle line 41 of /templates/hacks/views-view-table.tpl.php
To:
Comment #5
joelpittetThere are a few modules that seem to pass classes around as strings... This is very inconsistent, and I think even in core there is a bit of this because it's not enforced well...
Casting to an array may be much easier:
Also removed extra space and moved it into the print string.
Comment #6
paulbeaney CreditAttribution: paulbeaney commentedThere is a related discussion about this in the Omega issue queue here https://www.drupal.org/node/2341767.
I have got round the problem by taking the views-view-table template from Megarow 1.4 (no longer present in 1.5) and putting it into the templates directory of our custom, Omega 4-based theme. I haven't properly analyzed the impact on the generation of the markup and CSS (if any), but the main thing is that it prevents error messages for now!