WordPress.org

Ready to get started?Download WordPress

Forums

Update page after adding media library image, get 404 (24 posts)

  1. owlsheadbiz
    Member
    Posted 1 year ago #

    I've been having problems with an inherited website. The latest problem is that when we insert an image stored in the media library to a page, we get a 404 error upon updating the page and the changes are not saved. In a few cases, we get the 404 error as we are inserting the image (and the image is not inserted).

    Tonight, I updated everything - WP 3.4.2 > 3.5.1, updated all plugins (and, yes, tried doing all of my editing with the plugins disabled). I had the problem before the updates, and I have the problem after the updates.

    On one page, I was able to successfully insert the image "from url" (despite that url pointing to our own media library). While I am able to insert images using the url (and see them just fine in the visual editor) on other pages, when I click Update to save the page, I get a 404 error.

    I am able to save the page if I haven't made any changes AND if I make changes to the text. But I can't save with an image in there.

    Here's the line of code I'm attempting to add:

    <img src="http://thrivingplanet.org/elisa/wp-content/uploads/2013/03/Screen-Shot-300x91.jpg" alt="Screen-Shot" width="300" height="91" class="alignnone size-medium wp-image-1590" />

    I tried stripping out everything - class, width, height - and leaving only the <img src="..."> code. No dice. I still get a 404 error upon saving the page.

    Here's the page where I am trying to insert the code above:

    http://thrivingplanet.org/england-gaunts-house-dorset-may-24-26/

    Anyone have any thoughts? I found a few threads about 404 on update, but all of the posts I read were 3 or 4 years old and it looked as if their content was saved, whereas my changes are not.

    TIA, ~KJ

  2. owlsheadbiz
    Member
    Posted 1 year ago #

    Also, I should note - the web server in question runs php 5.2.17. Not sure I have much control over that, and the client is in the midst of a big fundraising push. I don't anticipate moving the site, at least until the campaign is completed next month.

  3. owlsheadbiz
    Member
    Posted 1 year ago #

    We are now unable to save any page or post update without getting a 404 error upon save - even pages/posts with no images embedded.

    I have:

    • Deleted extraneous files/directories from the root directory (nothing looked out of place, but disk space was limited)
    • Installed and run Anti-Malware (0 found threats, 13 skipped files - why? I have it sent NOT to skip any file extensions or directories + 16 "potential threats" that are "probably not malicious"
    • Attempted unsuccessfully to install WordFence twice - through the plugin page and as an uploaded zip file - both installs froze
    • Now I see there is a quarantine folder on the server in the uploads folder containing .htaccess and index.php with today's date as the save date (Anti-Malware says it did not quarantine any files)

    This is becoming increasingly problematic for my client, obviously. I need a hint - can't find anything recent in the forums... unless there is a way to search or sort by date that I am missing?

    Thanks,
    ~KJ

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading all files & folders - except the wp-content folder - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  5. owlsheadbiz
    Member
    Posted 1 year ago #

    Hi, thanks for your response.

    In order:

    • Yes, that was in my original post which was much more longwinded than my last comment :)
    • I'm loathe to do this, but I suppose I will have to try it if nothing else works. This is a live site and my client sent out an email to hundreds of people asking them to visit on Monday, so I'm hoping to avoid messing with the theme. But if we have to do it, we have to do it.
    • No, and this I could do with very little impact on the live site, I believe - most of our plugins are maintenance related. Thanks for the link.
    • Yes, again in my original post, although I didn't specify that I manually uploaded a freshly downloaded instance of WordPress. I deleted and uploaded fresh everything except wp-content.

    Thanks again - I will try resetting the plugins folder first. Much appreciated.

    ~KJ

  6. owlsheadbiz
    Member
    Posted 1 year ago #

    Ok, resetting plugins didn't work.

    Here's a question - I have done this before but I am slightly paranoid, especially given how glitchy this site has become in the past week... if I swap out the theme, I won't lose any customization to the current theme, right? I know I won't, I just want a third party to verify that for me. :)

    Thanks,
    ~KJ

  7. owlsheadbiz
    Member
    Posted 1 year ago #

    Also, it feels worth mentioning... we've been live on this site for a few months without this problem. It only cropped up in the past week or so, and we had not updated anything just before the problem started. I'm kind of at a loss...

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    f I swap out the theme, I won't lose any customization to the current theme, right?

    Correct. Any custom theme options should be saved on a per-theme basis in your database. Any changes you have made to the theme's templates files will not be affected by switching themes.

  9. owlsheadbiz
    Member
    Posted 1 year ago #

    Thank you. Also - I see in the forums that permalinks were a problem for some people. It seems reverting to the default and resetting the permalink structure works for some people. We are currently using the Post name option. If I switch back to default and then reset the post name option, will our permalinks automatically regenerate? I don't want to break our menus in the process of troubleshooting...

    Muchas gracias,
    ~KJ

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    If I switch back to default and then reset the post name option, will our permalinks automatically regenerate?

    Yes

  11. owlsheadbiz
    Member
    Posted 1 year ago #

    Aye aye aye... crisis for this website!

    I switched the permalinks to the default. I attempted to add an image to the page that has become my testing zone. Still got the 404 error upon save.

    I went to switch back to Post name for permalinks, and I get this error:

    Not Acceptable

    An appropriate representation of the requested resource /elisa/wp-admin/options-permalink.php could not be found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I checked the server, and the file is in place. I tried replacing it with a clean version from my download a couple days ago, I get the same error.

    I am now hesitant to switch the theme ... but it seems to be my last resort.

    I will switch the theme, but can you tell me why WordPress thinks an appropriate representation of the options-permalinks.php file is missing when I can see that it is and that it is the clean version straight from the 3.5.1 zip file?

    Thanks,
    ~KJ

  12. owlsheadbiz
    Member
    Posted 1 year ago #

    While my permalinks are set to default (which I can't turn off without getting the error above), when I try to edit a post, I get:

    Not Acceptable

    An appropriate representation of the requested resource /elisa/wp-admin/post.php could not be found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

  13. owlsheadbiz
    Member
    Posted 1 year ago #

    I tried swapping themes to a fully updated Twenty-Eleven, and I still get the error about post.php when I try to edit a post.

    It seems that the "ErrorDocument" thing is recurring... what is that? I'm going to google it, thought you might know.

    Thanks,
    ~KJ

  14. owlsheadbiz
    Member
    Posted 1 year ago #

    Updating the link, since the original post contains a permalink that no longer works.


    http://thrivingplanet.org/?page_id=1428

  15. Zedster
    Member
    Posted 1 year ago #

    Has a fix been found for this issue? i seem to be experiencing the same issue when trying to insert an image.

  16. ashahid
    Member
    Posted 1 year ago #

    Which PHP version is being run on your hosting server?. If its less than version 5.4 It is known to cause problems with the latest 1p 3.5 or 3.5.1 updates...pls check

  17. owlsheadbiz
    Member
    Posted 1 year ago #

    It is definitely less than 5.4 ... I believe 5.2.17. Not much room to adjust that, as far as I can tell.

    This problem WAS resolved, although not by me (I had to leave on a business trip). I am waiting to hear back from the fellow who fixed it - he said he found malicious code and I want to know what tool he used to find it. I used Anti-Malware and found nothing positively malicious.

    Will update here when I have a more complete answer. Until that time, I will leave the topic marked as unresolved.

  18. yanay
    Member
    Posted 11 months ago #

    Do you have more details regarding the solution?
    I am having the same problem and my site was indeed hacked a few days ago. We have restored it since then but trying to edit pages now I get 404 after inserting media in the page so your hint regarding malicious code is highly relevant in my case

    Would you please provide more details?

  19. yanay please start your own topic. Your problem is not similar to this one.

    http://wordpress.org/support/forum/how-to-and-troubleshooting#postform

  20. owlsheadbiz
    Member
    Posted 11 months ago #

    Perhaps I misunderstand, but it sounds like it does relate? Trouble is - I did not resolve this particular problem and I am not in contact with the person who did. I will follow up with our intermediary.

    In the meantime, I have installed WordFence on several sites and like it. During the "crisis" above, I could not install it successfully, but if you can install it, I would recommend it.

  21. yanay
    Member
    Posted 11 months ago #

    Hi
    My problem was very similar:

    when we insert an image stored in the media library to a page, we get a 404 error upon updating the page and the changes are not saved

    The solution in my case was to tweak mod_security which was recently installed on the server. I did not handle that so I too am not sure what was the fix exactly. But in my case at least it was not malicious code

    Thanks

  22. elomeli
    Member
    Posted 9 months ago #

    Hello,

    Has anybody found a solution for this? I ran WordFence on the site and it did find some malicious files. I have cleared the site of malicious files and ran the scan a couple more times and both times it came out good. I've removed the images I had uploaded before I cleared the malware and uploaded them after the scans. I still get the http://www.site.com//wp-admin/post.php URL with a blank page (on Safari) whenever I click the Update button. I appreciate the fact that a couple of you had it resolved by someone else, but if you could insist on finding out how they did it, I would really appreciate it.

    Thanks.

  23. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    @elomeli - you need to start your own thread - this one is way outdated.

    You can do so here:

    http://wordpress.org/support/forum/how-to-and-troubleshooting#postform

  24. elomeli
    Member
    Posted 9 months ago #

    It's only two months outdated, I think it's a reasonable timespan. I'll start a new thread either way, but I think the history in this post will help. Any clues would be appreciated. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic