Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • @nixonvs – the line numbers have changed since 14.6. Don’t change that line. Have a look at @bgermann’s post – you’re looking for a line that starts $cfadmin =.

    Comparing the current code with version 14.6.4 (not sure exactly which version you have), it’ll probably be a few lines after a comment saying
    ### add actions
    and right after one saying
    $admin = is_admin();

    In 14.6.4 it’s
    $cfadmin = ( strpos($_SERVER['QUERY_STRING'],$plugindir.'/cforms')!==false )?true:false;
    though it might be different in your version.

    Replace it with the green line in @bgermann’s gist:
    $cfadmin = strpos($_SERVER['QUERY_STRING'], 'cforms') !== false;

    For what it’s worth, after looking at the wpdb code, I added

    define(‘WP_USE_EXT_MYSQL’, true);

    to my wp-config.php, and it fixed both errors (without needing to change ExportBase.php). Unfortunately I can’t find any documentation on that setting, so use it at your own risk.

    This thread says mysql_real_escape_string() calls need to be replaced with esc_sql() in WordPress 3.9.

    Sadly, that means changes to the plugin code. I can’t see an obvious place to raise a ticket.

    I replaced the calls in ExportBase.php, and the plugin seems to work, though I still get the mysqli_set_charset() expects parameter 1 to be mysqli error.

    I haven’t tested, but I think that approach should work. I think your problem is that you have quotes inside your string. The easiest fix would be to replace the outside quotes with single quotes, like this:

    <?php _e('<!--:en--><img src="https://webpage.se/wp-content/uploads/2012/11/loggo3.png" alt="Logo" style="width: 300px;"><!--:--><!--:sv--><img src="https://webpage.se/wp-content/uploads/2012/11/loggo2.png" alt="Logo" style="width: 300px;"><!--:-->'); ?>

    Otherwise, you’ll need to escape all the inner quotes, eg

    <?php _e("<!--:en--><img src=\"https://webpage.se/wp-content/uploads/2012/11/loggo3.png\" alt=\"Logo\" style=\"width: 300px;\"><!--:--><!--:sv--><img src=\"https://webpage.se/wp-content/uploads/2012/11/loggo2.png\" alt=\"Logo\" style=\"width: 300px;\"><!--:-->"); ?>

    Looks like a change to pte_get_width_height in plugins/post-thumbnail-editor/php/functions.php has solved it for me. I changed:

    // Crop isn't set so the height / width should be based on the biggest side
    	else if ($w > $h){

    to

    // Crop isn't set so the height / width should be based on the biggest side
    	else if ($w > $h || $size_information['height'] == 0 ){

    Hope that helps.

    I’m seeing the same thing. I suspect the path’s a red herring – note the file it’s trying to create ends 0x0.jpg.

    In my particular case, I’ve got a custom image size:
    add_image_size( 'curator-thumbnail', 300, 0 );

    Note that I’m only specifying a maximum width.

    If the new thumbnail is wider than it is high, it gets created OK. If it’s higher than it is wide, I get the error.

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