commit 6e3ce7c2967e1cf7b1cc098f2f05b5501944528b
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Feb 3 23:12:26 2021 +0100

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info b/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
index 7ea99608..db788bed 100644
--- a/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
+++ b/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
@@ -4,8 +4,8 @@ core = 7.x
 dependencies[] = ctools
 package = Chaos tool suite
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/ctools.info b/drupal7/sites/all/modules/ctools/ctools.info
index 49850462..3a6169ca 100644
--- a/drupal7/sites/all/modules/ctools/ctools.info
+++ b/drupal7/sites/all/modules/ctools/ctools.info
@@ -19,8 +19,8 @@ files[] = tests/object_cache.test
 files[] = tests/object_cache_unit.test
 files[] = tests/page_tokens.test
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info b/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
index 076bad0c..38065809 100644
--- a/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
+++ b/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
@@ -4,8 +4,8 @@ core = 7.x
 package = Chaos tool suite
 dependencies[] = ctools
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info b/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
index f52d44ef..b230b44a 100644
--- a/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
+++ b/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
@@ -4,8 +4,8 @@ package = Chaos tool suite
 dependencies[] = ctools
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info b/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
index 6340319b..c960e774 100644
--- a/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
+++ b/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
@@ -4,8 +4,8 @@ core = 7.x
 package = Chaos tool suite
 dependencies[] = ctools
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info b/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
index c2f41b33..19574e50 100644
--- a/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
+++ b/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
@@ -7,8 +7,8 @@ dependencies[] = page_manager
 dependencies[] = advanced_help
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/includes/context.inc b/drupal7/sites/all/modules/ctools/includes/context.inc
index 0fc62080..e933bec5 100644
--- a/drupal7/sites/all/modules/ctools/includes/context.inc
+++ b/drupal7/sites/all/modules/ctools/includes/context.inc
@@ -1416,16 +1416,12 @@ function ctools_context_get_context_from_relationships($relationships, &$context
     if (is_array($rdata['context'])) {
       $rcontexts = array();
       foreach ($rdata['context'] as $cid) {
-        if (empty($contexts[$cid])) {
-          continue 2;
+        if (!empty($contexts[$cid])) {
+          $rcontexts[] = $contexts[$cid];
         }
-        $rcontexts[] = $contexts[$cid];
       }
     }
-    else {
-      if (empty($contexts[$rdata['context']])) {
-        continue;
-      }
+    elseif (!empty($contexts[$rdata['context']])) {
       $rcontexts = $contexts[$rdata['context']];
     }
 
diff --git a/drupal7/sites/all/modules/ctools/includes/export-ui.inc b/drupal7/sites/all/modules/ctools/includes/export-ui.inc
index 72e5a2fd..1158ac8f 100644
--- a/drupal7/sites/all/modules/ctools/includes/export-ui.inc
+++ b/drupal7/sites/all/modules/ctools/includes/export-ui.inc
@@ -456,18 +456,20 @@ function ctools_export_ui_switcher_page($plugin_name, $op) {
 
   // Load the $plugin information.
   $plugin = ctools_get_export_ui($plugin_name);
-  $handler = ctools_export_ui_get_handler($plugin);
-
-  if ($handler) {
-    $method = $op . '_page';
-    if (method_exists($handler, $method)) {
-      // Replace the first two arguments:
-      $args[0] = $js;
-      $args[1] = $_POST;
-      return call_user_func_array(array($handler, $method), $args);
-    }
+  if (!$plugin) {
+    return t('Configuration error. No plugin found: %plugin_name.', array('%plugin_name' => $plugin_name));
   }
-  else {
+
+  $handler = ctools_export_ui_get_handler($plugin);
+  if (!$handler) {
     return t('Configuration error. No handler found.');
   }
+
+  $method = $op . '_page';
+  if (method_exists($handler, $method)) {
+    // Replace the first two arguments:
+    $args[0] = $js;
+    $args[1] = $_POST;
+    return call_user_func_array(array($handler, $method), $args);
+  }
 }
diff --git a/drupal7/sites/all/modules/ctools/includes/export.inc b/drupal7/sites/all/modules/ctools/includes/export.inc
index d2fff2fd..efc356ef 100644
--- a/drupal7/sites/all/modules/ctools/includes/export.inc
+++ b/drupal7/sites/all/modules/ctools/includes/export.inc
@@ -637,11 +637,19 @@ function ctools_get_default_object($table, $name) {
 }
 
 /**
+ * Get export object defaults.
+ *
  * Call the hook to get all default objects of the given type from the
  * export. If configured properly, this could include loading up an API
  * to get default objects.
+ *
+ * @param string $table
+ *   The name of the table to be loaded. Data is expected to be in the
+ *   schema to make all this work.
+ * @param array $export
+ *   The export definition from the table's hook_schema() definition.
  */
-function _ctools_export_get_defaults($table, $export) {
+function _ctools_export_get_defaults($table, array $export) {
   $cache = &drupal_static(__FUNCTION__, array());
 
   // If defaults may be cached, first see if we can load from cache.
@@ -684,7 +692,8 @@ function _ctools_export_get_defaults($table, $export) {
               $cache[$table][$name] = $object;
             }
             else {
-              // If version checking is enabled, ensure that the object can be used.
+              // If version checking is enabled, ensure that the object can be
+              // used.
               if (isset($object->api_version) &&
                 version_compare($object->api_version, $export['api']['minimum_version']) >= 0 &&
                 version_compare($object->api_version, $export['api']['current_version']) <= 0) {
@@ -866,6 +875,7 @@ function ctools_var_export($var, $prefix = '') {
     }
     else {
       $output = "array(\n";
+      ksort($var);
       foreach ($var as $key => $value) {
         $output .= $prefix . "  " . ctools_var_export($key) . " => " . ctools_var_export($value, $prefix . '  ') . ",\n";
       }
diff --git a/drupal7/sites/all/modules/ctools/includes/fields.inc b/drupal7/sites/all/modules/ctools/includes/fields.inc
index 0d3256f2..75e964f1 100644
--- a/drupal7/sites/all/modules/ctools/includes/fields.inc
+++ b/drupal7/sites/all/modules/ctools/includes/fields.inc
@@ -238,8 +238,6 @@ function ctools_field_label($field_name) {
 function ctools_field_invoke_field($field_name, $op, $entity_type, $entity, &$a = NULL, &$b = NULL, $options = array()) {
   if (is_array($field_name)) {
     $instance = $field_name;
-    $field = empty($field_name['field']) ? field_info_field($instance['field_name']) : $field_name['field'];
-    $field_name = $instance['field_name'];
   }
   else {
     list(, , $bundle) = entity_extract_ids($entity_type, $entity);
@@ -250,6 +248,11 @@ function ctools_field_invoke_field($field_name, $op, $entity_type, $entity, &$a
     return;
   }
 
+  // Keep the variables consistent regardless if we retrieve the field instance
+  // ourself, or if one is provided to us via the $field_name variable.
+  $field = field_info_field($instance['field_name']);
+  $field_name = $instance['field_name'];
+
   // Merge default options.
   $default_options = array(
     'default' => FALSE,
diff --git a/drupal7/sites/all/modules/ctools/includes/page-wizard.inc b/drupal7/sites/all/modules/ctools/includes/page-wizard.inc
index 9690aae0..d45d8042 100644
--- a/drupal7/sites/all/modules/ctools/includes/page-wizard.inc
+++ b/drupal7/sites/all/modules/ctools/includes/page-wizard.inc
@@ -97,7 +97,7 @@ function page_manager_page_wizard($name, $step = NULL) {
   }
 
   // Check for possibly more complex access callback on plugin.
-  if ($function = ctools_plugin_get_function($plugin, 'access callback') && !$function($plugin)) {
+  if (($function = ctools_plugin_get_function($plugin, 'access callback')) && !$function($plugin)) {
     return MENU_ACCESS_DENIED;
   }
 
diff --git a/drupal7/sites/all/modules/ctools/js/ajax-responder.js b/drupal7/sites/all/modules/ctools/js/ajax-responder.js
index 6c30b26d..116d4744 100644
--- a/drupal7/sites/all/modules/ctools/js/ajax-responder.js
+++ b/drupal7/sites/all/modules/ctools/js/ajax-responder.js
@@ -26,7 +26,7 @@
     // Grab all the links that match this url and add the fetching class.
     // This allows the caching system to grab each url once and only once
     // instead of grabbing the url once per <a>.
-    var $objects = $('a[href="' + old_url + '"]')
+    var $objects = $('a[href="' + old_url + '"]');
     $objects.addClass('ctools-fetching');
     try {
       url = old_url.replace(/\/nojs(\/|$)/g, '/ajax$1');
diff --git a/drupal7/sites/all/modules/ctools/js/auto-submit.js b/drupal7/sites/all/modules/ctools/js/auto-submit.js
index b658577a..0e97e2eb 100644
--- a/drupal7/sites/all/modules/ctools/js/auto-submit.js
+++ b/drupal7/sites/all/modules/ctools/js/auto-submit.js
@@ -98,5 +98,5 @@ Drupal.behaviors.CToolsAutoSubmit = {
           });
       });
   }
-}
+};
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/collapsible-div.js b/drupal7/sites/all/modules/ctools/js/collapsible-div.js
index 4e21a225..4719d7cc 100644
--- a/drupal7/sites/all/modules/ctools/js/collapsible-div.js
+++ b/drupal7/sites/all/modules/ctools/js/collapsible-div.js
@@ -194,7 +194,7 @@
             Drupal.CTools.CollapsibleCallbacksAfterToggle[i]($container, handle, content, toggle);
           }
         }
-      }
+      };
 
       var clickMe = function () {
         if (Drupal.CTools.CollapsibleCallbacks) {
@@ -222,7 +222,7 @@
         }
 
         return false;
-      }
+      };
 
       // Let both the toggle and the handle be clickable.
       toggle.click(clickMe);
@@ -237,5 +237,5 @@
     attach: function(context) {
       $('.ctools-collapsible-container', context).once('ctools-collapsible', Drupal.CTools.bindCollapsible);
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/dependent.js b/drupal7/sites/all/modules/ctools/js/dependent.js
index 77777e38..6e4b7967 100644
--- a/drupal7/sites/all/modules/ctools/js/dependent.js
+++ b/drupal7/sites/all/modules/ctools/js/dependent.js
@@ -14,7 +14,7 @@
  * - Checkboxes don't have their own id, so you need to add one in a div
  *   around the checkboxes via #prefix and #suffix. You actually need to add TWO
  *   divs because it's the parent that gets hidden. Also be sure to retain the
- *   'expand_checkboxes' in the #process array, because the CTools process will
+ *   'form_process_checkboxes' in the #process array, because the CTools process will
  *   override it.
  */
 
@@ -34,7 +34,7 @@
       }
     }
     return false;
-  }
+  };
 
 
   Drupal.CTools.dependent.autoAttach = function() {
@@ -118,7 +118,7 @@
             }
           }
           return val;
-        }
+        };
 
         var setChangeTrigger = function(trigger_id, bind_id) {
           // Triggered when change() is clicked.
@@ -205,7 +205,7 @@
                 }
               }
             }
-          }
+          };
 
           $(trigger_id).bind('change.ctools-dependent', function() {
             // Trigger the internal change function
@@ -214,11 +214,11 @@
           });
           // Trigger initial reaction
           changeTrigger(trigger_id, bind_id);
-        }
+        };
         setChangeTrigger(trigger_id, bind_id);
       }
     }
-  }
+  };
 
   Drupal.behaviors.CToolsDependent = {
     attach: function (context) {
@@ -240,5 +240,5 @@
         })
         .trigger('change.ctools-dependent');
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/dropbutton.js b/drupal7/sites/all/modules/ctools/js/dropbutton.js
index f505550b..6d08d05a 100644
--- a/drupal7/sites/all/modules/ctools/js/dropbutton.js
+++ b/drupal7/sites/all/modules/ctools/js/dropbutton.js
@@ -69,7 +69,7 @@
             $secondaryActions.animate({height: "show", opacity: "show"}, 100);
             $dropbutton.addClass('open');
           }
-        }
+        };
         // Hide the secondary actions initially.
         $secondaryActions.hide();
 
@@ -90,5 +90,5 @@
         );
       });
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/dropdown.js b/drupal7/sites/all/modules/ctools/js/dropdown.js
index c829ae2f..e2488b1e 100644
--- a/drupal7/sites/all/modules/ctools/js/dropdown.js
+++ b/drupal7/sites/all/modules/ctools/js/dropdown.js
@@ -61,7 +61,7 @@
             $("div.ctools-dropdown-container", $dropdown)
               .animate({height: "show", opacity: "show"}, 100);
           }
-        }
+        };
         $("a.ctools-dropdown-link", $dropdown).click(function() {
           toggle();
           return false;
@@ -83,5 +83,5 @@
         );
       });
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/jump-menu.js b/drupal7/sites/all/modules/ctools/js/jump-menu.js
index 7b0928a6..14852d5a 100644
--- a/drupal7/sites/all/modules/ctools/js/jump-menu.js
+++ b/drupal7/sites/all/modules/ctools/js/jump-menu.js
@@ -38,5 +38,5 @@
           return false;
         });
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/modal.js b/drupal7/sites/all/modules/ctools/js/modal.js
index 71b4b6aa..92f8d786 100644
--- a/drupal7/sites/all/modules/ctools/js/modal.js
+++ b/drupal7/sites/all/modules/ctools/js/modal.js
@@ -86,7 +86,7 @@
         'width': (width - Drupal.CTools.Modal.currentSettings.modalSize.contentRight) + 'px',
         'height': (height - Drupal.CTools.Modal.currentSettings.modalSize.contentBottom) + 'px'
       });
-    }
+    };
 
     if (!Drupal.CTools.Modal.modal) {
       Drupal.CTools.Modal.modal = $(Drupal.theme(settings.modalTheme));
@@ -120,9 +120,9 @@
    * Provide the HTML to create the modal dialog.
    */
   Drupal.theme.prototype.CToolsModalDialog = function () {
-    var html = ''
-    html += '<div id="ctools-modal">'
-    html += '  <div class="ctools-modal-content">' // panels-modal-content
+    var html = '';
+    html += '<div id="ctools-modal">';
+    html += '  <div class="ctools-modal-content">'; // panels-modal-content
     html += '    <div class="modal-header">';
     html += '      <a class="close" href="#">';
     html +=          Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage;
@@ -135,7 +135,7 @@
     html += '</div>';
 
     return html;
-  }
+  };
 
   /**
    * Provide the HTML to create the throbber.
@@ -159,7 +159,7 @@
     if (match) {
       return match[1];
     }
-  }
+  };
 
   /**
    * Click function for modals that can be cached.
@@ -186,7 +186,7 @@
 
     setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit($form, url); }, 1);
     return false;
-  }
+  };
 
   /**
    * Bind links that will open modals to the appropriate function.
@@ -250,7 +250,7 @@
 
         element_settings.url = $this.attr('action');
         element_settings.event = 'submit';
-        element_settings.progress = { 'type': 'throbber' }
+        element_settings.progress = { 'type': 'throbber' };
         var base = $this.attr('id');
 
         Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
@@ -291,9 +291,15 @@
    * AJAX responder command to place HTML within the modal.
    */
   Drupal.CTools.Modal.modal_display = function(ajax, response, status) {
+    var settings = response.settings || ajax.settings || Drupal.settings;
+    // If the modal does not exist yet, create it.
     if ($('#modalContent').length == 0) {
       Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element));
     }
+    // If the modal exists run detachBehaviors before removing existing content.
+    else {
+      Drupal.detachBehaviors($('#modalContent'), settings, 'unload');
+    }
     $('#modal-title').html(response.title);
     // Simulate an actual page load by scrolling to the top after adding the
     // content. This is helpful for allowing users to see error messages at the
@@ -302,7 +308,6 @@
     $(document).trigger('CToolsAttachBehaviors', $('#modalContent'));
 
     // Attach behaviors within a modal dialog.
-    var settings = response.settings || ajax.settings || Drupal.settings;
     Drupal.attachBehaviors($('#modalContent'), settings);
 
     if ($('#modal-content').hasClass('ctools-modal-loading')) {
@@ -315,7 +320,7 @@
       // button by the show() function called above.)
       $('#modal-content :focusable:first').focus();
     }
-  }
+  };
 
   /**
    * AJAX responder command to dismiss the modal.
@@ -323,7 +328,7 @@
   Drupal.CTools.Modal.modal_dismiss = function(command) {
     Drupal.CTools.Modal.dismiss();
     $('link.ctools-temporary-css').remove();
-  }
+  };
 
   /**
    * Display loading
@@ -334,7 +339,7 @@
       output: Drupal.theme(Drupal.CTools.Modal.currentSettings.throbberTheme),
       title: Drupal.CTools.Modal.currentSettings.loadingText
     });
-  }
+  };
 
   /**
    * Find a URL for an AJAX button.
@@ -590,6 +595,7 @@
       $('body').unbind( 'keydown', modalTabTrapHandler );
       $('.close', $modalHeader).unbind('click', modalContentClose);
       $(document).unbind('keydown', modalEventEscapeCloseHandler);
+      $(document).trigger('CToolsCloseModalBehaviors', $('#modalContent'));
       $(document).trigger('CToolsDetachBehaviors', $('#modalContent'));
 
       // Closing animation.
@@ -675,7 +681,7 @@
     var $modalContent = $('#modalContent');
     var $modalHeader = $modalContent.find('.modal-header');
     $('.close', $modalHeader).unbind('click', modalContentClose);
-    $('body').unbind('keypress', modalEventEscapeCloseHandler);
+    $(document).unbind('keydown', modalEventEscapeCloseHandler);
     $(document).trigger('CToolsDetachBehaviors', $modalContent);
 
     // jQuery magic loop through the instances and run the animations or removal.
diff --git a/drupal7/sites/all/modules/ctools/js/stylizer.js b/drupal7/sites/all/modules/ctools/js/stylizer.js
index d48f6454..227d4f4b 100644
--- a/drupal7/sites/all/modules/ctools/js/stylizer.js
+++ b/drupal7/sites/all/modules/ctools/js/stylizer.js
@@ -180,7 +180,7 @@
         );
         $(this).after(lock);
         locks.push(lock);
-      };
+      }
 
       // Add hook
       var $this = $(this);
@@ -216,5 +216,5 @@
           $widget.attr('checked', !$widget.attr('checked') || $widget.is('input[type=radio]'));
         });
     }
-  }
+  };
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/page_manager/page_manager.info b/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
index 77c9815b..06720486 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
+++ b/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
@@ -6,8 +6,8 @@ package = Chaos tool suite
 
 files[] = tests/head_links.test
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/plugins/access/node_status.inc b/drupal7/sites/all/modules/ctools/plugins/access/node_status.inc
index 137f2826..519619be 100644
--- a/drupal7/sites/all/modules/ctools/plugins/access/node_status.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/access/node_status.inc
@@ -21,7 +21,7 @@ $plugin = array(
  * Check for access.
  */
 function ctools_node_status_ctools_access_check($conf, $context) {
-  return (!empty($context->data) && $context->data->status);
+  return (!empty($context->data->status) && $context->data->status);
 }
 
 /**
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/form/entity_form_field.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/form/entity_form_field.inc
index b4d83381..f2f1e7bd 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/form/entity_form_field.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/form/entity_form_field.inc
@@ -152,6 +152,12 @@ function ctools_entity_form_field_content_type_render($subtype, $conf, $panel_ar
  * Returns the administrative title for a type.
  */
 function ctools_entity_form_field_content_type_admin_title($subtype, $conf, $context) {
+  // Return early because we don't have context to build this field from.
+  if (!$context || !isset($context->identifier)) {
+    watchdog('ctools_entity_form_field_content_type_admin_title', 'Context is missing for field: @name', array('@name' => $subtype), WATCHDOG_NOTICE);
+    return t('Deleted/missing field @name', array('@name' => $subtype));
+  }
+
   list($entity_type, $field_name) = explode(':', $subtype, 2);
 
   if (!empty($context->restrictions)) {
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/icon_user_form.png b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/icon_user_form.png
new file mode 100644
index 00000000..f0417cb6
Binary files /dev/null and b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/icon_user_form.png differ
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_actions.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_actions.inc
new file mode 100644
index 00000000..e11587d8
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_actions.inc
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form actions / buttons'),
+  'description' => t('The user form actions / buttons.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the picture form field.
+ */
+function ctools_user_form_actions_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['actions'])) {
+      $block->content['actions'] = $context->form['actions'];
+      unset($context->form['actions']);
+    }
+    // Because we are adding the submit buttons outside the General form
+    // we can assume the necessary hidden components should be added as well.
+    if (!empty($context->form['form_build_id'])) {
+      $block->content['form_build_id'] = $context->form['form_build_id'];
+      unset($context->form['form_build_id']);
+    }
+    if (!empty($context->form['form_token'])) {
+      $block->content['form_token'] = $context->form['form_token'];
+      unset($context->form['form_token']);
+    }
+    if (!empty($context->form['form_id'])) {
+      $block->content['form_id'] = $context->form['form_id'];
+      unset($context->form['form_id']);
+    }
+  }
+  else {
+    $block->content = t('User actions / buttons form components.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the actions form field.
+ */
+function ctools_user_form_actions_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form actions / buttons field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the actions form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_actions_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_component.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_component.inc
new file mode 100644
index 00000000..b4963f99
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_component.inc
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form: add a specific component'),
+  'description' => t('The user form component by selection.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the picture form field.
+ */
+function ctools_user_form_component_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form[$conf['field']])) {
+      $block->content[$conf['field']] = $context->form[$conf['field']];
+      unset($context->form[$conf['field']]);
+    }
+  }
+  else {
+    $block->content = t('User form edit components.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the a selectable form field.
+ */
+function ctools_user_form_component_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form @field field', array('@s' => $context->identifier, '@field' => $conf['field']));
+}
+
+/**
+ * Ctools plugin configuration edit form for the selectable form field.
+ *
+ * Provide the list of fields in the user profile edit form to select from the
+ * plugin configuration.
+ */
+function ctools_user_form_component_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+  $user_form = drupal_get_form('user_profile_form');
+
+  $field_keys = element_children($user_form);
+  $options = array_combine($field_keys, $field_keys);
+
+  $form['field'] = array(
+    '#type' => 'select',
+    '#title' => t('User form field'),
+    '#options' => $options,
+    '#description' => t('Select a form field from the current user form to display in this pane.'),
+    '#default_value' => !empty($conf['field']) ? $conf['field'] : '',
+  );
+  return $form;
+}
+
+/**
+ * Ctools plugin configuration edit form submit handler.
+ */
+function ctools_user_form_component_content_type_edit_form_submit($form, &$form_state) {
+  $form_state['conf']['field'] = $form_state['values']['field'];
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_email.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_email.inc
new file mode 100644
index 00000000..346555d0
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_email.inc
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form email field'),
+  'description' => t('The user email form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the email form field.
+ */
+function ctools_user_form_email_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    // The current password is required to change the email.
+    if (!empty($context->form['account']['current_pass'])) {
+      $block->content['current_pass'] = $context->form['account']['current_pass'];
+      unset($context->form['account']['current_pass']);
+    }
+    if (!empty($context->form['account']['mail'])) {
+      $block->content['mail'] = $context->form['account']['mail'];
+      unset($context->form['account']['mail']);
+    }
+  }
+  else {
+    $block->content = t('User email form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the email form field.
+ */
+function ctools_user_form_email_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form email field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the email form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_email_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_notify.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_notify.inc
new file mode 100644
index 00000000..bb74963c
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_notify.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form notify field'),
+  'description' => t('The user notify form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the notify form field.
+ */
+function ctools_user_form_notify_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['account']['notify'])) {
+      $block->content['notify'] = $context->form['account']['notify'];
+      unset($context->form['account']['notify']);
+    }
+  }
+  else {
+    $block->content = t('User notify form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the notify form field.
+ */
+function ctools_user_form_notify_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form notify field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the notify form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_notify_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_password.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_password.inc
new file mode 100644
index 00000000..89bab949
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_password.inc
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form password field'),
+  'description' => t('The user password form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the password form field.
+ */
+function ctools_user_form_password_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    // The current password is required to change the password.
+    if (!empty($context->form['account']['current_pass'])) {
+      $block->content['current_pass'] = $context->form['account']['current_pass'];
+      unset($context->form['account']['current_pass']);
+    }
+    if (!empty($context->form['account']['pass'])) {
+      $block->content['pass'] = $context->form['account']['pass'];
+      unset($context->form['account']['pass']);
+    }
+  }
+  else {
+    $block->content = t('User password form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the password form field.
+ */
+function ctools_user_form_password_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form password field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the password form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_password_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_picture.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_picture.inc
new file mode 100644
index 00000000..ac310bed
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_picture.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form picture field'),
+  'description' => t('The user picture form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the picture form field.
+ */
+function ctools_user_form_picture_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['picture'])) {
+      $block->content['picture'] = $context->form['picture'];
+      unset($context->form['picture']);
+    }
+  }
+  else {
+    $block->content = t('User picture form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the picture form field.
+ */
+function ctools_user_form_picture_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form picture field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the picture form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_picture_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_roles.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_roles.inc
new file mode 100644
index 00000000..47a169f7
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_roles.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form roles field'),
+  'description' => t('The user roles form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the roles form field.
+ */
+function ctools_user_form_roles_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['account']['roles'])) {
+      $block->content['roles'] = $context->form['account']['roles'];
+      unset($context->form['account']['roles']);
+    }
+  }
+  else {
+    $block->content = t('User roles form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the roles form field.
+ */
+function ctools_user_form_roles_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form roles field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the roles form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_roles_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_signature_settings.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_signature_settings.inc
new file mode 100644
index 00000000..2a69ea09
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_signature_settings.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form signature settings field'),
+  'description' => t('The user signature settings form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the signature settings form field.
+ */
+function ctools_user_form_signature_settings_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['signature_settings'])) {
+      $block->content['signature_settings'] = $context->form['signature_settings'];
+      unset($context->form['signature_settings']);
+    }
+  }
+  else {
+    $block->content = t('User signature settings form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the signature settings form field.
+ */
+function ctools_user_form_signature_settings_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form signature settings field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the signature settings form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_signature_settings_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_status.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_status.inc
new file mode 100644
index 00000000..7c7f8724
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_status.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form status field'),
+  'description' => t('The user status form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the status form field.
+ */
+function ctools_user_form_status_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['account']['status'])) {
+      $block->content['status'] = $context->form['account']['status'];
+      unset($context->form['account']['status']);
+    }
+  }
+  else {
+    $block->content = t('User status form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the status form field.
+ */
+function ctools_user_form_status_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form status field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the status form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_status_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_timezone.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_timezone.inc
new file mode 100644
index 00000000..1a006648
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_timezone.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form timezone field'),
+  'description' => t('The user timezone form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the timezone form field.
+ */
+function ctools_user_form_timezone_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['timezone'])) {
+      $block->content['timezone'] = $context->form['timezone'];
+      unset($context->form['timezone']);
+    }
+  }
+  else {
+    $block->content = t('User timezone form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the timezone form field.
+ */
+function ctools_user_form_timezone_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form timezone field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the timezone form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_timezone_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_username.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_username.inc
new file mode 100644
index 00000000..d6495308
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_form/user_form_username.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'icon' => 'icon_user_form.png',
+  'title' => t('User form username field'),
+  'description' => t('The user username form.'),
+  'required context' => new ctools_context_required(t('Form'), 'form'),
+  'category' => t('Form'),
+);
+
+/**
+ * Ctools plugin content type render for the username form field.
+ */
+function ctools_user_form_username_content_type_render($subtype, $conf, $panel_args, &$context) {
+  $block = new stdClass();
+  $block->module = t('user-form');
+
+  $block->delta = 'title-options';
+
+  if (isset($context->form)) {
+    if (!empty($context->form['account']['name'])) {
+      $block->content['name'] = $context->form['account']['name'];
+      unset($context->form['account']['name']);
+    }
+  }
+  else {
+    $block->content = t('User username form.');
+  }
+  return $block;
+}
+
+/**
+ * Ctools plugin admin title function for the username form field.
+ */
+function ctools_user_form_username_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" user form username field', array('@s' => $context->identifier));
+}
+
+/**
+ * Ctools plugin configuration edit form for the username form field.
+ *
+ * Provide a blank form so we have a place to have context setting.
+ */
+function ctools_user_form_username_content_type_edit_form($form, &$form_state) {
+  return $form;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc b/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
index bbdbd1a2..9cd73085 100644
--- a/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
@@ -41,10 +41,13 @@ function ctools_context_create_user($empty, $data = NULL, $conf = FALSE) {
   if ($conf) {
     if ($data['type'] == 'current') {
       global $user;
-      $data = user_load($user->uid);
       if (user_is_logged_in()) {
+        $data = user_load($user->uid);
         $data->logged_in_user = TRUE;
       }
+      else {
+        $data = drupal_anonymous_user();
+      }
     }
     else {
       $data = user_load($data['uid']);
diff --git a/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php b/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
index 0c8145e4..f78795aa 100644
--- a/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
+++ b/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
@@ -310,7 +310,7 @@ class ctools_export_ui {
 
     $form['bottom row']['reset'] = array(
       '#type' => 'submit',
-      '#id' => 'ctools-export-ui-list-items-apply',
+      '#id' => 'ctools-export-ui-list-items-reset',
       '#value' => t('Reset'),
       '#attributes' => array('class' => array('use-ajax-submit')),
     );
diff --git a/drupal7/sites/all/modules/ctools/plugins/relationships/comment_parent.inc b/drupal7/sites/all/modules/ctools/plugins/relationships/comment_parent.inc
new file mode 100644
index 00000000..ae29a08c
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/relationships/comment_parent.inc
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @file relationships/comment_parent.inc
+ * Plugin to provide a relationship handler for comment parent.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'title' => t('Parent comment'),
+  'keyword' => 'parent_comment',
+  'description' => t('Adds a parent comment from a comment context.'),
+  'required context' => new ctools_context_required(t('Comment'), 'entity:comment'),
+  'context' => 'ctools_comment_parent_context',
+);
+
+/**
+ * Return a new context based on an existing context.
+ */
+function ctools_comment_parent_context($context, $conf) {
+  if (empty($context->data)) {
+    return ctools_context_create_empty('entity:comment');
+  }
+
+  if (isset($context->data->pid) && ($context->data->pid !== 0)) {
+    $parent_comment = comment_load($context->data->pid);
+    return ctools_context_create('entity:comment', $parent_comment);
+  }
+}
diff --git a/drupal7/sites/all/modules/ctools/stylizer/stylizer.info b/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
index a86ada60..6b7f70f5 100644
--- a/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
+++ b/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
@@ -5,8 +5,8 @@ package = Chaos tool suite
 dependencies[] = ctools
 dependencies[] = color
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/term_depth/term_depth.info b/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
index 4f05954d..5cceeda7 100644
--- a/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
+++ b/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
@@ -4,8 +4,8 @@ core = 7.x
 dependencies[] = ctools
 package = Chaos tool suite
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info b/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
index bc231dbf..6bb6063a 100644
--- a/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
+++ b/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
@@ -7,8 +7,8 @@ hidden = TRUE
 
 files[] = ctools_export.test
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info b/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
index bdb624c7..5c955bb4 100644
--- a/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
+++ b/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
@@ -5,8 +5,8 @@ core = 7.x
 dependencies[] = ctools
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc b/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc
index 801d3d61..af0704f3 100644
--- a/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc
+++ b/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc
@@ -385,13 +385,6 @@ class views_content_plugin_display_panel_pane extends views_plugin_display {
     return (bool) $conf['more_link'];
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function has_path() {
-    return TRUE;
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.info b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.info
new file mode 100644
index 00000000..336876a8
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.info
@@ -0,0 +1,11 @@
+name = Views content panes Test
+description = Test module for Views content panes.
+package = Views
+core = 7.x
+dependencies[] = views_content
+hidden = TRUE
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
+core = "7.x"
+project = "ctools"
+datestamp = "1611988843"
diff --git a/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.module b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.module
new file mode 100644
index 00000000..52998650
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.module
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Helper module for Views content pane tests.
+ */
+
+/**
+ * Implements hook_views_api().
+ */
+function views_content_test_views_api() {
+  return array(
+    'api' => 3.0,
+  );
+}
diff --git a/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.views_default.inc b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.views_default.inc
new file mode 100644
index 00000000..6dd08494
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/views_content/tests/modules/views_content_test.views_default.inc
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * @file
+ * Tests views.
+ */
+
+/**
+ * Implements hook_views_default_views().
+ */
+function views_content_test_views_default_views() {
+  $view = new view();
+  $view->name = 'views_content_more_link';
+  $view->description = '';
+  $view->tag = 'default';
+  $view->base_table = 'node';
+  $view->human_name = 'views_content_more_link';
+  $view->core = 7;
+  $view->api_version = '3.0';
+  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+  /* Display: Master */
+  $handler = $view->new_display('default', 'Master', 'default');
+  $handler->display->display_options['title'] = 'views_content_more_link';
+  $handler->display->display_options['use_more'] = TRUE;
+  $handler->display->display_options['use_more_always'] = FALSE;
+  $handler->display->display_options['access']['type'] = 'perm';
+  $handler->display->display_options['cache']['type'] = 'none';
+  $handler->display->display_options['query']['type'] = 'views_query';
+  $handler->display->display_options['exposed_form']['type'] = 'basic';
+  $handler->display->display_options['pager']['type'] = 'none';
+  $handler->display->display_options['pager']['options']['offset'] = '0';
+  $handler->display->display_options['style_plugin'] = 'table';
+  $handler->display->display_options['style_options']['columns'] = array(
+    'title' => 'title',
+  );
+  $handler->display->display_options['style_options']['class'] = '';
+  $handler->display->display_options['style_options']['default'] = '-1';
+  $handler->display->display_options['style_options']['info'] = array(
+    'title' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+  );
+  /* Field: Content: Title */
+  $handler->display->display_options['fields']['title']['id'] = 'title';
+  $handler->display->display_options['fields']['title']['table'] = 'node';
+  $handler->display->display_options['fields']['title']['field'] = 'title';
+  $handler->display->display_options['fields']['title']['label'] = '';
+  $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
+  $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
+  /* Sort criterion: Content: Post date */
+  $handler->display->display_options['sorts']['created']['id'] = 'created';
+  $handler->display->display_options['sorts']['created']['table'] = 'node';
+  $handler->display->display_options['sorts']['created']['field'] = 'created';
+  $handler->display->display_options['sorts']['created']['order'] = 'DESC';
+  /* Filter criterion: Content: Published status */
+  $handler->display->display_options['filters']['status']['id'] = 'status';
+  $handler->display->display_options['filters']['status']['table'] = 'node';
+  $handler->display->display_options['filters']['status']['field'] = 'status';
+  $handler->display->display_options['filters']['status']['value'] = 1;
+  $handler->display->display_options['filters']['status']['group'] = 1;
+  $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
+
+  /* Display: Page */
+  $handler = $view->new_display('page', 'Page', 'page');
+  $handler->display->display_options['path'] = 'views-content-more-link';
+
+  /* Display: Content pane */
+  $handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
+  $handler->display->display_options['defaults']['pager'] = FALSE;
+  $handler->display->display_options['pager']['type'] = 'some';
+  $handler->display->display_options['pager']['options']['items_per_page'] = '3';
+  $handler->display->display_options['pager']['options']['offset'] = '0';
+
+  $views[$view->name] = $view;
+
+  return $views;
+}
diff --git a/drupal7/sites/all/modules/ctools/views_content/tests/src/views_content.test b/drupal7/sites/all/modules/ctools/views_content/tests/src/views_content.test
new file mode 100644
index 00000000..25fee392
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/views_content/tests/src/views_content.test
@@ -0,0 +1,79 @@
+<?php
+
+/**
+ * @file
+ * Contains ViewsContentPanesTest.
+ */
+
+/**
+ * Tests rendering views content pane displays.
+ */
+class ViewsContentPanesTest extends ViewsSqlTest {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Views content panes tests',
+      'description' => 'Tests rendering views content pane displays.',
+      'group' => 'ctools',
+      'dependencies' => array('ctools', 'views'),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp(array $modules = array()) {
+    $modules[] = 'ctools';
+    $modules[] = 'views_content';
+    $modules[] = 'views_content_test';
+    parent::setUp($modules);
+  }
+
+  /**
+   * Tests rendering a content pane with a more link.
+   */
+  public function testViewMoreLink() {
+    // The view "views_content_more_link" has two displays: a content pane
+    // display and a page display. The content pane display displays 3 nodes,
+    // the page display displays all items.
+    // On the content pane display a "more" link is configured that should link
+    // to the page.
+    $view = views_get_view('views_content_more_link');
+
+    // Create four nodes that the view will display. The first three
+    // will get displayed on the content pane display and the remaining
+    // on the page display.
+    for ($i = 0; $i < 4; $i++) {
+      $this->drupalCreateNode();
+    }
+
+    // Render the content pane display and assert that a more link is shown.
+    $view->set_display('panel_pane_1');
+    $rendered_output = $view->preview();
+    $this->verbose($rendered_output);
+    $this->storeViewPreview($rendered_output);
+
+    $this->assertLink('more');
+    $this->assertLinkByHref('views-content-more-link');
+  }
+
+  /**
+   * Stores a view output in the elements.
+   *
+   * @param string $output
+   *   The Views HTML output.
+   */
+  protected function storeViewPreview($output) {
+    $html_dom = new DOMDocument();
+    @$html_dom->loadHTML($output);
+    if ($html_dom) {
+      // It's much easier to work with simplexml than DOM, luckily enough
+      // we can just simply import our DOM tree.
+      $this->elements = simplexml_import_dom($html_dom);
+    }
+  }
+
+}
diff --git a/drupal7/sites/all/modules/ctools/views_content/views_content.info b/drupal7/sites/all/modules/ctools/views_content/views_content.info
index 9b348c52..3ab45e66 100644
--- a/drupal7/sites/all/modules/ctools/views_content/views_content.info
+++ b/drupal7/sites/all/modules/ctools/views_content/views_content.info
@@ -8,9 +8,10 @@ package = Chaos tool suite
 files[] = plugins/views/views_content_plugin_display_ctools_context.inc
 files[] = plugins/views/views_content_plugin_display_panel_pane.inc
 files[] = plugins/views/views_content_plugin_style_ctools_context.inc
+files[] = tests/src/views_content.test
 
-; Information added by Drupal.org packaging script on 2020-10-23
-version = "7.x-1.17"
+; Information added by Drupal.org packaging script on 2021-01-30
+version = "7.x-1.19"
 core = "7.x"
 project = "ctools"
-datestamp = "1603490551"
+datestamp = "1611988843"
