Support » Fixing WordPress » Unable to edit theme in editor after WordPress 4.9 Update

  • saadi123

    (@saadi123)


    My hosting service provider recently updated my WordPress to 4.9.

    After that, I’m receiving error whenever I try to edit any file in the Appearance -> Editor section.

    The error it gives is: Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    OR

    “Scrape Nonce Failed”.

    Please let me know if there’s a solution to it as I feel that the real issue is with the new version of WordPress because I’ve seen the same error with other users after they upgraded to 4.9.

    Someone said that a plugin will resolve the issue but I want to keep the plugins at minimum.

    Looking for the resolution ASAP.

    Thanks,
    Saad.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Steve Stern

    (@sterndata)

    Please install the health check plugin and report back its findings: https://wordpress.org/plugins/health-check/

    Thanks Steven for the help.

    However, I installed this plugin and whenever I click on “Health Check” link (of course, after installing), it just keeps loading and eventually ends with 504 Gateway Timeout error.

    Is this a known error?

    Yui

    (@fierevere)

    ru.wordpress.org team, ru_RU support & translation

    the timeout for checking loopback request is too high, so it does not properly report when your site is unable to make loopback requests to itself.

    This is the reason why theme/plugin editors arent working, you may have WP_CRON problems as well.

    Do you use any contact form plugins? try disabling them first and checking again.
    Maybe this can be other plugins as well. Please report your plugin list and your findings when you disable them one-by-one and checking with health-check again.

    Hi Yui and Steve,

    First, thanks for the response.

    Second, I deactivated just one plugin. That’s Short Pixel Image Optimizer.

    As soon as I de-activated it, I’m able to edit the file in the editor now.

    In fact, the Health Check plugin is also working now.

    However, the Health Check plugin is giving me the following error:
    Some files are not writable by WordPress:
    wp-settings.php
    wp-cron.php
    wp-comments-post.php
    wp-activate.php
    wp-admin/link-parse-opml.php
    wp-admin/js/editor.js
    wp-admin/js/user-profile.min.js
    wp-admin/js/word-count.min.js
    wp-admin/js/tags-suggest.js
    wp-admin/js/tags-box.js
    wp-admin/js/theme-plugin-editor.js
    wp-admin/js/image-edit.js
    wp-admin/js/updates.min.js
    wp-admin/js/postbox.min.js
    wp-admin/js/nav-menu.min.js
    wp-admin/js/theme.min.js
    wp-admin/js/custom-header.js
    wp-admin/js/media-upload.js
    wp-admin/js/color-picker.js
    wp-admin/js/iris.min.js

    Do I still need to worry about this message?

    P.S: I haven’t checked if reactivating the deactivated plugin will bring back the error so I’ll go ahead, test it and update over here.

    Thanks.

    Ok. Here’s the update.

    Just to update that above wasn’t fluke, I reactivated the Shortpixel Image Optimizer plugin and again, I wasn’t able to edit the php file from the editor.

    So I guess, in my case Shortpixel Image Optimizer is the problematic plugin.

    Regards,
    Saad.

    While I’ll be waiting for the update/help on the issue above. Especially pertaining to the WordPress unable to edit files, I’ve written full account of the above issue over here: http://theusualstuff.com/wordpress-4-9-error-edit-files-resolved/

    Just in case someone needs help.

    Should I mark this as resolved?

    Yui

    (@fierevere)

    ru.wordpress.org team, ru_RU support & translation

    We’ve found unconditional calling of session_start() from plugin/theme code as the source of frozen death problem with wp_remote_get() to site itself, Shortpixel plugin does call session_start() unconditionally

    Actually many plugins do that, so i’m not yet aware what the solution could be, but finding the source of the problem is the most important step.

    Could you please try also with the latest version of ShortPixel plugin (4.8.4)? It’s intended to fix this problem.

    @fierevere, what do you mean by calling session_start() unconditionally? It currently is called only when no session is active (session_id() false). What other condition would be advisable?
    Thanks,

    Yui

    (@fierevere)

    ru.wordpress.org team, ru_RU support & translation

    what do you mean by calling session_start() unconditionally?

    meant – calling on every page, even when its not needed.
    /wp-admin/ definitely does not need a session from image olugin.
    Another example – https://wordpress.org/plugins/contact-form-plugin/
    it does create session for every visitor as well. even for /wp-admin/
    Good example – https://ru.wordpress.org/plugins/si-contact-form/
    This plugin calls session_start() only on page with contact form to load captcha

    WordPress itself does not use sessions.

    Yui

    (@fierevere)

    ru.wordpress.org team, ru_RU support & translation

    ShortPixel Image Optimizer v 4.8.4
    Its broken

    script_filename = /sandbox/sandbox3/wp-admin/index.php
    [0xb6c19810] session_start() /sandbox/sandbox3/wp-content/plugins/shortpixel-image-optimiser/class/wp-short-pixel.php:23
    [0xb6c197a0] __construct() /sandbox/sandbox3/wp-content/plugins/shortpixel-image-optimiser/wp-shortpixel.php:80
    [0xb6c196d0] shortpixelInit() /sandbox/sandbox3/wp-includes/class-wp-hook.php:286
    [0xb6c19610] apply_filters() /sandbox/sandbox3/wp-includes/class-wp-hook.php:310
    [0xb6c195c0] do_action() /sandbox/sandbox3/wp-includes/plugin.php:453
    [0xb6c194e0] do_action() /sandbox/sandbox3/wp-settings.php:450
    [0xb6c19360] [INCLUDE_OR_EVAL]() /sandbox/sandbox3/wp-config.php:166
    [0xb6c19300] [INCLUDE_OR_EVAL]() /sandbox/sandbox3/wp-load.php:37
    [0xb6c19280] [INCLUDE_OR_EVAL]() /sandbox/sandbox3/wp-admin/admin.php:31
    [0xb6c190f0] [INCLUDE_OR_EVAL]() /sandbox/sandbox3/wp-admin/index.php:10

    Hi, I have the same problem. Can’t edit theme files in the editor. When I deactivate the plugin “USP Pro” (which creates contact files) it works again. All this is since I updated to WP 4.9. What can I do?

    Hi @soncha7,

    Deactivate the plugin, which you’ve already done.

    Inform the plugin developer.

    Create a new thread so that proper log of that plugin is kept.

    Let the plugin developer know about that thread.

    Thank you.

    Update

    I updated to the newest version of the Shortpixel Image Optimizer and its working now.

    I can edit my files with the in the file editor now.

    So the error is resolved now.

    I have this problem too, and was able to isolate it to the Pods Framework plugin on my site. I left notes on their support forum and blog notifying them of this WP4.9 incompatibility–hopefully they’ll release an update soon.

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.