Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Does it happen on all sites?

    Hi there,

    I’ve the same issue in my personnal site.

    like joseph, i’ve tried to disable all plugins and templates, no changes.

    I’ve already tried to delete the entire DB, and install a totally new version of WordPress, the error is still here. Same with removing all the empty line in the function.php.

    PHP 5.2 and GD Lib is installed. http://www.fredericpavageau.net/indexphpinfo.php

    I don’t find any other solutions on the web…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    frederiiiic – Again, does it happen on ALL sites on the network?

    if you’re not using Multisite, please make a new post in the general section πŸ™‚

    I’m not on a multisite.

    I’ve solved the issue with the auto installation of wordpress provided by my host service… but even with that solution that work fine, i didn’t point the problem, it seem that they’ve installed strictly the same files, .htacces and php.ini configuration.

    My problem is that if this happens again, i’ve any explaination to solved it.

    And yes it’s working on other sites on the network, even on my first own installation for 2 weeks, and now.

    Thread Starter Joseph Dickson

    (@josephdickson)

    Hi Mika, It’s broken on all sites within my multisite installation.

    White space shouldn’t be an issue as I’ve turned off all plugins and switched to an unmodified version of the 2012, and 2014 themes.

    My single sites on other servers are okay.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I’m not on a multisite

    Then you need to not post in the multisite Section.

    Joseph, try reinstalling wordpress’s core files.

    Thread Starter Joseph Dickson

    (@josephdickson)

    Hi Mika,
    I’ve reinstalled via the automatic updater. No luck my problem is elsewhere.

    Here is a sample img url form the broken editor icon

    http://pitweb.pitzer.edu/admission/wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=fe2e5e897d&postid=2068&rand=79730

    Which is accompanied by the following message in Firefox when I try to view it in the browser.

    “The image “http://pitweb.pitzer.edu/admission/wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=fe2e5e897d&postid=2068&rand=79730″ cannot be displayed because it contains errors.”

    I had a look at admin-ajax.php and it looks fine, identical to a working installation.

    So I’m thinking there is a database error or permissions conflict or perhaps an ajax dependency that isn’t being met on the server.

    I’m having an occasional symptom where posts send back a 404 page until I re-save the permalinks and everything suddenly works fine.

    I’m starting to think my server is borked πŸ™

    I’ll try uploading my site to a testing server housed remotely and see if the problem persists.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Don’t do it via the updater, do it manually. In fact, delete wp-includes and wp-admin folders before you do it.

    Thread Starter Joseph Dickson

    (@josephdickson)

    Solved.

    I had a single newline of white space before <?php in my wp-config.php file which explains why all sites on this multisite were affected. That file like others in the wp-admin folder are shared by every site on the network. This explains why swapping out themes and disabling every plugin didn’t fix the problem.

    Mika, your solution to delete wp-admin would have also worked had I seen your reply sooner. It would have given me a fresh wp-config.php file to work with.

    Process

    I narrowed the whole thing down by installing a fresh multisite on a temporary server. When I uploaded my backups and everything worked I figured the problem had to be in how I set up wp-config.php. As soon as I opened the file and saw the newline of white space in my text editor corrected it and everything magically worked.

    It never occurred to me the error was in wp-config and had lived there for a very long time, possibly from the first day I set up the site.

    Error Example

    Β    <?php
    
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */

    Fixed exmaple

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */

    Thanks again Mika, that would be twice I owe you now.

    Thread Starter Joseph Dickson

    (@josephdickson)

    Update: This also fixed white space warnings I had in UpdraftPlus: A backup plugin and Yoast WordPress SEO: XML sitemaps.

    With Updraft Plus I’d get a repeated 404 error when it tried uploading the backups to Dropbox.

    So far the backup is running without any errors.

    This one tiny mistake created a lot of havok.

    As an addition to this – I just fixed an issue with editing media by removing the closing PHP tag and trailing newlines in a theme file.

    Be sure to look at the bottom of your PHP files too, not just the top.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Edit Media > broken image, can't crop or edit’ is closed to new replies.