Voyager: Type multiple_images throws exception on saving

Created on 11 Jun 2017  路  5Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.4.28
  • Voyager Version: 0.11.0
  • PHP Version: 7.x
  • Database Driver & Version:

Description:

If I try to save a datatype with a field multiple_images following exception occures:

at HandleExceptions->handleError(8, 'Undefined variable: resize_width', '/var/www/vendor/tcg/voyager/src/Http/Controllers/Controller.php', 178, array('request' => object(Request), 'slug' => 'assets', 'row' => object(DataRow), 'content' => null, 'file' => object(UploadedFile), 'filename' => 'qIryr0CUMsiEiBZpQbCP', 'path' => 'assets/June2017/', 'files' => array(object(UploadedFile), object(UploadedFile), object(UploadedFile), object(UploadedFile)), 'filesPath' => array('assets/June2017/qIryr0CUMsiEiBZpQbCP.JPG'), 'key' => 0, 'filePath' => 'assets/June2017/qIryr0CUMsiEiBZpQbCP.JPG'))in Controller.php (line 178)

The variable $resize_with is used, but not defined,

Steps To Reproduce:

  • create a table
  • add a textfield
  • add bread from type multipe_images
  • create a row
  • save

Most helpful comment

This is either fixed in master or in an open pull request, so it should definitely be in the next release

All 5 comments

Please upgrade Voyager to the latest version. Problem is in vendor.

I've updated to v0.11.14 and still getting the error above in Controller.php (line 178)

adding:

`
$options = json_decode($row->details);

if (isset($options->resize) && isset($options->resize->width) && isset($options->resize->height)) {
$resize_width = $options->resize->width;
$resize_height = $options->resize->height;
} else {
$resize_width = 1800;
$resize_height = null;
}
`

at line 171 fixes it

next package ,hope fix it

This is either fixed in master or in an open pull request, so it should definitely be in the next release

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vaggelis2018 picture vaggelis2018  路  3Comments

IvanBohonosiuk picture IvanBohonosiuk  路  4Comments

zzpwestlife picture zzpwestlife  路  3Comments

popica80 picture popica80  路  3Comments

wp-src picture wp-src  路  3Comments