The widget is not showing up on my site. Everything is installed and configured correctly. I have checked and it seems that the "Taxonomy translation" module is not compatible with Taxiselect. Taxiselect is showing up when I disable "Taxonomy translation". I guess this is part of the i18n module.

More information can be found in issue #456280

Am I the only one who is using Taxonomy translation in combination with Taxiselect? Can this be fixed. I really need the widget. Especially now, when I have seen it on my site!

Comments

alan d.’s picture

No wonder that we could not replicate this! I'll have a look at this soon. If you can find any resources / background related to i18n and similar issues it will speed up the task.

Cheers

Alan

alan d.’s picture

This module has a higher system weight and overrides the taxonomy form that TaxiSelect generates.

It then parses the entire Taxonomy tree and runs all terms through the tt() to translate each term. No workaround to the performance hit, but I've left an issue in the i18n queue about this: http://drupal.org/node/599088

Two workarounds:

1) Disable taxonomy translation on the vocabulary

or

2) Change the system weight of taxiselect to be 1 higher than the weight of the i18ntaxonomy in the {system} table.

I'm in the middle of some other changes, but an update that does #2 will be out in a week or two hopefully. We are about to be flooded with two months of solid work so I do not know when I'll get the time :(

cronix’s picture

I cannot wait until the update is there. Call me stupid, but how do I change the weight of the taxiselect module?

alan d.’s picture

You need to manually update the database system table changing the weight value of Taxiselect to 20 or something else higher than the i18ntaxonomy module. Make backups before you start in case you, or the program that you use, gets this wrong.

Look for SSH / MySQL forum topics to do this via a consol or look for topics on PHPMyAdmin. This is getting more advanced but you should be right as long as you only change the single value in the single row in the system table for taxiselect.

A third minimally tested way is to cut and paste this into your themes template.php, load the page once, then delete the code (it should only be run once!!!)

<?php
/**
 * Helper function to fix these module issues.
 */
function taxiselect_incompatible_modules_fix() {
  $incompatible_modules = array('content_taxonomy', 'i18ntaxonomy', 'og_vocab', 'taxonomy');
  $placeholders = db_placeholders($incompatible_modules, 'varchar');
  $weight = max(20, db_result(db_query("SELECT MAX(weight) + 2 FROM {system} WHERE name IN (". $placeholders .")", $incompatible_modules)));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'taxiselect'", $weight);
}
taxiselect_incompatible_modules_fix();
?>
cronix’s picture

Yes! The code above is fixing the issue. You really made my day. I have a large and deeply nested taxonomy that is finally usable in a friendly way.

SELECT name, weight FROM system WHERE name IN ('content_taxonomy', 'i18ntaxonomy', 'og_vocab', 'taxonomy','taxiselect');

The result is:

+--------------+--------+
| name         | weight |
+--------------+--------+
| i18ntaxonomy |      5 | 
| taxonomy     |      0 | 
| taxiselect   |     20 | 
+--------------+--------+
3 rows in set (0.00 sec)

The update is performed correctly.

I only hope that you make the update of the next version robust enough that this update code is not run again in my installation?

alan d.’s picture

It will run again, but the update will only update the weight from 20 back to 20. ;)

alan d.’s picture

Status: Active » Fixed

This has been committed into release 6.x-2-alpha-4

cronix’s picture

Status: Fixed » Closed (fixed)

I have tested alpha-4 and it is working on my site! This one can be closed.

alan d.’s picture

Thanks cronix. Glad this worked out.

As a side note, the Drupal "Project" module, which runs the issue queue, automatically closes "fixed" issues after two weeks