araneo
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: PHP error in wp-blog-header.phpThe categories table was created the regular way, using wp-admin, before posts and comments were copied from the old tables. I made sure that the cat_ID and cat_name were identical and in the same order in both tables, and the new fields category_nicename, category_description and category_parent (what is that?) were filled in properly by the script.
But in the SQL query I notice they talk about “category_id” while my table contains a field called ” cat_ID” instead. Is that the problem?Forum: Fixing WordPress
In reply to: PHP error in wp-blog-header.phpIt’s not an upgrade, it is a fresh installation (I populated the new posts and comments tables manually from the existing 0.71 version that’s running on the site).
The file does not appear truncated, it ends with the following:
if (1 == count($posts)) {
if ($p || $name) {
$more = 1;
$c = 1;
$single = 1;
}
if ($s && empty($paged)) { // If they were doing a search and got one result
header(‘Location: ‘ . get_permalink($posts[0]->ID));
}
}
}
?>
(lines 312 to 323 according to my text editor).
I put a copy of it as wp-blog-header.txt. Can somebody check to see if it is correct?
Thanks.Forum: Fixing WordPress
In reply to: PHP error in wp-blog-header.phpThat’s where the error for $categories occurs: the line in question is
foreach ($categories as $category) {
I commented the function out and the original error in wp-blog-header.php remainsForum: Plugins
In reply to: How to use class wpdb?Thanks, allusion, that was it: it had to be declared global. The hardest thing about PHP is figuring out what the error messages mean!