Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised by images with lightbox query string #981

Closed
tdulieu opened this issue Aug 13, 2016 · 3 comments
Closed

Exception raised by images with lightbox query string #981

tdulieu opened this issue Aug 13, 2016 · 3 comments
Labels

Comments

@tdulieu
Copy link

tdulieu commented Aug 13, 2016

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]);
}
@rhukster rhukster added the bug label Aug 14, 2016
@rhukster
Copy link
Member

I think your are right! Will get this sorted.

rhukster added a commit that referenced this issue Aug 14, 2016
@rhukster
Copy link
Member

Will get this released asap.

@rhukster
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants