Hi,

I am creating a textbook search site and I recently installed Drupal 6.8 and have been pimping it out with various modules.

I've familiarized myself with CCK and Views 2 and am now ready to create my content types. My first content type for a textbook worked great, but I would like to make it more robust using taxonomy to give users a list of terms to choose from and avoid redundant terms in the database.

The first field I use for adding a textbook is School Name which I changed to a taxonomy field that works really slick with Content Taxonomy Autocomplete. Once I tested the my new and improved taxonomy enable content type I went on to add more terms to the vocabulary item School Name. I found the "mass term import" option in Taxonomy Manager Module very helpful to populate the database. Only when I gave it my list of 7000 plus schools it produced an error that it ran out of memory or something.

Realizing that I was probably over taxing the module I got the clever idea of uploading the list directly to the term_data table in the database using phpMyAdmin. It worked perfectly and I now have 7113 records in the term_data table, but when I went back to Drupal to view the schools in the taxonomy, the list stops at record number 1276.

Is there a limit to the number of taxonomy terms that Drupal will read from the database?

Any suggestions great! Thanks -Chris

Comments

gforce301’s picture

The problem stems from the fact that you manually put the entries into the term_data table and most likely got your sequences table out of whack.

If the "mass term import" option in the Taxonomy Manager module is timing out on you or running out of memory, then just split your list up into smaller pieces and load it a piece at a time.

At this point you mght be better off reverting to a clean install and rubuilding your content type and vocabulary.

phersotty’s picture

Thank you!

I followed your advice and everything is working great.

This time I created two Drupal installations on my server. One to test and experiment with and one to use as the actual production site. After doing a clean install and reloading my modules I used the Taxonomy Manager module's mass term import feature by adding terms in increments of 1000 at a time. My first attempt loaded about 1800 terms, but it was easier to keep track of using increments of the same size. If you have a list with thousands of terms like I did, I would recommend opening the text file in an editor that displays line numbers or import it into a spreadsheet so you can easily keep track of what you uploaded.

As far as a limitation to the "mass term import" I am not sure if there is one or if just more to do with timing out or memory restraints.

Using the Taxonomy Manager's "mass term import" along with a spreadsheet is a great way to create and populate terms fast. For example days of the week or months of the year can be generated automatically in a spreadsheet and then you just cut and paste the terms into Drupal.

Thanks again gforce301, I wasn't aware of the relationship between the term_data and sequences tables. I will be sure not to make changes directly to the database in the future.

gforce301’s picture

I think it's great that you have it working now. As a general rule you should always use the API functions, or a module that implements them, when making changes to the database. After you work with drupal for a while and explore and learn it's structures, it is possible to make manual changes directly to the database if you understand how it all ties together.