I recently updated a D6 site hosted on Linux server with HS update. All was fine. When I brought that update onto my local Windows machine, running WAMP, I got a connection reset error. In debug, it showed as a socket error. When I traced the code, it was bugging out when loading the hs_taxonomy.module file. Removing that file allowed me to bring up the site normally. Looking at the file in Netbeans turned up a number of uninitialized variables. When I initialized each of them, I was able to load the site successfully. Linux must have something that forgives uninitialized variables; the initialization seems needed for Windows.
Here's the diffs:
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- D:\Stateside\sites\all\modules\hierarchical_select\modules\hs_taxonomy.module
+++ D:\Stateside\backups\hs\hierarchical_select\modules\hs_taxonomy.module
@@ -570,7 +570,7 @@
* Implementation of hook_hierarchical_select_config_info().
*/
function hs_taxonomy_hierarchical_select_config_info() {
- static $config_info = array();
+ static $config_info;
if (!isset($config_info)) {
$config_info = array();
@@ -613,8 +613,8 @@
* Implementation of hook_token_values().
*/
function hs_taxonomy_token_values($type, $object = NULL, $options = array()) {
- static $hs_vids = array();
- static $all_vids = array();
+ static $hs_vids;
+ static $all_vids;
$separator = variable_get('hs_taxonomy_separator', variable_get('pathauto_separator', '-'));
@@ -683,7 +683,6 @@
* Implementation of hook_token_list().
*/
function hs_taxonomy_token_list($type = 'all') {
- $tokens = array();
if ($type == 'node' || $type == 'all') {
$tokens['node']['save-lineage-termpath'] = t('Only use when you have enabled the "save lineage" setting of Hierarchical Select. Will show the term\'s parent terms separated by /.');
$tokens['node']['save-lineage-termpath-raw'] = t('As [save-linage-termpath]. WARNING - raw user input.');
Comments
Comment #1
ptitwolfy commentedSame issue. Fixed by applying this patch but without removing the "$tokens = array();" code in the last function.
Thanks
Comment #2
Marino Katalinic commentedmy hs_taxonomy.module looks as if your patch has already been applied however I am experiencing same problems and getting connection reset error. Either I am not reading your patch information or my hs_taxonomy.module file correctly or something else is amiss
Here is the copy of my hs_taxonomy.module
Hopefully someone can help because I really need the hierarchical taxonomy to work on my site
Comment #3
kenorb commentedComment #4
goldTidying up the issue queue. The 6.x version is no longer supported. Only reopen this if it also applies to the 7.x.