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,
I am using bootstrap theme and found out that it is not possible to insert image using ckeditor media browser and to the same token insert data-picture-mapping.
I get white screen with php error: Fatal error: [] operator not supported for strings in /var/www/testshop.eotazky/html/sites/all/themes/bootstrap/templates/picture/picture.vars.php on line 19
With other themes everything works ok. The problem might be: CSS class passed as a string instead of array?
Comment | File | Size | Author |
---|
Comments
Comment #2
ice70 CreditAttribution: ice70 commentedHi loparr,
No sure if the $variables['attributes']['class'] is expected to be a string or array elsewhere.
I also found it gave out warnings if the $variables['attributes']['class'] was missing,
updated /sites/all/themes/bootstrap/templates/picture/picture.vars.php
as follow and it then worked as expected:
Comment #3
kyletaylored CreditAttribution: kyletaylored at LevelTen Interactive commentedThis actually looks like a Bootstrap issue instead of a Picture issue (the theme needs to support the module).
We need to initialize an array if it hasn't been already.
Comment #4
kyletaylored CreditAttribution: kyletaylored at LevelTen Interactive commentedRolled the last suggestion into a patch.
Comment #5
markhalliwellThis is not an issue with this project.