WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't edit/update Header– Error 400 Bad Request (11 posts)

  1. jbaugh
    Member
    Posted 1 year ago #

    Suddenly for no obvious reason today I find that I cannot edit my WP site's Header section in wp-admin. I am an extreme novice with WP but I have been able to edit this section without any difficulty on numerous occasions over the past year. But now if I make any change under Appearance/Editor/Header, when I click "Update File" I receive an error page that says "400 Bad Request" "Invalid request".

    I don't have a clue how to troubleshoot this. Can someone please help me figure this out. I will be most appreciative.

    Thanks.
    John

  2. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    First try the standard troubleshooting steps like deactivating and activating plugins (one-by-one), reverting to Twenty Eleven theme, resetting permalinks, etc. It seems one or more of your plugins may be problematic. Report back if these don't work.

  3. jbaugh
    Member
    Posted 1 year ago #

    Thanks Krishna.
    I have tried to follow your instructions. I first deactivated each plugin one at a time. This had no effect on my problem. I selected the Twenty Eleven theme, again with no effect, still getting the invalid request error.
    I'm not sure what "resetting permalinks" involves. But I did go to the permalinks section under settings and selected a different option under Common Settings and saved the changes. This had no effect.

    I am really a novice working with WP. I did discover, however, that I can make my desired changes in the header.php file by downloading it with my FTP client and directly editing it and then re-uploading it. But this seems an awkward way to accomplish my purposes.

    I have been able to edit the header.php file without difficulty for nearly 2 years. Why would this problem suddenly occur? I haven't added any new plugins recently nor have I made any structural changes to my site.
    Thanks for you interest and help.
    John

  4. jbaugh
    Member
    Posted 1 year ago #

    I don't know if this is helpful or not but I've noticed that I get the 400 error when trying to edit other .php files as well as the header.php file.
    All of the files listed under "Template" in the editor will update except for these:

    archives.php
    comments.php
    functions.php
    header.php

    John

  5. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Can you post your site URL?

  6. jbaugh
    Member
    Posted 1 year ago #

    The URL is:

    lccut.org

  7. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    The problem may be caused by the theme (which seems to be badly edited) and the html/ markup errors. The theme might be in conflict with other latest software and server settings.

    Moreover, I don't find such 404 errors on your site. As you said, you get the error only when you edit the theme templates.

    Which theme are you using? Liberty? Can you contact its author?

  8. jbaugh
    Member
    Posted 1 year ago #

    I'm using the "Liberty" theme. It is very unlikely that the author would respond to my request for help. You may well be correct in your suspicion that the problem is caused by the theme. But it seems strange that it has worked for the past 2 years and then now suddenly doesn't. The only recent change I've made to the coding is the addition of some commenting entries in the header.php.

    Thank you for including the link to the markup errors. Do you think it would help if I were to go through those errors and try to correct them?

    Thanks again.
    John

  9. The_Blog_Effect
    Member
    Posted 1 year ago #

    Hello,

    If you didn't change anything in wordpress or your theme, then it could be a server issue: Below is a link to help resolve 400 server errors

    http://getnetgoing.com/HTTP-400.html#causes_solutions

    Hope this helps
    Acey

  10. jbaugh
    Member
    Posted 1 year ago #

    I don't know why exactly, but the error 400 problem is resolved! Thanks Krishna and Acey for your suggestions and help.

    I simply reviewed the large list of markup errors that was generated when Krishna ran the validation service on my site. I picked out some that seemed easy enough for me to fix and I fixed a handful of them. I had no idea what to do with the "ID features already defined" errors so I left them alone.

    Much to my surprise, when I tried to directly edit header.php in wp-admin it worked fine with no 400 error message.

    John

  11. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    Glad to note that you could resolve the issue. As you have fixed some of the markup errors, that might have fixed the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic