• Cannot create categories in the side menu page from the admin side…it does show only one (first I created )but none of the others. Even tried creating child cats but to no avail?
    Using version 2

Viewing 9 replies - 1 through 9 (of 9 total)
  • Categories (post categories) only show when there is a post assigned to that category.

    ********************
    Welcome to the WordPress Support Forums!

    Please help keep the Forums successful by reading:
    Using the Support Forums

    Also, remember the WordPress Codex and the FAQ pages.

    And, thank you, for letting us know if this information proves useful (or not)!
    ********************

    Thread Starter kroggy

    (@kroggy)

    Thank you MichaelH, I’ve now tried doing that but still no joy. Just looked at another test blog that I have and that posts ok so I can only assume I have a glitch somewhere…I’ll reinstall it all.

    Did notice though the cats on the test did not provide child cats (with me on this one?)…any ideas on that one?

    Many Thanks.
    KB

    This is a bug in the WordPress Cache. Disable the cache and they will show up as expected. Also, you need to clear the cache before you re-enable it otherwise the categories will revert to the old behavior.

    For the life of me I can not figure out why the WP 2.0 Cache applies to the admin tools as well.

    – Trip

    Hi. I have had some requests from a few people on this issue. Here is my synopsis and fix. Everyone I spoke to has had success with this solution.

    The WordPress 2.0 cache has a bug and or issue in it that adversely affects some users. Perhaps it has something to do with the use of redirects by some web hosts or virtual domains.

    The category problem is fixed by disabling the WP 2.0 Cache and clearing out its contents. Disabling the cache will improve your life and most people probably won’t see any difference on thier blog for the most part. At least in the initial 2.0 release.

    I believe that that the WP cache should not apply to the admin side of the back end in any event. This is not to criticize the developers of WP, merely to point out a caching strategy that I think may need to be revisited.

    You will need access to the WordPress installation to disable the cache. There is a file in the root called wp-settings.php. Search for the word disable and uncomment the define line.

    // define(‘DISABLE_CACHE’, true);

    So that it looks like the following:

    define(‘DISABLE_CACHE’, true);

    You should also delete the contents of the cache before re-enabling the cache if you ever feel the need to do that. There is a directory called wp-content/cache. All files and subdirectories should be removed from this directory as well as this holds the erroneous data. Some people have been chmod’ing the directory to prevent writes but that is unnecessary. Removing the commented out directive will fix the problem just fine.

    Please backup your blog and files before you delete the files. better safe than sorry. I have seen no ill affect by removing the files from this directory or disabling the cache; life will be better!

    Trip

    I have the file wp-settings.php but it does not have any reference to “disable cache”. I also don’t have wp-content/cache.

    I DO have the problem of the categories not showing up. Any further help appreciated!

    8-(

    —— Here’s the contents:

    <?php
    // Turn register globals off
    function unregister_GLOBALS() {
    if ( !ini_get(‘register_globals’) )
    return;

    if ( isset($_REQUEST[‘GLOBALS’]) )
    die(‘GLOBALS overwrite attempt detected’);

    // Variables that shouldn’t be unset
    $noUnset = array(‘GLOBALS’, ‘_GET’, ‘_POST’, ‘_COOKIE’, ‘_REQUEST’, ‘_SERVER’, ‘_ENV’, ‘_FILES’, ‘table_prefix’);

    $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
    foreach ( $input as $k => $v )
    if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) )
    unset($GLOBALS[$k]);
    }

    unregister_GLOBALS();

    $HTTP_HOST = getenv(‘HTTP_HOST’); /* domain name */
    $REMOTE_ADDR = getenv(‘REMOTE_ADDR’); /* visitor’s IP */
    $HTTP_USER_AGENT = getenv(‘HTTP_USER_AGENT’); /* visitor’s browser */
    unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );

    // Fix for IIS, which doesn’t set REQUEST_URI
    if (! isset($_SERVER[‘REQUEST_URI’])) {
    $_SERVER[‘REQUEST_URI’] = $_SERVER[‘SCRIPT_NAME’];

    // Append the query string if it exists and isn’t null
    if (isset($_SERVER[‘QUERY_STRING’]) && !empty($_SERVER[‘QUERY_STRING’])) {
    $_SERVER[‘REQUEST_URI’] .= ‘?’ . $_SERVER[‘QUERY_STRING’];
    }
    }

    if ( !(phpversion() >= ‘4.1’) )
    die( ‘Your server is running PHP version ‘ . phpversion() . ‘ but WordPress requires at least 4.1’ );

    if ( !extension_loaded(‘mysql’) )
    die( ‘Your PHP installation appears to be missing the MySQL which is required for WordPress.’ );

    function timer_start() {
    global $timestart;
    $mtime = explode(‘ ‘, microtime() );
    $mtime = $mtime[1] + $mtime[0];
    $timestart = $mtime;
    return true;
    }
    timer_start();

    // Change to E_ALL for development/debugging
    error_reporting(E_ALL ^ E_NOTICE);

    // For an advanced caching plugin to use, static because you would only want one
    if ( defined(‘WP_CACHE’) )
    require (ABSPATH . ‘wp-content/advanced-cache.php’);

    define(‘WPINC’, ‘wp-includes’);
    require_once (ABSPATH . WPINC . ‘/wp-db.php’);

    // Table names
    $wpdb->posts = $table_prefix . ‘posts’;
    $wpdb->users = $table_prefix . ‘users’;
    $wpdb->categories = $table_prefix . ‘categories’;
    $wpdb->post2cat = $table_prefix . ‘post2cat’;
    $wpdb->comments = $table_prefix . ‘comments’;
    $wpdb->links = $table_prefix . ‘links’;
    $wpdb->linkcategories = $table_prefix . ‘linkcategories’;
    $wpdb->options = $table_prefix . ‘options’;
    $wpdb->postmeta = $table_prefix . ‘postmeta’;

    if ( defined(‘CUSTOM_USER_TABLE’) )
    $wpdb->users = CUSTOM_USER_TABLE;

    // We’re going to need to keep this around for a few months even though we’re not using it internally

    $tableposts = $wpdb->posts;
    $tableusers = $wpdb->users;
    $tablecategories = $wpdb->categories;
    $tablepost2cat = $wpdb->post2cat;
    $tablecomments = $wpdb->comments;
    $tablelinks = $wpdb->links;
    $tablelinkcategories = $wpdb->linkcategories;
    $tableoptions = $wpdb->options;
    $tablepostmeta = $wpdb->postmeta;

    require (ABSPATH . WPINC . ‘/functions.php’);
    require (ABSPATH . WPINC . ‘/default-filters.php’);
    require_once (ABSPATH . WPINC . ‘/wp-l10n.php’);

    $wpdb->hide_errors();
    if ( !update_user_cache() && (!strstr($_SERVER[‘PHP_SELF’], ‘install.php’) && !defined(‘WP_INSTALLING’)) ) {
    if ( strstr($_SERVER[‘PHP_SELF’], ‘wp-admin’) )
    $link = ‘install.php’;
    else
    $link = ‘wp-admin/install.php’;
    die(sprintf(__(“It doesn’t look like you’ve installed WP yet. Try running install.php.”), $link));
    }
    $wpdb->show_errors();

    require (ABSPATH . WPINC . ‘/functions-formatting.php’);
    require (ABSPATH . WPINC . ‘/functions-post.php’);
    require (ABSPATH . WPINC . ‘/classes.php’);
    require (ABSPATH . WPINC . ‘/template-functions-general.php’);
    require (ABSPATH . WPINC . ‘/template-functions-links.php’);
    require (ABSPATH . WPINC . ‘/template-functions-author.php’);
    require (ABSPATH . WPINC . ‘/template-functions-post.php’);
    require (ABSPATH . WPINC . ‘/template-functions-category.php’);
    require (ABSPATH . WPINC . ‘/comment-functions.php’);
    require (ABSPATH . WPINC . ‘/feed-functions.php’);
    require (ABSPATH . WPINC . ‘/links.php’);
    require (ABSPATH . WPINC . ‘/kses.php’);
    require (ABSPATH . WPINC . ‘/version.php’);

    if (!strstr($_SERVER[‘PHP_SELF’], ‘install.php’) && !strstr($_SERVER[‘PHP_SELF’], ‘wp-admin/import’)) :
    // Used to guarantee unique hash cookies
    $cookiehash = md5(get_settings(‘siteurl’)); // Remove in 1.4
    define(‘COOKIEHASH’, $cookiehash);
    endif;

    require (ABSPATH . WPINC . ‘/vars.php’);

    do_action(‘core_files_loaded’);

    // Check for hacks file if the option is enabled
    if (get_settings(‘hack_file’)) {
    if (file_exists(ABSPATH . ‘/my-hacks.php’))
    require(ABSPATH . ‘/my-hacks.php’);
    }

    if ( get_settings(‘active_plugins’) ) {
    $current_plugins = get_settings(‘active_plugins’);
    if ( is_array($current_plugins) ) {
    foreach ($current_plugins as $plugin) {
    if (” != $plugin && file_exists(ABSPATH . ‘wp-content/plugins/’ . $plugin))
    include_once(ABSPATH . ‘wp-content/plugins/’ . $plugin);
    }
    }
    }

    require (ABSPATH . WPINC . ‘/pluggable-functions.php’);

    if ( defined(‘WP_CACHE’) && function_exists(‘wp_cache_postload’) )
    wp_cache_postload();

    do_action(‘plugins_loaded’);

    define(‘TEMPLATEPATH’, get_template_directory());

    // Load the default text localization domain.
    load_default_textdomain();

    // Pull in locale data after loading text domain.
    require_once(ABSPATH . WPINC . ‘/locale.php’);

    if ( !get_magic_quotes_gpc() ) {
    $_GET = add_magic_quotes($_GET );
    $_POST = add_magic_quotes($_POST );
    $_COOKIE = add_magic_quotes($_COOKIE);
    $_SERVER = add_magic_quotes($_SERVER);
    }

    function shutdown_action_hook() {
    do_action(‘shutdown’);
    }
    register_shutdown_function(‘shutdown_action_hook’);

    // Everything is loaded.
    do_action(‘init’);
    ?>

    Hi. It looks to me like you are on Yahoo. They have modified the wp 2.0 files and/or possibly have a 2.0 pre-release. In any event this is no problem.

    Set the disable property right after the following lines as shown below.

    if ( file_exists(ABSPATH . 'wp-content/object-cache.php') )
    require (ABSPATH . 'wp-content/object-cache.php');
    else
    require (ABSPATH . WPINC . '/cache.php');

    // For now, disable persistent caching by default. To enable, comment out
    // the following line.
    define('DISABLE_CACHE', true);

    You can use the Yahoo control panel to delete the contents of the cache if you so desire.

    Trip

    I am having a similar problem (although all BUT one of my categories are showing), and this did not solve it for me, either. ??

    The only other reason I can think of as to why a category doesn’t appear is if it only contains posts tagged as “private.”

    Not the case. ?? All of my posts have the same settings (except, of course, for being assigned to different categories). I just went and double-checked one of the posts in this cat. to be sure, and it is public.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Categories not posting’ is closed to new replies.