Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Igor Kovacic

    (@ikovacic)

    @devavi it looks great great. Thanks for fast response. I’m changing rating to 5 now.

    Hi, I have the same issue on latest version of webp express plugin (0.17.2, previously 0.16.0).

    The problem occurs only on larger files (500+ KB):
    – admin-ajax.php response is empty for these images
    – js throws error “SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data (bulk-convert.js:248:27)
    – bulk converter then stucks and it should be restarted (in the meantime image that caused problem converts to webp)

    I tried to change PHP settings but it didn’t help. I also resized all to maximum dimensions of 2048×2048 in order to make them smaller but that solved problem only for some images. Now i’m running out of ideas.

    Temporary fix is modifying function scissors_admin_head in scissors.php to look like this:

    function scissors_admin_head()
    {
    	global $scissors_dirname;
    
    	wp_enqueue_script('scissors_crop', '/' . PLUGINDIR . '/'.$scissors_dirname.'/js/jquery.Jcrop.js', array('jquery') );
    	wp_enqueue_script('scissors_js', '/' . PLUGINDIR . '/'.$scissors_dirname.'/js/scissors.js' );
    
    	$thisUrl = admin_url('admin-ajax.php');
    	echo "<!-- JS loaded for Scissors in media library -->\n";
    	echo "<script type='text/javascript'>\n/* <![CDATA[ */\n";
    	echo "scissors = {\n";
    	echo "ajaxUrl: '$thisUrl'";
    	foreach(array('large', 'medium', 'thumbnail') as $size)
    	{
    		$width = intval(get_option("{$size}_size_w"));
    		$height = intval(get_option("{$size}_size_h"));
    		$aspectRatio = max(1, $width) / max(1, $height);
    		if(!get_option("{$size}_crop")) $aspectRatio = 0;
    		echo ",\n{$size}AspectRatio: $aspectRatio";
    	}
    	echo "\n}\n";
    	echo "/* ]]> */\n</script>\n";
    	echo "<!-- End of JS loaded for Scissors in media library -->\n";
    }
    Thread Starter Igor Kovacic

    (@ikovacic)

    I have commented line 127 in content-sort class:

    $return_string = substr($return_string,"",-1);

    and search is working now.

    What is that line for?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)