فهرست منبع

Fixed a bug that prevented url_alias to be generated for chado_pub

ccheng 8 سال پیش
والد
کامیت
5b23ea4a20

+ 1 - 1
tripal_core/api/tripal_core.chado_nodes.api.inc

@@ -911,7 +911,7 @@ function chado_node_sync_records($base_table, $max_sync = FALSE,
   print "\n$count $base_table records found.\n";
 
   $i = 0;
-  $transaction = db_transaction();
+  //$transaction = db_transaction();
   print "\nNOTE: Syncing is performed using a database transaction. \n" .
       "If the sync fails or is terminated prematurely then the entire set of \n" .
       "synced items is rolled back and will not be found in the database\n\n";

+ 1 - 1
tripal_feature/theme/templates/tripal_feature_publications.tpl.php

@@ -1184,7 +1184,7 @@ function tripal_pub_node_insert($node) {
 function tripal_pub_node_load($nodes, $types) {
   if (count(array_intersect(array('chado_pub'), $types))) {
     foreach ($nodes as $nid => $node) {
-      if ($node->type == 'chado_pub' and !property_exists($node, 'path')) {
+      if ($node->type == 'chado_pub' and !drupal_lookup_path('alias', 'node/'. $nid)) {
         $pub_id = chado_get_id_from_nid('pub', $node->nid);
         $path = tripal_pub_set_pub_url($node, $pub_id);
       }