• Resolved jamiechapman

    (@jamiechapman)


    When I click on “post thumbanil editor” in the featured image panel, the “crop and resize” window does not load properly. No image loads, and only sometimes does the thumnail dimension options show up. I have tried multiple page reloads which has worked for some images but not others. I have also tried Debugging on and off, and tried both safari and firefox browsers. I have also downloaded the latest update, and tried deleting the plugin altogether and reinstalling it.
    can you help?

    http://wordpress.org/extend/plugins/post-thumbnail-editor/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author sewpafly

    (@sewpafly)

    1. Which version of wordpress are you using?
    2. Have you tried disabling other plugins?
    3. What happens if you launch PTE through the media library?
    4. Is there anything displayed in the javascript console? (ctrl+shift+j)

    Its not loading the css and js files… the .coffee files are not found.
    I’d give you the errors but I already reverted to a previous version.

    Plugin Author sewpafly

    (@sewpafly)

    Well if you reinstall it, I would like to know the exact text with those error messages. (it could be a permissions issue) (Also, any .coffee errors should go away if you have debugging disabled).

    I’m also getting having the exact same problem as jamiechapman!

    Plugin Author sewpafly

    (@sewpafly)

    @mrcarllister – Can you answer the questions above?

    @sewpafly

    Which version of wordpress are you using?
    3.5.1.

    Have you tried disabling other plugins?
    I have disabled all plugins with no luck!

    What happens if you launch PTE through the media library?
    Same issue.

    Is there anything displayed in the javascript console? (ctrl+shift+j)
    Nothing at all in Chrome but when I ctrl+shift+j in Firefox I get a load of ‘error in parsing’ warnings related to PTE and 1 error that says ‘The image “view-source:http://localhost/everythingdifferent/wp-admin/admin-ajax.php?action=pte_imgedit_preview&_ajax_nonce=00fe82ac7e&postid=428&rand=15500” cannot be displayed because it contains errors.’

    Not sure if any of that is relevant.

    Plugin Author sewpafly

    (@sewpafly)

    the error that you quoted could be a problem, but I’m more interested in the ‘error in parsing’ ones. Could you provide more context? Is there a line number or other text?

    On my systems, I don’t have any error messages, so I would like to correct any problems that you can help me with.

    Plugin Author sewpafly

    (@sewpafly)

    Nevermind about the error in parsing ones. I believe that those are CSS related.

    What happens when you load http://localhost/everythingdifferent/wp-admin/admin-ajax.php?action=pte_imgedit_preview&_ajax_nonce=00fe82ac7e&postid=428&rand=15500 it it’s own window? (Does it return 0)?

    Yeah it returns zero.

    Scrap that. It returns a broken image.

    I think this may be a database problem at my end as I’ve just used it within a fresh install and it works…

    What databases are used/created when the plugin is installed? And can I do a full ‘reinstall’ (databases and all) in someway?

    Cheers

    Plugin Author sewpafly

    (@sewpafly)

    It doesn’t use any special tables but it does require the php-GD or imagemagick plugins. (if you look @ php info you should see a GD or imagemagick section). Someone suggested that I needed to add a check for this.

    Here’s a quick check that you can add in php/overwrite_imgedit_preview.php (and then reload the link above that was broken/returned 0)

    // Replace the pte_stream_preview_image method
    /**
     * From wp-admin/includes/image-edit.php
     */
    function pte_stream_preview_image( $post_id ) {
    	$post = get_post( $post_id );
    	@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
    
    	$img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) );
    
    	if ( is_wp_error( $img ) ) {
    		print( "ERROR: Couldn't get wordpress image editor" );
    		return false;
    	}
    
    	// scale the image
    	$size = $img->get_size();
    	$w = $size['width'];
    	$h = $size['height'];
    
    	$ratio = pte_image_get_preview_ratio( $w, $h );
    	$w2 = $w * $ratio;
    	$h2 = $h * $ratio;
    
    	if ( is_wp_error( $img->resize( $w2, $h2 ) ) ) {
    		print( "ERROR: call to wordpress resize function failed" );
    		return false;
    	}
    
    	return wp_stream_image( $img, $post->post_mime_type, $post_id );
    }

    No change

    Plugin Author sewpafly

    (@sewpafly)

    You might have to go get the link again, the _ajax_nonce field only grants access for a 24 hour period. If that doesn’t work, I have another method to replace as well.

    Got another link. Tried with additional code you give, still getting error message:

    Error: Image corrupt or truncated: http://localhost/everythingdifferent/wp-admin/admin-ajax.php?action=pte_imgedit_preview&_ajax_nonce=80b1b21ee5&postid=107&rand=33499
    Source File: http://localhost/everythingdifferent/wp-admin/admin-ajax.php?action=pte_imgedit_preview&_ajax_nonce=80b1b21ee5&postid=107&rand=33499
    Line: 0

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘crop and resize – page not loading properly’ is closed to new replies.