Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rivena on
Arere? I could've sworn there was a module for this, but I can't find one in the module downloads for 4.7 or 4.6 and searches don't bring up much.
Right now I am using free tagging for Anime Series, but free tagging seems to have an invisible limit on how many terms you can input, so I want to change over to a standard multi-select. This will require a mass import of terms, all of the same level though... Any ideas?
Anisa.
Comments
devel module
Have a look at the devel module, it includes several snippets for creating/importing data into Drupal. Here is an example taxonomy-import code, taken from this module:
changing includes
You'd probably have to modify the includes in the above code to:
to make it work properly in a recent Drupal version.
4.7 execute PHP code snippet
If you have the "devel" block with the "execute PHP code snippet" menu item turned on, you can do something like:
INSERT INTO term_data VALUES("72","2","Stuff","","0");
Is there something wrong with db.module for Drupal 4.7.3
I was trying to import 72 terms into a Vocabulary - it is crazy to do it manually, since the terms were from a sister site and we want to have a backup site with the same categories
The SQL is like this:
--------------------------------------------------------------------------
-- Drupal dba.module database dump
--
-- Database: ****_****
-- Date: Thursday, 28 September 2006 - 8:38pm
--
-- Table structure for table 'term_data'
--
DROP TABLE IF EXISTS term_data;
CREATE TABLE term_data (
tid int(10) unsigned NOT NULL auto_increment,
vid int(10) unsigned NOT NULL default '0',
name varchar(255) NOT NULL default '',
description longtext default NULL,
weight tinyint(4) NOT NULL default '0',
PRIMARY KEY (tid),
KEY vid (vid)
) TYPE=MyISAM;
--
-- Dumping data for table 'term_data'
--
INSERT INTO term_data VALUES("3","2","Produk Usahawan","","-9");
INSERT INTO term_data VALUES("4","2","Servis dan Perkhidmatan Usahawan","","-8");
INSERT INTO term_data VALUES("5","2","Berita dan artikel","","10");
INSERT INTO term_data VALUES("11","2","Makanan","","0");
and so on until the last is
INSERT INTO term_data VALUES("72","2","Stuff","","0");
---------------------------------------------------------------------------
But when we checked the Vocabulary (the ID 2 is for IMAGE gallery) there is none!
We also tried dropping the tables and use PHPmyAdmin instead. From term_data.sql backed up using dba.module, we click `Import' and upload term_data.sql succesfully.
But whats the reason the `LIst Term' for our IMAGE is still nothing?
Is it incorrect because the ID 2 inside the INSERT INTO term_data VALUES("72","2" is not pointing to
admin/taxonomy/edit/vocabulary/2 where it was supposed to go into?
also need to insert records into term_hierarchy
add a record into term_hierarchy for each new record in term_data and they'll show up.