Grav: Exception raised by images with lightbox query string

Created on 13 Aug 2016  路  3Comments  路  Source: getgrav/grav

I think you forgot to add the $id parameter to the html() methode of the Grav\Common\Page\Medium\ThumbnailImageMedium.php file, which raises an exception for images with the ?lightbox parameter. For example, [](blue_sky.jpg?lightbox) produces the error:

Declaration of Grav\Common\Page\Medium\ThumbnailImageMedium::html() should be compatible with Grav\Common\Page\Medium\Medium::html($title = NULL, $alt = NULL, $class = NULL, $id = NULL, $reset = true)

I manually added the $id parameter (lines 58-61 of ThumbnailImageMedium.php), and I don't have the error anymore.

public function html($title = null, $alt = null, $class = null, $id = null, $reset = true)
{
  return $this->bubble('html', [$title, $alt, $class, $id, $reset]);
}
bug

Most helpful comment

well i'll release this fix as soon as TravisCI sorts out their issues.. Seems it wont build our packages right now :(

All 3 comments

I think your are right! Will get this sorted.

Will get this released asap.

well i'll release this fix as soon as TravisCI sorts out their issues.. Seems it wont build our packages right now :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcastel picture marcastel  路  4Comments

daspete picture daspete  路  5Comments

bmrankin picture bmrankin  路  3Comments

fvsch picture fvsch  路  3Comments

carstenwm picture carstenwm  路  3Comments