• Resolved Sjeiti

    (@sjeiti)


    I’m getting a few errors (I’ve removed the full path for clarity).

    The first is on initialisation of the popup after clicking on thumbnails from the media library:
    Notice: Use of undefined constant size_information – assumed ‘size_information’ in (…)\wp-content\plugins\post-thumbnail-editor\php\functions.php on line 255

    The second occurs in the ajax callback after doing a crop and clicking ‘create thumbnails’:
    Notice: Undefined offset: 1 in (…)\wp-content\plugins\post-thumbnail-editor\php\log.php on line 83

    Notice: Undefined index: log in (…)\wp-content\plugins\post-thumbnail-editor\php\functions.php on line 57
    {“thumbnails”:{“thumbnail”:{“url”:”(…)\/wp-content\/uploads\/ptetmp\/199\/463226253TUKCrS_fs-2-150×150.jpg”,”file”:”463226253TUKCrS_fs-2-150×150.jpg”},”medium”:{“url”:”(…)\/wp-content\/uploads\/ptetmp\/199\/463226253TUKCrS_fs-2-300×273.jpg”,”file”:”463226253TUKCrS_fs-2-300×273.jpg”},”large”:{“url”:”(…)\/wp-content\/uploads\/ptetmp\/199\/463226253TUKCrS_fs-2-1024×931.jpg”,”file”:”463226253TUKCrS_fs-2-1024×931.jpg”}},”pte-nonce”:”9bf22a6cca”,”pte-delete-nonce”:”fca2c18feb”,”error”:[“[WARNING] – Buffered output:
    \nNotice<\/b>: wp_load_image is niet meer in gebruik<\/strong> sinds versie3.5! Gebruik in plaats daarvan wp_get_image_editor(). in (…)\\wp-includes\\functions.php<\/b> on line 2824<\/b>
    \n”]}

    Translation of that last part is: ‘wp_load_image is no longer in use since version 3.5! Use wp_get_image_editor() instead’

    https://www.ads-software.com/extend/plugins/post-thumbnail-editor/

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

    (@sewpafly)

    I’m not sure where you are getting that error message from. I just verified that my code does not call wp_load_image, so if that’s happening it’s either from a different plugin, or a corrupted wordpress install.

    At least that’s what I can tell without more information… If you are willing you could follow the steps below to get some additional debugging logs that I can look at.

    1. Go to Settings -> Post Thumbnail Editor and disable thickbox and enable debugging.
    2. Start PTE on one of your images
    3. Try to crop it. If the process doesn’t work the way it should, describe what you did and what you were expecting to happen, and then use the debug tab to get a copy of the logs that I can look at.
    Thread Starter Sjeiti

    (@sjeiti)

    Ok…

    adjusted settings
    went to media library
    selected ‘Thumbnails’
    in popup iframe:
    clicked ‘Select: All’ to check all checboxes
    dragged a selection in the image
    clicked ‘Create thumbnails’
    waited for gray overlay to disappear
    nothing changed so I then tried again to drag a selection
    and clicked ‘Create thumbnails’

    The iframe showed exactly the same msg at the top… and the XHR had the same error in the returned JSON.

    Here’s the log from the error tab:

    20130117 16:59:17 – [string] ===== STARTUP PHP MESSAGES =====
    20130117 16:59:17 – [string] ===== SERVER LOG =====
    20130117 16:59:17 – [string] [DEBUG] – PARAMETERS: Array
    (
    [action] => pte_ajax
    [pte-action] => launch
    [id] => 199
    )

    20130117 16:59:17 – [string] [DEBUG] – PTE-VERSION: 1.0.7
    20130117 16:59:17 – [string] [DEBUG] – USER-AGENT: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
    20130117 16:59:17 – [string] [DEBUG] – WORDPRESS: 3.5
    20130117 16:59:17 – [string] [DEBUG] – SIZER: 0.22547914
    20130117 16:59:17 – [string] [DEBUG] – SIZES: Array
    (
    [thumbnail] => Array
    (
    [width] => 150
    [height] => 150
    [crop] => 1
    [current] => Array
    (
    [file] => 463226253TUKCrS_fs-2-150×150.jpg
    [width] => 150
    [height] => 150
    [crop] => 1
    [path] => 2013/01/463226253TUKCrS_fs-2-150×150.jpg
    [url] => https://localhost/test/wordpress/wp-content/uploads/2013/01/463226253TUKCrS_fs-2-150×150.jpg
    )

    )

    [medium] => Array
    (
    [width] => 300
    [height] => 300
    [crop] =>
    [current] => Array
    (
    [file] => 463226253TUKCrS_fs-2-300×203.jpg
    [width] => 300
    [height] => 203
    [mime-type] => image/jpeg
    [path] => 2013/01/463226253TUKCrS_fs-2-300×203.jpg
    [url] => https://localhost/test/wordpress/wp-content/uploads/2013/01/463226253TUKCrS_fs-2-300×203.jpg
    )

    )

    [large] => Array
    (
    [width] => 1024
    [height] => 1024
    [crop] =>
    [current] => Array
    (
    [file] => 463226253TUKCrS_fs-2-1024×693.jpg
    [width] => 1024
    [height] => 693
    [mime-type] => image/jpeg
    [path] => 2013/01/463226253TUKCrS_fs-2-1024×693.jpg
    [url] => https://localhost/test/wordpress/wp-content/uploads/2013/01/463226253TUKCrS_fs-2-1024×693.jpg
    )

    )

    )

    20130117 16:59:19 – [string] ===== REFLOW =====
    20130117 16:59:19 – [string] ===== FIXING THICKBOX =====
    20130117 16:59:19 – [string] WINDOW WIDTH: 762
    20130117 16:59:34 – [string] ===== SETTING ASPECTRATIO: 1:1 =====
    20130117 16:59:44 – [string] ===== RESIZE-IMAGES =====
    20130117 16:59:44 – [object] {“id”:”199″,”action”:”pte_ajax”,”pte-action”:”resize-images”,”pte-sizes[]”:[“thumbnail”,”medium”,”large”],”x”:1130,”y”:332,”w”:616,”h”:616}
    20130117 17:00:25 – [string] ===== RESIZE-IMAGES =====
    20130117 17:00:25 – [object] {“id”:”199″,”action”:”pte_ajax”,”pte-action”:”resize-images”,”pte-sizes[]”:[“thumbnail”,”medium”,”large”],”x”:1237,”y”:350,”w”:536,”h”:536}
    20130117 17:02:10 – [string] ===== REFLOW =====
    20130117 17:02:10 – [string] ===== FIXING THICKBOX =====
    20130117 17:02:10 – [string] WINDOW WIDTH: 764
    20130117 17:02:10 – [string] ===== REFLOW =====
    20130117 17:02:10 – [string] ===== FIXING THICKBOX =====
    20130117 17:02:10 – [string] WINDOW WIDTH: 766
    20130117 17:02:14 – [string] ===== REFLOW =====
    20130117 17:02:14 – [string] ===== FIXING THICKBOX =====
    20130117 17:02:14 – [string] WINDOW WIDTH: 762
    20130117 17:02:14 – [string] ===== REFLOW =====
    20130117 17:02:14 – [string] ===== FIXING THICKBOX =====
    20130117 17:02:14 – [string] WINDOW WIDTH: 762

    Plugin Author sewpafly

    (@sewpafly)

    Ok, try changing line 255 of php/functions.php from this:

    $logger->debug( "SIZES: " . print_r(${size_information}, true) );

    to this:

    $logger->debug( "SIZES: " . print_r($size_information, true) );

    Does this change anything?

    Having the same issue. I changed that line of PHP to
    $logger->debug( "SIZES: " . print_r($size_information, true) );
    but nothing changed.

    I make my selection and click “Create Thumbnails” button. The loading icon comes up then goes away, but no success message and no change to the thumbnail I needed edited.

    Thoughts

    Plugin Author sewpafly

    (@sewpafly)

    OK, pretty sure that the problem is in the javascript then (the earlier messages had me thinking it was in the PHP). It looks like you are using chrome, so could you load the PTE page and press ctrl+shift+j? This should open the javascript console. The output should look similar to what you see on the debug tab that you pasted here earlier, but I need you to look specifically for anything in red.

    If you don’t see anything, leave this window up and go back to the PTE page and try to crop your thumbnail. Look for anything in red to appear in the console, and then report back.

    Thanks

    I’m using Firefox.

    This is the exact error I’m getting:

    Notice: Use of undefined constant size_information – assumed ‘size_information’ in [shortened URL string]/wp-content/plugins/post-thumbnail-editor/php/functions.php on line 255

    I have Firebug installed and I’m not getting any JavaScript errors.

    Plugin Author sewpafly

    (@sewpafly)

    I’m a little confused now… I don’t understand why you are getting that notice… What version of php are you running? On what OS? Do you see the call $size_information = pte_get_all_alternate_size_information( $id ); on line 229 of functions.php?

    These appear to be different errors than you stated above… Did the last change make this error appear? If you revert the change does it go back to the previous problem?

    I guess my issue is different than @sjeiti.

    This is what I’m using (locally):
    PHP Version 5.3.6
    OS X Snow Leopard
    Browser: Firefox 18.0.1

    On line 229 it reads:

    $size_information = pte_get_all_alternate_size_information( $id );

    When I click the “Thumbnails” link the Media Library to activate the Thickbox overlay, this is what I see:

    Screenshot

    Any other thoughts?

    Plugin Author sewpafly

    (@sewpafly)

    @sjeiti – I turned on WP_DEBUG and saw many of the same issues. The latest fixes can be found here.

    @sdaweb – Can you try installing this latest version and letting me know if you still see some issues. (Also disable thickbox).

    Thanks!

    I uploaded/installed the alpha version of your plugin. Not sure how to disable thickbox, since this comes default with wordpress. When trying to use the alpha-version of the plugin, the lightbox (thickbox) pops up and I can’t get passed the loading screen. I noticed the red “DEBUG” in the right corner.

    Screenshot

    I noticed this on the Thickbox Codex:

    Note: As of WordPress 3.5, the “Media” button for WordPress’s post editor no longer utilizes ThickBox, but instead uses a custom Javascript modal. ThickBox is still used for other WordPress components and may still be used by developers.

    Not sure if that really applies to your plugin, though.

    Plugin Author sewpafly

    (@sewpafly)

    Disable thickbox in Settings → Post Thumbnail Editor.

    The next step is to use google chrome and press ctrl+shift+J and look for any errors in the console. (Also firefox with the firebug extension would work). This should provide me with some more information.

    I’m not sure where you’re at, but maybe we could connect via Skype to hash this out. Let me know.

    This is what I see when clicking the “Thumbnails” link:
    ReferenceError: log is not defined
    ReferenceError: pte is not defined.
    Screenshot

    Plugin Author sewpafly

    (@sewpafly)

    Here we go:

    20130125 17:26:51 - [string] ===== STARTUP PHP MESSAGES =====
    20130125 17:26:51 - [string] ===== SERVER LOG =====
    20130125 17:26:51 - [string] [DEBUG] - PARAMETERS: Array
    (
        [action] => pte_ajax
        [pte-action] => launch
        [id] => 164
        [TB_iframe] => true
        [height] => 550
        [width] => 750
    )
    
    20130125 17:26:51 - [string] [WARNING] - Couldn't find or generate metadata for image: 164-large
    20130125 17:26:51 - [string] [DEBUG] - PTE-VERSION: 2.0.0-alpha
    20130125 17:26:51 - [string] [DEBUG] - USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:18.0) Gecko/20100101 Firefox/18.0
    20130125 17:26:51 - [string] [DEBUG] - WORDPRESS: 3.5.1
    20130125 17:26:51 - [string] [DEBUG] - SIZER: 0.40000000
    20130125 17:26:51 - [string] [DEBUG] - SIZES: Array
    (
        [thumbnail] => Array
            (
                [width] => 150
                [height] => 150
                [crop] => 1
                [current] => Array
                    (
                        [file] => goggles-150x150.jpg
                        [width] => 150
                        [height] => 150
                        [path] => 2012/11/goggles-150x150.jpg
                        [url] => https://localhost/PoolMaster/www/wp-content/uploads/2012/11/goggles-150x150.jpg
                    )
    
            )
    
        [medium] => Array
            (
                [width] => 300
                [height] => 300
                [crop] =>
                [current] => Array
                    (
                        [file] => goggles-300x225.jpg
                        [width] => 300
                        [height] => 225
                        [path] => 2012/11/goggles-300x225.jpg
                        [url] => https://localhost/PoolMaster/www/wp-content/uploads/2012/11/goggles-300x225.jpg
                    )
    
            )
    
        [large] => Array
            (
                [width] => 1024
                [height] => 1024
                [crop] =>
                [current] =>
            )
    
        [shop_thumbnail] => Array
            (
                [width] => 50
                [height] => 50
                [crop] => 1
                [current] => Array
                    (
                        [file] => goggles-90x90.jpg
                        [width] => 90
                        [height] => 90
                        [path] => 2012/11/goggles-90x90.jpg
                        [url] => https://localhost/PoolMaster/www/wp-content/uploads/2012/11/goggles-90x90.jpg
                    )
    
            )
    
        [shop_catalog] => Array
            (
                [width] => 150
                [height] => 150
                [crop] => 1
                [current] => Array
                    (
                        [file] => goggles-150x150.jpg
                        [width] => 150
                        [height] => 150
                        [path] => 2012/11/goggles-150x150.jpg
                        [url] => https://localhost/PoolMaster/www/wp-content/uploads/2012/11/goggles-150x150.jpg
                    )
    
            )
    
        [shop_single] => Array
            (
                [width] => 300
                [height] => 300
                [crop] => 1
                [current] => Array
                    (
                        [file] => goggles-300x300.jpg
                        [width] => 300
                        [height] => 300
                        [path] => 2012/11/goggles-300x300.jpg
                        [url] => https://localhost/PoolMaster/www/wp-content/uploads/2012/11/goggles-300x300.jpg
                    )
    
            )
    
    )
    
    20130125 17:26:51 - [string] ===== REFLOW =====
    20130125 17:26:51 - [string] WINDOW WIDTH: 2560
Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘errors’ is closed to new replies.