Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • leromt

    (@leromt)

    For what it’s worth, I had this same problem this afternoon. I tried to save a post in a particular category and kept getting the “failed to save” banner. However, the changes I made to the post were in fact saved, even though I got that banner.

    The post in question was in a category named “blog-post.” When I tried to edit and save ANY post with that category name, it would barf and give me the error banner.

    I renamed the category from “blog-post” to “cjo-blog” and things went back to normal with no problems saving the posts. For those of you worried, renaming the category will NOT remove your posts/pages/etc from that category. The “name” of the category is mostly for pretty-fication. Your posts are actually saved with the category ID, NOT the name, and changing the name has no effect on the category ID.

    This problem arose once I updated from WP 4.9x to WP 5.1.

    Gerd,

    Here is what I did in addition to the stuff in the workaround you mentioned.

    I delete the transient value in the get_count_of_user_statuses function every time in order to force the value to be updated.

    I edited the new-user-approve.php file as follows:

    As Reads:

        /**
         * Get a list of statuses with a count of users with that status and save them using a transient
         */
        public function get_count_of_user_statuses() {
            $user_statuses = get_transient( 'new_user_approve_user_statuses_count' );
    
            if ( false === $user_statuses ) {
                $user_statuses = $this->_get_user_statuses();
                set_transient( 'new_user_approve_user_statuses_count', $user_statuses );
            }
    
            return $user_statuses;
        }

    Should Read:

       /**
         * Get a list of statuses with a count of users with that status and save them using a transient
         */
        public function get_count_of_user_statuses() {
            $user_statuses = get_transient( 'new_user_approve_user_statuses_count' );
    
    // ADDED THIS LINE
     delete_transient('new_user_approve_user_statuses_count');
    
            if ( false === $user_statuses ) {
                $user_statuses = $this->_get_user_statuses();
                set_transient( 'new_user_approve_user_statuses_count', $user_statuses );
            }
    
            return $user_statuses;
        }
    • This reply was modified 6 years, 8 months ago by leromt.
    • This reply was modified 6 years, 8 months ago by leromt.
    Thread Starter leromt

    (@leromt)

    Mike,

    Yes, I too do not believe that Email Users is the problem…sorry for the assumption.

    Based on the link you provided, I Googled it a little further and found this post. I added the check_admin_referer method, as given, but it still gave me trouble. I then used the last solution offered on that page…basically returning true for the function…of course that worked.

    Since this is on my dev server I’m going with that for right now. However, I can’t figure out what the actual problem is.

    Thanks for guiding me in the right direction and sorry for the hassle.

    Tom

    Thread Starter leromt

    (@leromt)

    Mike,
    No love. I even tried a different browser.

    I’m testing this on my local dev environment (Mac). Does the save function touch any files within the plugin directory or just touch the db itself?

    On a side note, I never received notification that you answered me…sorry it took so long to reply back.

Viewing 4 replies - 1 through 4 (of 4 total)