Custom Post Types – 404 error when updating/saving posts

Home Forums BulletProof Security Pro Custom Post Types – 404 error when updating/saving posts

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #30782
    Immerse
    Participant

    Yes, I know there are various things that can cause slowness. What’s most unfortunate is that the site has been online after a rebuild in July without a problem and today, after installing bps, it seems the ceiling has fallen in, at least in the backend.  I haven’t had enough time to test the frontend submission forms – I hope they’re working – but I have no choice but to go to bed at this point.

    I appreciate what you are saying, but now instead of simply replacing wordfence with something I hoped would be better, and then getting on with some work, I’ve been unable to work at all, and I have no idea why! I take your point about browsers etc, but I’m using two different ones at the same time, and they’re clean. I use wp-rocket (js not minified) and I don’t think it’s even possible to cache admin with that. It’s in the skip rules so there’s nothing flagged in logs ref that. There’s no coming soon etc plugin as the site’s live – it’s a nationwide directory site. It’s not a problem affecting any other wp sites (mine) on the same vps either.

    I’ve asked my hosting company to look at it for me, and I’ll see what they say.

    #30783
    Immerse
    Participant

    Just a thought: I’m using the avada theme. Nothing is flagged up anywhere relating to avada, but I see a post in the forum about this theme and UAEG. With no reports in security log I’m guessing there aren’t any problems, but I’m wondering if there are any oddities relating to the theme you’ve come across which might be causing a problem?

    #30784
    AITpro Admin
    Keymaster

    Well you can completely uninstall BPS Pro and check things, but BPS Pro is designed so that you do not need to do that and can instead turn everything off using the BPS Pro troubleshooting steps:  http://forum.ait-pro.com/forums/topic/read-me-first-pro/#bps-pro-general-troubleshooting  I have never messed around with WP Custom Post Types before so it took me a few minutes to learn that and create a Custom Post Type for testing purposes.  On my testing site I did not run into a problem with a 404 error in the wp-admin area, but did see a 404 error on the frontend of the site due the site structure URL not being valid.  In any case there are obviously some other scripts, etc. that you are using on your site so my testing even with your exact CPT code would not produce the exact same results.  Plus my testing server is a XAMPP Local Development Server and permalinks/URL stuff acts slightly differently on XAMPP then on a typical hosted site.

    Anyway I don’t believe the slowness when saving a post is caused by BPS Pro.  You can turn everything off in BPS Pro using the BPS Pro troubleshooting steps and see what happens.

    #30785
    Immerse
    Participant

    I’m sure you’re right. I’ll see what hosting have to say.

    #30786
    AITpro Admin
    Keymaster

    It looks like the only problem with the Avada theme had to do with using Maintenance Mode.  Maintenance Mode in plugins and themes can break the BPS Pro Plugin Firewall depending on how Maintenance Mode is being done by another Plugin or Theme.  That was why I posted that you should also do BPS Pro troubleshooting step #3 which turns Off the BPS Pro Plugin Firewall.  There are various things that can break the BPS Pro Plugin Firewall, which can then cause a “combo” problem.  ie X breaks Y, which then breaks Z.

    #30787
    AITpro Admin
    Keymaster

    I see one forum topic about WP Rocket here:  http://forum.ait-pro.com/forums/topic/wp-rocket-plugin-htaccess-code-where-to-put-it/  Have you added your WP Rocket htaccess code (if you have any WP Rocket htaccess code to add) in BPS Custom Code?

    #30789
    Immerse
    Participant

    Well, it continues.

    Just got up and checked the site. Hosting said they tweaked php to get rid of one error they saw, but otherwise can’t see a problem. After saving 1 page, 2 different custom posts and 1 ‘normal’ post the save times are between 31 and 7 seconds. Moving around in admin, the speed is normal, no problem. Doing other things in admin – turning bits on and off – is normal.

    Could this be anything to do with the site usng nginx as a reverse proxy, or wp being in its own directory? Do these things affect bps? Oh, and yes, the plugin firewall is switched off anyway – killed it yesterday when this started and didn’t turn it back on.

    #30790
    Immerse
    Participant

    I wondered about wp-rocket because it does normally generate htaccess code. With the free version, which I used on another site, I had to add the wprocket code to bps as custom code. However with this pro version the wprocket code does not show up in ‘current root htaccess’ so I assumed bps had dealt with that itself. However, I can’t see it anywhere…

    I hadn’t given that any thought as such to date simply because I assumed that would only affect front end. Looking now though, the front end is a bit slow. With the backend issue I simply hadn’t noticed.

    How do I recover the wprocket code? I’m guessing it’s in a backup somewhere.

    #30791
    Immerse
    Participant

    Found the wp rocket code and added that as per. No difference in any respect.

    #30793
    AITpro Admin
    Keymaster

    Yep, BPS Pro works on Nginx Reverse Proxies and all other server types/api’s/Proxies/etc.  I looked at your site and several URI’s|URL’s and this is what I found below:

    URI: home page
    First page load – uncached
    Page Load speed: 3.01 seconds|onload 3.46 seconds
    21 Requests
    Size: 428.4KB

    Second page load – cached
    Page Load speed: 2.29 seconds|onload 2.61 seconds
    2 Requests
    Size: 11KB

    Notes: Your Avada Theme main.min.js script is the primary cause of page load slowness.
    The Avada js script is taking 2 seconds to load.

    URI: /county-cattery/london/
    First page load – uncached
    Page Load speed: 12.32 seconds|onload 5.53 seconds
    30 Requests
    Size: 2,500KB|2.5MB
    Several image files that are not optimized make up the majority of the page size.

    Second page load – cached
    Page Load speed: 1.44 seconds|onload 2.65 seconds
    3 Requests
    Size: 27.3KB

    URI: cattery/silverdalecattery-tw14-8ee/
    First page load – uncached
    Page Load speed: 10.3 seconds|onload 10.25 seconds
    41 Requests
    Size: 322.7KB

    Second page load – cached
    Page Load speed: 4.18 seconds|onload 4.14 seconds
    13 Requests
    Size: 12KB

    Notes: Your Google Map is returning several GET 204 No Content errors.

    https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    10.2.5 204 No Content

    The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.

    If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent’s active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent’s active view.

    The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.

    It appears that a problem may be occurring with your Google Map and maybe WP Rocket HTML Compression/Minification.
    Troubleshooting steps:
    1. Change WP Rocket settings and turn off HTML Compression/Minification.
    2. Test saving a CPT.
    3. It appears that your Google Map is bundled with your Avada theme. Temporarily disable your Google map.
    4. Test saving a CPT.

    Overall: I believe the slowness problem has to do with your Avada Google Map itself or a combination problem like WP Rocket HTML Compression/minification is causing a problem for your Google Map. Your Avada Theme main.min.js script is very large: 153KB and contains all of your Google Maps js code and it also looks like it contains all other js code for anything/everything else. I do not want to say anything negative here about Avada, but logically it would be better to have several js files and load js code that is relevant to what your site is using.  It may be that every/all sites using the Avada theme use all Avada js code and there is no getting around using the entire main.min.js Avada theme js script.

    The obvious thing to note is your CPT URL’s are taking significantly longer to load. It appears to be a combination problem with the content of the page/posts themeselves, Google Maps and WP Rocket settings.

    Additional recommended troubleshooting steps:
    1. Temporarily switch your theme to a WordPress theme:  2016, 2015 and test saving a CPT post.
    2. Deactivate all other plugins except for BPS Pro and test saving a CPT post.

    #30794
    Immerse
    Participant

    Unfortunaately, if you’re looking at it today, I’ve had hosting support working on it all day – turning stuff on and off, including nginx and all the plugins. The average loading time a week ago was around one second. They’re still working on it now. Thing is, avada hasn’t been changed for a month or so, from memory, and this problem has dragged the site down only now. The only things updated has been a couple of minor plugins.  I’m just waiting to see what they come up with.

    Stuff like google maps was actually turned off in the theme, so I’d guess they’ve been activating the parent theme and messing about that way. I’m sure I’ll have some tidying up to do once they’re through. However, they would appear to have stopped looking at plugins and themes as being the issue and are messing about with the hosting – I’ve no exact idea what they’re doing..

    #30795
    AITpro Admin
    Keymaster

    Ok yeah I get that, but overall I see problems with the things that I mentioned above.  They are not game enders, but are clear indications of problem areas.  It is very possible that they are also clues and/or related either directly or indirecly to whatever the root problem is for the extreme slowness when saving CPT posts.  In any case, they should be handled at some point because a page load time of anything more than 3 seconds is considered poor website performance.  Anything 5+ seconds or more is considered bad website performance.  10+ seconds is unacceptable to most people.  Typically most people will not wait more than 5 seconds for a website page to load and they will just close their Browser tab or click on something else and not wait for your website pages to finish loading.

    If you would like for me to login to this website and figure out what is causing the CPT post saving problem then create a temporary WordPress Administrator user account for me and send the login info to:  info at ait-pro dot com.

    In general, automated Minification is probably the worst concept that was ever created to increase website performance.  Minification is not a one size fits all kind of thing so it should not be automated in a one size fits all way.  A lot of people contact me regarding website performance problems/slowness and the majority of them had decided to use Minification.  The irony of minification is that besides causing website performance/slowness problems, minification also breaks a lot of things.  Automated minification is a menace and a horrible concept.  It should never be used for any reason.

    #30798
    Immerse
    Participant

    Sure, but all caching is disabled for logged on users, and admin area isn’t cached in any event, so the current issue – one minute to save a page or get a 404 trying isn’t related to that, is it? It seems the personnel at my hosting have now changed shift and I’ve drawn the short straw, judging by the what the latest guy has had to say. Ho hum. I’m waiting to see what happens next – it’s such a shame that the level of support can be so variable. It requires one to be rude – calling someone incompetent usually gets the problem moved up a level….

    Thank you for your offer but I’ll wait until the hosting guys say they’ve done all they can… or until there’s no level to go up to.

    #30799
    AITpro Admin
    Keymaster

    The root cause of the CPT saving problem is still unknown at this point so it is good to look at anything and everything as the possible cause for the problem and eliminate each of them as the cause of the problem. Yep, let me know if your host support cannot figure this out and I will figure it out.  Note:  Hosting support folks are typically not WordPress experts so asking them anything specifically relating to WordPress is going to be out of their league.  I’m pretty sure most hosts do not train host support techs on WordPress troubleshooting or probably anything regarding WordPress.  The only questions I ever ask my host support folks are questions regarding my hosting account, hosting servers, email or domains since that is what they are trained to know.

    Also I have formal training and experience (20+ years) in Systems Engineering and Server Administration.  So if the problem is related to your server then I will quickly be able to assess that.  If your host support folks have not already tried to switch your PHP server version then you should mention that to them and have them do that.  It is a quick and simple thing to do (takes 2-3 minutes) and can eliminate a lot of difficult and time consuming server/server config troubleshooting.  Make sure that BPS Pro AutoRestore is turned Off and that your Root htaccess file is not locked while your host support folks are working on your website/server.

    #30885
    AITpro Admin
    Keymaster

    Ok just send me a WP Admin login to this site and I will figure out whatever needs to be figured out.  send the login to:  info at ait-pro dot com.

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