I have on two project with latest dev release of Bootstrap following issue. I use the Drupal Print Module with DOMPDF. With all other themes it works but if i enabled the Bootstrap template as default then i will receive in Frontend if i want print the site as PDF file this error message:

Fatal error: [] operator not supported for strings in /sites/all/themes/bootstrap/theme/system/image.vars.php on line 17

It seems it is a conflict.

Greetings, Alexander

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markhalliwell’s picture

Title: Conflict with Print module and PDF output » print_preprocess_print() incorrectly sets class on image for print_logo variable
Project: Bootstrap » Printer, email and PDF versions
Version: 7.x-3.x-dev » 7.x-2.x-dev

Searched the print module repo:
http://drupalcode.org/project/print.git?a=search&h=refs%2Fheads%2F7.x-2....

Found:
http://drupalcode.org/project/print.git/blob?f=print.pages.inc#l161
array('class' => 'print-logo', 'id' => 'logo')

Should be:
array('class' => array('print-logo'), 'id' => 'logo')

alexander.sibert’s picture

Status: Active » Reviewed & tested by the community

It works now for me. Thank you!

cgmonroe’s picture

Had the same problem with bootstrap. Here's a patch file to fix this.

FYI - An alternative way to fix this is to change the preprocess_image hooks in your theme to test if the $vars['attributes']['class'] variable is a string and then skip it if it is. Better to fix the source problem though.

guschilds’s picture

Attached is the same patch, but it applies to 7.x-1.3 for anyone else still stuck on that version. :)

  • guschilds committed e350d93 on 7.x-1.x
    Issue #2268657 by markcarver, cgmonroe, guschilds:...
guschilds’s picture

Status: Reviewed & tested by the community » Fixed

The patches from #3 and #4 have been committed to the 7.x-2.x and 7.x-1.x branches and will be a part of the next releases. Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.