Important

Okay
  Public Ticket #1223306
Undefined classes in BaseWidget
Closed

Comments

  •  2
    E-difference started the conversation

    Usage: Magento 2.1.7 & PageBuilder 2.1.0

    Hi, we encouter an error in New Relic. "'Class 'Ves\BaseWidget\Classes\Elfinder\imagick' not found' in /app/code/Ves/BaseWidget/Classes/Elfinder/ElFinderVolumeDriver.php:2702"

    It seems that the classes are not being found that are used in the image library. 

    Also on r:1470 - $path var not found

    Another error in Ves\BaseWidget\Classes\ElFinder.php:338 - $handler

    Ves\BaseWidget\Classes\ElFinder.php:791 - $header

    Ves\BaseWidget\Classes\ElFinder.php:795 - $header


    Please provide a new release of the pagebuilder with the fixes.

    Regards, Rene Hol

  •  1,315
    Land of replied

    Hello Mate,

    Have a nice day!

    I see the problem because the server are missing php extension imagick

    Try to follow there links to setup and enable it.

    https://stackoverflow.com/questions/7870878/howto-install-imagick-for-php-on-ubuntu-11-10

    http://php.net/manual/en/imagick.installation.php

  •  2
    E-difference replied

    Hi, 

    Thank you for the quick reply. 

    In the protected function configure of ElFinderVolumeDriver.php:483/491 - there is a check if imagick is installed. If that is not the case it should continue to use gd. But we have Imagick installed.

    $type = preg_match('/^(imagick|gd|auto)$/i', $this->options['imgLib'])   ? strtolower($this->options['imgLib'])   : 'auto';
    if (($type == 'imagick' || $type == 'auto') && extension_loaded('imagick')) {   
        $this->imgLib = 'imagick';
    } else {   
        $this->imgLib = function_exists('gd_info') ? 'gd' : '';
    }


    But here on r:2702 it searches for the imagick in the namespace. 

    $img = new imagick($path);

    But it should be searching in the root-namespace \imagick

    $img = new \imagick($path);
  •  1,315
    Land of replied

    Hello Mate,

    Please try to download my attach file, then upload it to replace the file "app/code/Ves/BaseWidget/Classes/Elfinder/ElFinderVolumeDriver.php"