• Has anyone else experienced this? In the post editor there is a link under the Categories meta box that says “+ Add new Category”. When you click it a form appears that allows you to add your category. But, when I click the “Add new Category” button (the submit button for the form) nothing seems to happen. But, something has happened, the category was added. I don’t want to tell my clients that they have to add the category and then refresh the page to use it. When did this start? Any way to fix it?

    I’ve tried:
    – Disabling all plugins
    – Switching to 2017 theme

    I don’t actually know if this was an issue before latest WP update. I just don’t add categories that often.

    Thanks,
    Swani

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    Have you tried clearing cache in case it’s a cache issue?

    Flushing any caching plugins you might be running, as well as server and/or browser caches. Not just your browser, but any op cache or content network cache as well such as Cloudflare. If you are using SiteLock, manage your caching there.
    Flushing Managed host caches. Managed WP hosting often has special caches. If your host has a “Purge Varnish” or “Flush Memcache” tool, try that. You can ask your provider to flush memcache and Varnish for you if necessary.

    Thread Starter swani

    (@swani)

    Hey t-p,

    Thanks for the ideas. I tried clearing the cache in both FF and Chrome. It didn’t change anything. But, I do have some more info from additional testing.

    • The failure to update the list of categories also happens when you are on the category management page. If I add a new category, the category is added, but the list remains the same until refresh.
    • This is also true when deleting categories. There is a message that tells you the category will be permanently deleted, then there is a red backgroud on the item that is being deleted for a fraction of a second. But, it doesn’t disappear. If you refresh the page the category is gone.

    Last thing. I did actually see this feature working this morning. It was on a site that I have not upgraded to WP 4.8.1 yet. I was actually disappointed that this could be related to the WP version. Anyone have this working on 4.8.1?

    Swani

    • This reply was modified 7 years, 3 months ago by swani.
    Moderator t-p

    (@t-p)

    I was actually disappointed that this could be related to the WP version.

    No, it’s not.

    try Enabling debugging

    Thread Starter swani

    (@swani)

    OK, I get this error

    PHP Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\shopspool\wp-admin\includes\plugin.php on line 1422

    Line 1422 is the foreach loop below

    /**
     * Remove a top-level admin menu.
     *
     * @since 3.1.0
     *
     * @global array $menu
     *
     * @param string $menu_slug The slug of the menu.
     * @return array|bool The removed menu on success, false if not found.
     */
    function remove_menu_page( $menu_slug ) {
    	global $menu;
    
    	foreach ( $menu as $i => $item ) {
    		if ( $menu_slug == $item[2] ) {
    			unset( $menu[$i] );
    			return $item;
    		}
    	}
    
    	return false;
    }

    I get this even when I disable all plugins and switch to 2017 theme. I did try a completely clean install and it works there. I’m not sure what to do next. I can’t give the site to the client without this working.

    paristocrate

    (@paristocrate)

    remove the ending ?> at the end of your functions.php file

    Thank-you @paristocrate. Your answer solves this issue!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘“Add new Category” doesn’t refresh list of categories’ is closed to new replies.