• Resolved shannon5ykl

    (@shannon5ykl)


    Today when staff members went to edit their blog posts they were all loading random posts, a different post each time

    Even a “new post” loads up a random post

    We use classic editor plugin, V 1.6.3

    • AWS ec2
    • WP 6.2.2
    • PHP 8.1.16
    • Apache/2.4.57

    Here’s a big dump of info/debugging the other guys and I have done

    the id in the url is correct, but the post it loads isn't
    
    The front end loads the correct post
    
    wp-admin is also really slow, the front end is slightly slower but not to bad
    
    When we've had this in the past its been the DB, wp-options needed a repair
    That doesn't seem to be the case this time
    I ran mysqlcheck on all DB's and no issues
    
    we're seeing these errors sporadically in the apache error_log, I can't find a way to trigger the errors though
    Lock not acquired
    
    Error reading Wordfence Firewall config data, configuration file could be corrupted or inaccessible. Path: /var/www/html/blog/wp-content/wflogs/config-synced.php
    
    Cron reschedule event error for hook: wf_scan_monitor, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {"schedule":"wf_scan_monitor_interval","args":[],"interval":60}
    
    Despite the wordfence error it can write to config-synced.php, the modified time keeps updating
    
    The file permissions were also off, e.g.
    -rw-rw-r-- 1 500 apache 7.1K Nov 7 2022 wp-activate.php
    drwxrwsr-x 10 500 apache 6.0K Feb 14 2022 wp-admin
    -rw-rw-r-- 1 500 apache 351 Apr 6 2020 wp-blog-header.php
    -rw-rw-r-- 1 500 apache 2.3K Feb 14 2022 wp-comments-post.php
    -rw-rw-r-- 1 500 apache 3.2K Nov 13 2021 wp-config.php
    -rw-rw-r-- 1 500 apache 3.0K Apr 18 22:23 wp-config-sample.php
    drwxrwsr-x 10 500 apache 6.0K Feb 3 2021 wp-content
    
    I've reset them using
    sudo chown -R --from=500 ec2-user /var/www/html/blog/*
    sudo find /var/www/html/blog/wp-content/cache -type d -exec chmod g+w {} \;
    sudo find /var/www/html/blog/wp-content/plugins -type d -exec chmod g+w {} \;
    
    but the issue continues
    
    I used the wp crontrol plugin to look at the crons
    
    wordfences tools -> debug shows crons have been failing since (this is the first recorded failure) (this is Sydney Australia time)
    Sun, 25 Jun 2023 22:25:07 +0000 (Overdue)action_scheduler_run_queue
    
    The error wp Crontrol says is 
    cURL error 28: Operation timed out after 3000 milliseconds with 0 bytes received
    Which makes sense since wp-admin is running slow

    I rebuilt the indexes with mysqlcheck –optimize

    One of our developers said he’d seen similar when wp-posts didn’t have an auto increment, I checked all of our tables and they look fine

    I’ve turned on the debug log but there’s only some php deprecation warnings in there, nothing that looks suspicious

    Uploading images via media library they end up in a random directory under upload each time. e.g 2020/04/

    I looked for changed files/directories in the last 24 hours, there’s a few things like

    • ./wp-content/wflogs/.nfs218cdd894e6e333100003756
    • ./wp-content/cache
    • ./wp-content/uploads
    • wp-content/upgrade/ (nothing in here so I don’t know what/if anything was in here)

    The block editor doesn’t seem to have the same random post problem, still really slow because of whatevers going on though

    I’m pretty much out of ideas so any suggestions anyone might have, please offer them

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    a great way to start debugging your problem would be to deactivate all your plugins and see if the problem persists, if it doesn’t reactivate them one by one and you will see which plugin causes the problem.

    Deactivating a plugin can be done by renaming it’s folder in /wp-content/plugins/ and reactivating can be done by renaming it back to its original name.

    Thread Starter shannon5ykl

    (@shannon5ykl)

    Thanks @benniledl , Would you suggest disabling plugins that way or by clicking deactivate in installed plugins?

    Side note: no plugins should have updated over the weekend, we have auto update turned off

    Hi, sorry for the confusion I suggest disabling it via the usual disable button. The mentioned method is used when the admin-panel isn’t available anymore.

    Thread Starter shannon5ykl

    (@shannon5ykl)

    An update before I close this off.

    After going through and disabling a bunch of plugins the classic editor worked again (checked after each 3 disabled)

    I re-enabled all the plugins (checking after each) and with all plugins enabled again, the classic editor still worked. wp-admin was still a little slow

    After waking up I checked again and wp-admin was taking about 15 sec to load and the crons were no longer working (last fired when I had the plugins disabled)

    After disabling transients-manager (just that) the crons started firing and wp-admin was loading in about 1.5 – 2.5 seconds

    transients-manager hasn’t been updated in 11 months but for whatever reason it seems to have been the cause of this, or is conflicting with something else but since we have auto update turned off I don’t know what

    I’m going to close this off as resolved but I still don’t know what triggered it or why

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need help – Edit posts loads a random post’ is closed to new replies.