Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Can’t edit main theme php files after upgrading to 4.9

Discussion in 'Misc WordPress Requests' started by BackuPs, Nov 17, 2017.

  1. BackuPs


    Reply To: Can’t edit main theme php files after upgrading to 4.9, by BackuPs

    well that error makes sense. Since its a localhost install and the website domain name is in the host file and only visible on the pc who has that xxx.xxx.xxx.xxx website.tst in his host file.

    [Fri Nov 17 13:44:37.266751 2017] [:error] [pid 1125] [client] WP_Error::__set_state(array(\n 'errors' => \n array (\n 'http_request_failed' => \n array (\n 0 => 'cURL error 6: Could not resolve host: website.tst',\n ),\n ),\n 'error_data' => \n array (\n ),\n)), referer: http://website.tst/wp-admin/theme-editor.php?file=functions.php&theme=twentyseventeen

    So i tried a life server with a domain name that is accessible without modding the hostfile.

    Now i get this

    [17-Nov-2017 13:01:12 UTC] ------------------------------------------->
    [17-Nov-2017 13:01:12 UTC] Starting edit check
    [17-Nov-2017 13:01:12 UTC] Body:
    [17-Nov-2017 13:01:12 UTC] <!DOCTYPE html>
    <html style="height:100%">
    <head><title> 403 Forbidden
    <body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
    <div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
    <h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">403</h1>
    <h2 style="margin-top:20px;font-size: 30px;">Forbidden
    <p>Access to this resource on the server is denied!</p>

    [17-Nov-2017 13:01:12 UTC] Connection created

    But if i remove the lines 491-598 in file.php it just works fine and the file is edited and saved with the correct made modifications.

    So the 403 does not make sense as without that piece of code the file is just edited and saved.

    Please let me know what else i can test for you.

    Note changing the file permissions of that php file to 777 does not resolve the error message. It only works if i remove the complete php functions that checks for something that apparently is not needed as it works without that check.

    Reply To: Can’t edit main theme php files after upgrading to 4.9

Share This Page

Web Hosting