Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
I can't use categories via txp: no_categories_exist
My Article Categories are working fine, but Link Categories, Image Categories and File Categories are busted. (I’m not sure exactly when or how they stopped working.)
They show up as “no_categories_exist” on the Organize page. It won’t let me create a category via the forms: I type in a name, click “create”, and nothing happens.
There are categories in the database, which I created before this broke.
When adding a new link (for example), the “Link category” line has no dropdown. I can add the link, and it’s added to the database without a category. I can manually categorize via phpmyadmin. (It’s annoying, but it works.)
Reinstalling Textpattern doesn’t fix it, nor does repairing the database tables via phpmyadmin.
Googling “no_categories_exist” doesn’t bring up any helpful info, nor can I find any mention in obvious Textpattern support places (like this forum!).
Any ideas?
Offline
#2 2007-01-12 03:49:03
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: I can't use categories via txp: no_categories_exist
What version are you running? Did you monkey with any of the Textpattern tables in phpMyAdmin?
Offline
Re: I can't use categories via txp: no_categories_exist
Textpattern version: 4.0.4 (r1956)
I don’t think I monkeyed with any of the tables. But again, I can’t remember quite when/why this happened. I figured it would fix itself when I moved my site to a new server running a new installation of textpattern. It didn’t.
Offline
#4 2007-01-13 01:59:07
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: I can't use categories via txp: no_categories_exist
Okay, go to your phpMyAdmin, and export your category table. Either post it here – or perhaps at pastebin – and I can, very likely, fix it. :)
Offline
Re: I can't use categories via txp: no_categories_exist
— phpMyAdmin SQL Dump
— version 2.9.0.2
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Jan 13, 2007 at 06:44 PM
— Server version: 4.1.21
— PHP Version: 4.4.2
—
— Database: `jasondas_gwntxp`
—
— ————————————————————————————
—
— Table structure for table `txp_category`
—
CREATE TABLE `txp_category` (
`id` int(6) NOT NULL auto_increment,
`name` varchar(64) NOT NULL default ‘’,
`type` varchar(64) NOT NULL default ‘’,
`parent` varchar(64) NOT NULL default ‘’,
`lft` int(6) NOT NULL default ‘0’,
`rgt` int(6) NOT NULL default ‘0’,
`title` varchar(255) NOT NULL default ‘’,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=1 AUTO_INCREMENT=90 ;
—
— Dumping data for table `txp_category`
—
INSERT INTO `txp_category` VALUES (72, ‘sketchbook’, ‘image’, ‘root’, 8, 9, ‘sketchbook’);
INSERT INTO `txp_category` VALUES (76, ‘illo’, ‘image’, ‘root’, 6, 7, ‘illo’);
INSERT INTO `txp_category` VALUES (74, ‘whatev’, ‘article’, ‘root’, 8, 9, ‘whatev’);
INSERT INTO `txp_category` VALUES (75, ‘smalltalk’, ‘link’, ‘root’, 4, 5, ‘smalltalk’);
INSERT INTO `txp_category` VALUES (71, ‘sketchbook’, ‘article’, ‘root’, 6, 7, ‘sketchbook’);
INSERT INTO `txp_category` VALUES (64, ‘root’, ‘article’, ‘’, 1, 12, ‘root’);
INSERT INTO `txp_category` VALUES (77, ‘Blind-Contour’, ‘image’, ‘root’, 2, 3, ‘Blind Contour’);
INSERT INTO `txp_category` VALUES (78, ‘BCF’, ‘article’, ‘root’, 2, 3, ‘BCF’);
INSERT INTO `txp_category` VALUES (79, ‘Work-3D’, ‘image’, ‘root’, 14, 15, ‘Work: 3D’);
INSERT INTO `txp_category` VALUES (80, ‘Work-2D’, ‘image’, ‘root’, 12, 13, ‘Work: 2D’);
INSERT INTO `txp_category` VALUES (81, ‘Work’, ‘article’, ‘root’, 10, 11, ‘Work’);
INSERT INTO `txp_category` VALUES (82, ‘comix’, ‘article’, ‘root’, 4, 5, ‘comix’);
INSERT INTO `txp_category` VALUES (83, ‘comix’, ‘image’, ‘root’, 4, 5, ‘comix’);
INSERT INTO `txp_category` VALUES (89, ‘testyou’, ‘link’, ‘root’, 6, 7, ‘testyou’);
INSERT INTO `txp_category` VALUES (87, ‘Me-Elsewhere’, ‘link’, ‘root’, 2, 3, ‘Me-Elsewhere’);
Offline
Re: I can't use categories via txp: no_categories_exist
There it is, hopefully in the right format, etc. thanks, Mary!
Offline
#7 2007-01-15 06:59:27
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: I can't use categories via txp: no_categories_exist
Yep, that’s exactly what I needed. Okay, back into phpMyAdmin, and run the following SQL:
TRUNCATE `txp_category`;
INSERT INTO `txp_category` VALUES (1, 'root', 'article', '', 1, 12, 'root');
INSERT INTO `txp_category` VALUES (2, 'root', 'link', '', 1, 8, 'root');
INSERT INTO `txp_category` VALUES (3, 'root', 'image', '', 1, 14, 'root');
INSERT INTO `txp_category` VALUES (4, 'root', 'file', '', 1, 2, 'root');
INSERT INTO `txp_category` VALUES (5, 'bcf', 'article', 'root', 2, 3, 'BCF');
INSERT INTO `txp_category` VALUES (6, 'comix', 'article', 'root', 4, 5, 'comix');
INSERT INTO `txp_category` VALUES (7, 'sketchbook', 'article', 'root', 6, 7, 'sketchbook');
INSERT INTO `txp_category` VALUES (8, 'whatev', 'article', 'root', 8, 9, 'whatev');
INSERT INTO `txp_category` VALUES (9, 'work', 'article', 'root', 10, 11, 'Work');
INSERT INTO `txp_category` VALUES (10, 'me-elsewhere', 'link', 'root', 2, 3, 'Me-Elsewhere');
INSERT INTO `txp_category` VALUES (11, 'smalltalk', 'link', 'root', 4, 5, 'smalltalk');
INSERT INTO `txp_category` VALUES (12, 'testyou', 'link', 'root', 6, 7, 'testyou');
INSERT INTO `txp_category` VALUES (13, 'blind-contour', 'image', 'root', 2, 3, 'Blind Contour');
INSERT INTO `txp_category` VALUES (14, 'comix', 'image', 'root', 4, 5, 'comix');
INSERT INTO `txp_category` VALUES (15, 'illo', 'image', 'root', 6, 7, 'illo');
INSERT INTO `txp_category` VALUES (16, 'sketchbook', 'image', 'root', 8, 9, 'sketchbook');
INSERT INTO `txp_category` VALUES (17, 'work-3d', 'image', 'root', 10, 11, 'Work: 3D');
INSERT INTO `txp_category` VALUES (18, 'work-2d', 'image', 'root', 12, 13, 'Work: 2D');
That should correct the category display, and allow you to edit them all again (the problem was the four missing “root” categories, which are used internally by Txp).
Offline
Re: I can't use categories via txp: no_categories_exist
that totally worked. thank you so much, Mary!!!
Offline