Hello!
Here (drupal 5.7 / Joomla to Drupal 5.x-2.1) the sections/categories are correctly converted into taxonomy's vocabulary/terms, but the articles converted in nodes (story/page) aren't linked to their original sections/categories (in edit mode every taxonomy dropdowns are set to none).

Am I missing something? Any idea? Ty in advance! :)

Comments

sensi’s picture

Status: Active » Closed (fixed)

Ok, i have made a quick hack to relate imported nodes with their imported term, if your joomla categories have an unique title you may want to give it a try:

Joomla to Drupal 5.x-2.1

Edit joomla.module:

1. add below line 361 [ $joomla_title = $data_joomla->title; ]

/*********************************************************/
/* @Start Sensi */

          //Get joomla catid (category id) for the node
		  $joomla_node_catid = $data_joomla->catid;
		  
		  //Get joomla category title with catid
		  $sql_cat = " SELECT title FROM $joomla_database.".$joomla_prefix."categories "
		            ." WHERE id='$joomla_node_catid'";
          $results_cat = db_query($sql_cat);
	      $data_cat = db_fetch_object($results_cat);
		  $joomla_node_cattitle = addslashes($data_cat->title);

		  //Get drupal term id for the term which has the same title than the joomla category
          $sql_get_cat     = "SELECT tid FROM {term_data} WHERE name='$joomla_node_cattitle'";
          $results_get_cat = db_query($sql_get_cat);
	      $drupal_node_term_id_array = db_fetch_object($results_get_cat);
		  //Taking for granted that the node is linked to only one joomla category
		  $drupal_node_term_id     = $drupal_node_term_id_array->tid;		

/* @End Sensi */		  
/*********************************************************/

2. add below line 434 [ db_query($sql_insert_rev); ]

/*********************************************************/
/* @Start Sensi */


          //Relate joomla node category to drupal term_node  
		    $sql_insert_term_node_relations = " INSERT INTO {term_node} "
			                 ."(nid,tid) "
		                     ." values ('$last_nid','$drupal_node_term_id')";
		    db_query($sql_insert_term_node_relations);	
		  
		  	
/* @End Sensi */
/*********************************************************/

Regards

8bitplateau’s picture

superb thanks
worked on d 5.19