Browse Source

Merge branch '7.x-3.x' of github.com:tripal/tripal into 783-tv3-pager_js_Fix

Stephen Ficklin 5 years ago
parent
commit
46af4b7059

BIN
docs/user_guide/drupal_overview.create_content1.png


BIN
docs/user_guide/drupal_overview.create_content2.png


BIN
docs/user_guide/drupal_overview.find_content.png


+ 4 - 0
docs/user_guide/drupal_overview.rst

@@ -27,6 +27,8 @@ You'll notice at the top a **Title** field and a **Body** text box. All pages re
 
 For practice, try to create two new pages. A **Home** page and an **About** page for our site. First, create the home page and second create the about page. Add whatever text you like for the body.
 
+In the screenshots above, you may have noticed the link **Add Tripal Content**.  Tripal content is different from the typical Drupal content types: **Basic Page** or **Article**.  Instead the content that Tripal provides is the biological and ancillary data that your site will provide to users.  Later this tutorial will describe how to add new biological data.
+
 Finding Content
 ---------------
 
@@ -36,6 +38,8 @@ To find any content that has been created on the site, click the **Find Content*
 
 You'll also notice a set of drop down boxes for filtering the content. For sites with many different content types and pages this helps to find content. You can use this list to click to view each page or to edit.
 
+Later in this guide, instructions will be provided for finding Tripal Content. Tripal content is different from the typical Drupal content types: **Basic Page** or **Article**.  Instead the content that Tripal provides is the biological and ancillary data that your site will provide to users.  It is also accessible via a link named **Find Tripal Content** found on the same menu bar as **Find Content**
+
 Site Administration
 -------------------
 

+ 20 - 1
docs/user_guide/install_tripal/upgrade_from_tripal2.rst

@@ -25,6 +25,8 @@ Step 1: Upgrade Tripal
   .. warning::
 
     If you have made customizations to Chado you may encounter problems during the upgrade.  It is not recommended to ever change any of the existing tables of Chado. However, if you have and if you do encounter such issues, please use the Tripal Issue queue to request help: https://github.com/tripal/tripal/issues
+    
+    If you have custom Drupal fields attached to Tripal nodes then the content in those fields will not automatically be migrated to the new Tripal v3 entities. Bradford Condon has provided some instructions to help migrate these fields after the site has been upgrade. You can find those instructions `here <https://gist.github.com/bradfordcondon/0dddfd015ff6ef1f545364c2ceff1f0b>`_.
 
 2. Put the site in maintenance mode. Before completing any upgrade you should put your site into "maintenance mode". This ensures that users are isolated from any temporary error messages generated through the process. To put the site in maintenance mode, navigate to **Administration > Configuration > Maintenance Mode** . Then click the **Put site into maintenance mode** checkbox and click **Save Configuration**. Additionally, there is a text area on this page that allows you to customize the message displayed to your users while your site is in maintenance mode.
 
@@ -184,8 +186,25 @@ You have now completed the migration process and can safely disable the Tripal v
 
 Troubleshooting
 ---------------
+1. Dealing with ``stack depth limit exceeded`` on Step 4 of the Migration.
 
-1. For sites that have upgrading from Drupal 6:
+When there is a large number of nodes, Drupal's search module fails to update the search_total table and gives the following error:
+
+.. code-block:: bash
+
+    Uncaught exception thrown in shutdown function. PDOException: SQLSTATE[54001]: Statement too complex: 7 ERROR:  stack depth limit exceeded
+    HINT:  Increase the configuration parameter &amp;quot;max_stack_depth
+
+
+You can avoid this problem by clearing out the Drupal search tables byu executing the following SQL commands:
+
+.. code-block:: sql
+
+    TRUNCATE search_total;
+    TRUNCATE search_index;
+
+
+2. For sites that have upgrading from Drupal 6:
 
   If your site was upgraded from Drupal 6, you'll need to add a new text format with a machine name called 'full_html' as this is the default formatter that Tripal v3 uses. As in Drupal 6, the 'Full HTML' text format has a numeric machine name (usually '2') that was later changed to 'full_html' in Drupal 7.
 

+ 9 - 0
tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

@@ -161,18 +161,27 @@ class TripalContentService_v0_1 extends TripalWebService {
       $field_name = $instance['field_name'];
       $field = field_info_field($field_name);
       $field_type = $field['type'];
+
       // Skip fields of remote data.
       if ($field_type == 'remote__data') {
         continue;
       }
+
       $vocabulary = $instance['settings']['term_vocabulary'];
       $accession = $instance['settings']['term_accession'];
       $temp_term = tripal_get_term_details($vocabulary, $accession);
+
+      // See if the name matches perfectly.
+      if (strtolower($temp_term['name']) == strtolower($expfield)) {
+        return [$field, $instance, $temp_term];
+      }
+
       // See if the name provided matches the field name after a bit of
       // cleanup.
       if (strtolower(preg_replace('/[^\w]/', '_', $temp_term['name'])) == strtolower($expfield)) {
         return [$field, $instance, $temp_term];
       }
+
       // Alternatively if the CV term accession matches then we're good too.
       if ($vocabulary . ':' . $accession == $expfield) {
         return [$field, $instance, $temp_term];