• Resolved cocoroco

    (@cocoroco)


    What I did:
    I installed WP 3.5.1 vanilla, no plugins, no themes, no nothing, just the standard installation. I logged in and went to edit the default “Hello World” post, to which I add a featured image. I then clicked “edit image”.

    What I expected:
    The media editor interface.

    What I found:

    1. In chrome, a broken image is shown instead of the image, in firefox, nothing at all is shown.

      In both cases, the following request returns “-1”

      ../wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=a64c8f6b8f&postid=5&rand=43190

      There’s also a block .wp_attachment_image whith an inline style “display:none” inside of which the original image is correctly loaded in both cases.

    2. If I try to scale the image, the message “Unable to create new image.” is shown when I push the “scale” button

    What I tried:
    There are many problems pointing this problem ([1], [2], and others) but they point to problems on plugins or themes as the source of the problem, which can’t possibly be my case (unless the problem is in the default theme, which will be even more severe of a bug), or they are just unsolved.
    As I have no themes or plugins installed, I have no idea what to try.

    My system:

    • Ubuntu 12.10 (3.5.0-25-generic 64 bits)
    • Apache 2.2.22
    • WP permissions are 755 for directories and 544 for files, and owner/group is www-data:www-data
Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    (@esmi)

    Try checking your site’s error logs for specific error messages. Your host should be able to help you in accessing your site’s error logs.

    Thread Starter cocoroco

    (@cocoroco)

    Maybe I wasn’t clear: the request which is supposed to return the editable image:
    ../wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=a64c8f6b8f&postid=5&rand=43190
    returns a 200 OK HTTP response with the content ‘-1’, not any error response. There are NO error responses.

    I even switched PHP error reporting on, as well as WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY and SCRIPT_DEBUG and no errors are shown on the screen, the apache logs, or wp-contents/debug.log

    As I said I’m using a plain WP installation on a quite standard (x)ubuntu box.

    Thread Starter cocoroco

    (@cocoroco)

    OK I found it.

    The problem was caused because WordPress uses the GD Graphic Library to manipulate images (see wp-admin/includes/image.php), which I didn’t have installed.

    As far as I could find, the requirement to have mod-gd installed is not mentioned anywhere (specifically not here) , I think it would be a good idea to update the docs.

    Thanks everyone!

    Mark me down as well for recommending this get included on the requirements page. I had this issue as well and cocoroco’s comment above is the only thing that pointed me in the right direction. Kind of an important requirement.

    Thanks,
    Mike

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

The topic ‘Edit Media not working’ is closed to new replies.