Using drupal 7.10, when I attach the xls feed to "page" I get the following errors:

Notice: Array to string conversion in rdf_preprocess_image() (line 772 of /var/www/html/modules/rdf/rdf.module).
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in /var/www/html/includes/theme.inc on line 1657 and defined in drupal_attributes() (line 2263 of /var/www/html/includes/common.inc).

The website encountered an unexpected error. Please try again later. 

When I attach it to "Master" there is no error but there is no 'export to xls' button either.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AaronELBorg’s picture

OK. Made a patch. I think it was due to d7's theme function being a bit more finicky in terms of what it needs. Mine's working with it anyway. Yahoo.

EDIT: Crap! I didn't realize that the initial report isn't the first comment. Therefore, my patch should end with "1.patch" and not "2.patch". Sorry about that.

AaronELBorg’s picture

I'm gonna upload the same patch again in this comment just to reduce any possible confusion with the comment ordering. My apologies for any confusion.

NOTE: Both patches in comment #1 and #2 are exactly the same.

TommyChris’s picture

Status: Active » Reviewed & tested by the community

The patch works!

stefandenhartog’s picture

I get this error when I execute this statement:

theme('image', drupal_get_path('module', 'uc_own_shoppingcart') . '/images/cart.png');

Notice: Array to string conversion in rdf_preprocess_image() (line 775 of C:\Users\stefandh\Documents\My Web Sites\Drupal 7.2 Developer release1\modules\rdf\rdf.module).

Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in C:\Users\stefandh\Documents\My Web Sites\Drupal 7.2 Developer release1\includes\theme.inc on line 1521 and defined in drupal_attributes() (line 2259 of C:\Users\stefandh\Documents\My Web Sites\Drupal 7.2 Developer release1\includes\common.inc).

Just downloaded the last version of Drupal (because Updating doesn't work for me, but that's another problem.) and copied the rdf directory but that doesn't seem to change a thing.

AaronELBorg’s picture

After making that patch above, I was occasionally getting random warnings about $filename being undefined so I changed lines 17-19 of 'views-export-xls-view-xls.tpl.php' from

  if (!$filename) {
    $filename = $view->name . '.xls';
  }

to

  if (!isset($filename)) {
    $filename = $view->name . '.xls';
  }

Anyone else getting these? If so, I'll roll another patch with that included. Kinda busy at the moment but thought I'd mention it.

AaronELBorg’s picture

stefandenhartog,
Did you try the patch? Sounds like you should.

stefandenhartog’s picture

AaronELBorg I am not connected to the GIT repository right now so i don't believe I can patch the project.
I tried searching for the change manually (and I have updated Drupal to the version of 24 feb.)
but I can't even find the views-export-xls-view-xls file :(

AaronELBorg’s picture

stefandenhartog,
views_export_xls_plugin_style_xls.inc is somewhere inside the views_export_xls directory (It depends on your setup but probably in sites/all/modules?). I'm not in front of the project at the moment so you'll have to dig around to find it.

Since this isn't a core issue I don't think updating your version of drupal is really gonna help. Well.....this issue anyway.

The patch isn't all that intensive so you should be able to do it manually if need be.

marcusx’s picture

Title: Notice: Array to string conversion in rdf_preprocess_image() (line 772 of /var/www/html/modules/rdf/rdf.module » Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in ..includes/theme.inc
  • Patch is working.
  • Updating Issue title as the notice is not the problem, the fatal error is the main problem here and should be easier to find now in the issues.
creaoy’s picture

Status: Reviewed & tested by the community » Fixed

Commited patch #2 33ba0be

creaoy’s picture

Status: Fixed » Closed (fixed)