Support » Fixing WordPress » Clicking the post draft button sometimes redirects a 404 not found page

  • Hello,

    I’m facing this weird problem since last week. I am using divi theme and every time save a post draft i can see it’s preview, but at times if I copy paste some of the similar content (posted before) the page doesn’t save and redirects to /post.php 404 page not found. I tried the followings..

    • disabled plugins and enabled one after another, but no change
    • currently i have no cashing plugins installed like w3 total cache, etc.
    • change my permalinks to default, and changed back to post type, but same issue

    Let me know how can I solve this. Thanks

    • This topic was modified 2 years, 10 months ago by  abinashm.
    • This topic was modified 2 years, 10 months ago by  Steve Stern. Reason: added missing UL tags
Viewing 11 replies - 1 through 11 (of 11 total)
  • Log out of your site

    Clear cookies and Cache.

    Close browser.

    Open Browser again

    Log back in

    Check if you can see previews now

    Doesn’t work as i tired tgis many times.

    Hi,

    You mentioned that this issue only happens when you copy older content and paste it into a new post. How are you copying the older content? Are you copying it from the displayed webpage, or from the editor? If you’re copying it from the displayed webpage, I’m wondering if you’re possibly pulling in some unexpected characters that aren’t resolving correctly (page breaks, or something). Try to open up the older blog post using the “Edit Post” option, copy the text you want to duplicate from within the text editor box, and then paste it into your new post. That way, you can be sure you’re only pasting in alphanumeric characters. That could help determine if it’s an issue with the input, or an issue with the server/software.

    Hi @beach44,

    I’m not trying edit an existing/published post. I’m making a new page, and I tried this more than 30 times using a new post/page per se. So my problem leads to 404 page not found the moment I press the save draft button. As you asked what I post as my test…

    Look at the following 2 scenarios

    Scenario 1; pasting content from external website

    Content Goes here…

    You mentioned that this issue only happens when you copy older content and paste it into a new post. How are you copying the older content? Are you copying it from the displayed webpage, or from the editor? If you’re copying it from the displayed webpage, I’m wondering if you’re possibly pulling in some unexpected characters that aren’t resolving correctly (page breaks, or something). Try to open up the older blog post using the “Edit Post” option, copy the text you want to duplicate from within the text editor box, and then paste it into your new post. That way, you can be sure you’re only pasting in alphanumeric characters. That could help determine if it’s an issue with the input, or an issue with the server/software.

    It went success as it it saved my post as draft!

    Scenario 2; pasting content from my written text file
    Content Goes here…

    This is not just another UX design community.

    Do you know…What does a real persona look like? Do you want to transform your career into the field of User Experience design? When to select a particular user research method and how? How to go about KPI aka Key Performance Indicators? What’s the difference in between Information architects, Interaction designer, User Centered Designer, and User Experience Designer? How to test and validate a product idea that will work for your end users? Do you even know your end users, yet? How about writing a compelling UX copy for a 404 page that still says, “Page Not Found?” Are you still confused how to go about a UX project from scratch? And the list goes on…

    And it failedto save as a draft!

    Weird isn’t it?

    Because in both the cases, there were Questions marks (?) as special symbols. But then why doesn’t it work?

    • This reply was modified 2 years, 10 months ago by  abinashm.

    Hi @beach44 and @a2hostingrj

    After removing/adding/disabling/enabling + nth number of testing post drafts, I think I got the solution and it worked by going to my cPanel > ModSecurity > disabled for current domain.

    It worked!

    As posted by Satish on this page

    …Nothing helped, some of the threads on this problem referred to mod_security rules. The problem was due to the mod security rules. As my post had some strings that directly relate to security issues. These obviously triggered some mod_security rules I had to disable mod_security rules temporarily to publish the post.

    But when I was trying add the following code inside a .htaccess file under wp-admin folder

    <IfModule mod_security.c>
    SecFilterEngine Off
    </IfModule>

    It didn’t work!

    Now my question is since I disabled ModSecurity on the domain level, is it safe? or do I have to disable ModSecurity while writing and enable back once my post is published; that’s gonna be too much? 🙁

    What do you suggest?

    Thanks

    Hi @beach44 and @a2hostingrj

    After removing/adding/disabling/enabling + nth number of testing post drafts, I think I got the solution and it worked by going to my cPanel, ModSecurity and clicked disable for current domain.

    It worked!

    As posted by Satish on this page

    …Nothing helped, some of the threads on this problem referred to mod_security rules. The problem was due to the mod security rules. As my post had some strings that directly relate to security issues. These obviously triggered some mod_security rules I had to disable mod_security rules temporarily to publish the post.

    But when I was trying add the following code inside a .htaccess file under wp-admin folder

    It didn’t work!

    Now my question is since I disabled ModSecurity on the domain level, is it safe? or do I have to disable ModSecurity while writing and enable back once my post is published; that’s gonna be too much?

    What do you suggest?

    Thanks

    Hey, that’s great! It sounds like you’re on the right track! Unfortunately, I don’t know much about ModSecurity, so I can’t be much help there. I did some searching around in the forums, though, and it sounds like others have had success by contacting their hosting provider. Maybe give that a try? https://wordpress.org/support/topic/404-page-not-found-when-savingupdating-a-postspage/

    @beach44 Okay! Thanks for your support anyway! That’s why I come to WordPress Support forum, and it works 100% 🙂 Cheers!

    Thanks @abinashm ! When you find the solution, could you please let me know what it is? I’m curious now. Good luck! 🙂

    Yes @beach44 , as I said you have to go to cPanel > ModSecurity > clicked disable for current domain.

    Just in case, of you can’t access the ModSecurity option from cPanel then you can contact your host who can do that for you.

    Here is the 2 screens how to disable ModSecurity

    Select ModSecurity from cPanel

    then

    Disable ModeSecurity for a domain where wordpress is installed

    ModeSecurity gets turned on by most of the host from security standpoint. WordPress doesn’t save all your post entries that has text, symbols, strings, etc. and leads to security issues resulting 404 page not found. It won’t even let you publish the post as well. I think it’s the case for most of the shared hosting environment unless one is using a dedicated hosting specially for WordPress users.

    I hope it helps 🙂

    Thanks so much for taking the time to share this! It’s really helpful! 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Clicking the post draft button sometimes redirects a 404 not found page’ is closed to new replies.