• Resolved Jure

    (@xjure)


    Hi,

    I have last update and I get this error every time i try to crop image:
    status: 500, statusText: “Internal Server Error”, requestUrl: “/wp-admin/admin-ajax.php”

    After refreshing page, image is cropped.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter Jure

    (@xjure)

    WP debug log:

    [19-Dec-2017 14:44:51 UTC] PHP Fatal error: Call to undefined function mime_content_type() in /home/kinoteka/public_html/wp-content/plugins/crop-thumbnails/functions/save.php on line 217

    I’ll send you an E-mail

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    ah, thats very good – try to change the content of the saveMetadata-function (beginning on line 209 in save.php)

    
    		$fullFilePath = trailingslashit($currentFilePathInfo['dirname']) . $currentFilePathInfo['basename'];
    		
    		$fileInformations = wp_check_filetype($fullFilePath);
    
    		$newValues = array();
    		$newValues['file'] = $currentFilePathInfo['basename'];
    		$newValues['width'] = intval($croppedWidth);
    		$newValues['height'] = intval($croppedHeight);
    		$newValues['mime-type'] = $fileInformations['type'];
    		
    		$oldValues = array();
    		if(empty($imageMetadata['sizes'])) {
    			$imageMetadata['sizes'] = array();
    		}
    		if(!empty($imageMetadata['sizes'][$imageSizeName])) {
    			$oldValues = $imageMetadata['sizes'][$imageSizeName];
    		}
    		$imageMetadata['sizes'][$imageSizeName] = array_merge($oldValues,$newValues);
    		
    		do_action('crop_thumbnails_after_save_new_thumb', $fullFilePath, $imageSizeName, $imageMetadata['sizes'][$imageSizeName] );
    		return $imageMetadata;
    
    Thread Starter Jure

    (@xjure)

    It’s working!
    Thank you so much ??

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    I have to thank you – until now nobody can tell me what has caused that error!
    It seems that on some servers the function mime_content_type is not present.

    Thread Starter Jure

    (@xjure)

    I’m glad I helped. It was in my interest to solve the problem because I’m using your plugin on almost every website.

    I noticed that my hosting provider started blocking some php functions, probably to encrease security, but then problems started with some plugins.

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Version 1.1.1 is out and fixes the bug.

    Thread Starter Jure

    (@xjure)

    Alredy updated ??
    Thanks!

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Internal Server Error 500’ is closed to new replies.