Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » Running WordPress » Installing & running WordPress »

Categories admin page missing


  #1  
Old Mar 30, 2009, 06:09 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
This is so odd. For the last few days, my categories page is missing. That is, if I click on Categories under Post, I see a blank page. If I click on Dashboard, then in the Right Now/At a glance box, I click on Categories, they all show up just fine. In fact, nothing appears wrong with anything else, just the categories page when clicked from Categories under Post.

Over at wordpress.org, I found this thread: http://wordpress.org/support/topic/165126?replies=15

It appears that a database table was corrupted for some of these folks. I have tried deactivating several plugins, first the WP-Sticky one mentioned, then the others that I think were installed around the time I noticed the missing categories page. Nothing has helped yet, but I haven't tried repairing the table.

I did let mySQL check wp_posts and it didn't show a problem. Then I did a screen cap of the structure. http://www.larchmontgazette.com/postcat.pdf
Is that how it should look?

And here, it looks like there are no categories for these posts, yet they show up fine on the site.
http://www.larchmontgazette.com/postcat2.pdf

Last edited by paulae; Mar 30, 2009 at 06:40 AM.
  #2  
Old Mar 30, 2009, 06:10 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
My wp_posts table shows a few more fields like GUID, post_parent, menu_order, post_type, comment_count, in WP 2.7

What I don't have (but you do) is sidebar_title and sidebar_content.

Those look like they don't belong there unless a plugin put them there.

There were 2 more suggestions in that thread, one being to upload a fresh /wp-admin/ directory, the other to repair the table in PhpMyadmin. It looks like the table is kaput
  #3  
Old Mar 31, 2009, 05:42 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Is there any chance that by uploading a clean admin directory, I'll end up losing anything?
  #4  
Old Mar 31, 2009, 07:17 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
No, a new admin directory shouldn't do any harm.
  #5  
Old Mar 31, 2009, 07:22 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I see something in wp-admin called az_sem_cache. I am using AZ Index plugin, so I assume it comes with that. Should I delete the whole directory before uploading the clean one, or just overwrite the old files and let new things like az_sem_cache stay?
  #6  
Old Mar 31, 2009, 08:10 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
OK, I re-installed wp-admin, but nothing changed. I still do not see the categories page when I click on Categories, but the site is working fine otherwise.

Flynn, are you interested in some paid trouble-shooting? I doubt this is a theme issue, so I think we should move to a consultancy status.
  #7  
Old Mar 31, 2009, 08:06 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Thank you for the offer but I can hardly keep up with the things I am currently working on. Have you tried to repair the table? You should probably make a backup first.
  #8  
Old Mar 31, 2009, 08:10 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Understood. Do you think it's the wp_posts table? There doesn't seem to be a wp_categories table.

Should I back up the whole database or just that table?
  #9  
Old Mar 31, 2009, 08:38 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The wp_posts table looked out of order. Perhaps other tables are damaged too. I'd backup everything and start all over with trying to repair one table after another and installing Wordpress again until everything works. Sounds like a lot of work, unfortunately.
  #10  
Old Mar 31, 2009, 08:58 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I'll see what I can do about it.

How does this kind of thing happen? Did I do something wrong that I can avoid in the future?
  #11  
Old Mar 31, 2009, 11:14 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Perhaps the server was shut off all of a sudden, I don't know. I don't think that Atahualpa caused this. In the newer Atahualpa versions I am not accessing the database directly, only through standard Wordpress functions.
  #12  
Old Apr 1, 2009, 05:32 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
The ISP support guy said they repaired all the tables last night, but the problem persists. I've asked him to go in as admin to see what I mean.

I guess the next step would be to re-install WP and the theme? Would this be a good time to install the new Atahualpa? I had customized the header config file in Functions quite a bit to put a 2-column logo and an ad in the logo area. What will happen to that? I am also using several custom post templates.
  #13  
Old Apr 1, 2009, 08:22 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I'd install the new version as a new theme and run both side by side. That way you can see whether the issues are related to the a certain version of Atahualpa and also carry over your edits one by one.
  #14  
Old Apr 1, 2009, 09:47 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
OK, I did upload new Atahualpa and tried it out. No change with the categories problem.

I just discovered something strange.

In wp-content/plugins, there is a file called categories.php. There is no such file in my source folder on my hard drive. I'll put as much of the contents of the file at the end as the forum allows. It says it replaces the default WP categories widget. I did load several plugins having to do with categories, and deactivated several that didn't help me. When I deleted this categories.php, I got an error message when clicking on Categories in Dashboard, saying "Cannot load categories page."

So I was getting frustrated, but just now, I put the file back and deleted it again, and voila! The categories list appears now! All seems to be working, at least as far as I can tell.

Was this file an artifact left over after I deleted a plugin that didn't help me? I see a bunch of files in /plugins that must be put there by plugins, outside the folders of the individual plugins. I wonder which of them may be causing other troubles? I wish that when you remove a plugin's folder, the artifacts would also get zapped.

I hope this thread is helpful to somebody else at some point. I think I'll point to it from the wordpress.org thread I mentioned earlier. Thanks for the help, Flynn and others!

Now, when I switch to new Atahualpa, I should be OK if I just substitute the theme files I've modified, like the header config which shows my custom ad placement?


[code]<?php

/**
* Advanced categories widget
* Replaces the default WordPress Categories widget
* Arguments are input through the widget control panel
*
* @since 0.1
*/
function widget_reloaded_categories($args, $widget_args = 1) {

extract($args, EXTR_SKIP);

if(is_numeric($widget_args))
$widget_args = array('number' => $widget_args);

$widget_args = wp_parse_args($widget_args, array('number' => -1));

extract($widget_args, EXTR_SKIP);

$options = get_option('widget_reloaded_categories');

if(!isset($options[$number]))
return;

$title = apply_filters('widget_title', $options[$number]['title']);
$orderby = $options[$number]['orderby'];
$order = $options[$number]['order'];
$exclude = $options[$number]['exclude'];
$include = $options[$number]['include'];
$depth = (int)$options[$number]['depth'];
$cat_number = (int)$options[$number]['cat_number'];
$child_of = (int)$options[$number]['child_of'];
$current_category = (int)$options[$number]['current_category'];
$feed_image = $options[$number]['feed_image'];

$hierarchical = $options[$number]['hierarchical'] ? '1' : '0';
$use_desc_for_title = $options[$number]['use_desc_for_title'] ? '1' : '0';
$show_last_updated = $options[$number]['show_last_updated'] ? '1' : '0';
$show_count = $options[$number]['show_count'] ? '1' : '0';
$hide_empty = $options[$number]['hide_empty'] ? '1' : '0';
$feed = $options[$number]['feed'] ? '1' : '0';
if($feed)
$feed = __('RSS','reloaded');

$categories = array(
'exclude' => $exclude,
'include' => $include,
'number' => $cat_number,
'depth' => $depth,
'orderby' => $orderby,
'order' => $order,
'show_last_updated' => $show_last_updated,
'style' => 'list',
'show_count' => $show_count,
'hide_empty' => $hide_empty,
'use_desc_for_title' => $use_desc_for_title,
'child_of' => $child_of,
'feed' => $feed,
'feed_image' => $feed_image,
'hierarchical' => $hierarchical,
'title_li' => false,
'current_category' => $current_category,
'echo' => 0,
'depth' => $depth,
);

echo $before_widget;

if($title)
echo $before_title . $title . $after_title;

echo '<ul class="xoxo categories">';

echo str_replace(array("\r", "\n", "\t"), '', wp_list_categories($categories));

echo '</ul>' . $after_widget;
}

/**
* Widget controls for the categories widget
* Options are chosen from user input from the widget panel
*
* @since 0.1
*/
function widget_reloaded_categories_control($widget_args) {

global $wp_registered_widgets;

static $updated = false;

if(is_numeric($widget_args))
$widget_args = array('number' => $widget_args);

$widget_args = wp_parse_args($widget_args, array('number' => -1));

extract($widget_args, EXTR_SKIP);

$options = get_option('widget_reloaded_categories');

if(!is_array($options))
$options = array();

if(!$updated && !empty($_POST['sidebar'])) :

$sidebar = (string)$_POST['sidebar'];

$sidebars_widgets = wp_get_sidebars_widgets();

if(isset($sidebars_widgets[$sidebar]))
$this_sidebar =& $sidebars_widgets[$sidebar];
else
$this_sidebar = array();

foreach($this_sidebar as $_widget_id) :

if('widget_reloaded_categories' == $wp_registered_widgets[$_widget_id]['callback'] && isset($wp_registered_widgets[$_widget_id]['params'][0]['number'])) :

$widget_number = $wp_registered_widgets[$_widget_id]['params'][0]['number'];

unset($options[$widget_number]);

endif;

endforeach;

foreach((array)$_POST['widget-reloaded-categories'] as $widget_number => $widget_reloaded_categories) :

$use_desc_for_title = strip_tags(stripslashes($widget_reloaded_categorie s['use_desc_for_title']));

$title = strip_tags(stripslashes($widget_reloaded_categorie s['title']));

$exclude = strip_tags(stripslashes($widget_reloaded_categorie s['exclude']));

$include = strip_tags(stripslashes($widget_reloaded_categorie s['include']));

$order = strip_tags(stripslashes($widget_reloaded_categorie s['order']));

$orderby = strip_tags(stripslashes($widget_reloaded_categorie s['orderby']));

$feed = strip_tags(stripslashes($widget_reloaded_categorie s['feed']));

$feed_image = strip_tags(stripslashes($widget_reloaded_categorie s['feed_image']));

$child_of = strip_tags(stripslashes($widget_reloaded_categorie s['child_of']));

$depth = strip_tags(stripslashes($widget_reloaded_categorie s['depth']));

$show_count = strip_tags(stripslashes($widget_reloaded_categorie s['show_count']));

$show_last_updated = strip_tags(stripslashes($widget_reloaded_categorie s['show_last_updated']));

$hide_empty = strip_tags(stripslashes($widget_reloaded_categorie s['hide_empty']));

$cat_number = strip_tags(stripslashes($widget_reloaded_categorie s['cat_number']));

$hierarchical = strip_tags(stripslashes($widget_reloaded_categorie s['hierarchical']));

$current_category = strip_tags(stripslashes($widget_reloaded_categorie s['current_category']));

$options[$widget_number] = compact('title', 'use_desc_for_title', 'exclude', 'include', 'orderby', 'order', 'show_last_updated', 'show_count', 'hide_empty', 'feed', 'feed_image', 'child_of', 'depth', 'cat_number', 'hierarchical', 'current_category');

endforeach;

update_option('widget_reloaded_categories', $options);

$updated = true;

endif;

if($number == -1) :
$title = '';
$exclude = '';
$include = '';
$orderby = '';
$order = '';
$use_desc_for_title = '';
$show_last_updated = '';
$show_count = '';
$hide_empty = '';
$feed = '';
$feed_image = '';
$child_of = '';
$depth = '';
$cat_number = '';
$hierarchical = '';
$current_category = '';
$number = '%i%';
else :
$title = attribute_escape($options[$number]['title']);
$exclude = attribute_escape($options[$number]['exclude']);
$include = attribute_escape($options[$number]['include']);
$orderby = attribute_escape($options[$number]['orderby']);
$order = attribute_escape($options[$number]['order']);
$use_desc_for_title = attribute_escape($options[$number]['use_desc_for_title']);
$show_count = attribute_escape($options[$number]['show_count']);
$show_last_updated = attribute_escape($options[$number]['show_last_updated']);
$hide_empty = attribute_escape($options[$number]['hide_empty']);
$feed = attribute_escape($options[$number]['feed']);
$feed_image = attribute_escape($options[$number]['feed_image']);
$child_of = attribute_escape($options[$number]['child_of']);
$depth = attribute_escape($options[$number]['depth']);
$cat_number = attribute_escape($options[$number]['cat_number']);
$hierarchical = attribute_escape($options[$number]['hierarchical']);
$current_category = attribute_escape($options[$number]['current_category']);
endif;

?>

</code>
  #15  
Old Apr 1, 2009, 10:03 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by paulae
Now, when I switch to new Atahualpa, I should be OK if I just substitute the theme files I've modified, like the header config which shows my custom ad placement?
Since 3.3. a few bigger changes happened under the hood, so it'd be better if you actually looked inside the files and applied the changes from your old files on the new files.

I.e.

All $bfa_ata_option_name variables are now named $bfa_ata['option_name']

A larger section of code "Figure out sidebars" went from header.php+footer.php (2x) to index.php (1x)

Instead of a "foreach ($options as $value)" loop on top of many files, there's only one in index.php now and all other files get all the options with a simple "global $bfa_ata"

All this improved the speed of Atahualpa by about 100 milliseconds on a fast host. I don't plan to do such a fundamental change anymore.


Good to hear that you got it working now...

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
blank wp-admin page with Atahualpa 3.32 and WP 2.71 wpuser Atahualpa 3 Wordpress theme 24 Jan 31, 2010 03:55 AM
disable links in category menu for parent categories (only childless categories link) qcook2000 Page & Category Menu Bars 0 May 15, 2009 09:09 PM
Missing Save Changes button again, and missing footer area paulae Sidebars & Widgets 1 May 13, 2009 09:46 AM
Static Page with last 3 articels from all categories frankhamm Atahualpa 3 Wordpress theme 4 Apr 10, 2009 06:37 AM
Dumb Question about missing Admin button Lionside Atahualpa 3 Wordpress theme 3 Feb 26, 2009 10:26 AM


All times are GMT -6. The time now is 11:24 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.