Taxonomy translation doesn't work with PHP 4.

CommentFileSizeAuthor
#3 taxonomy.patch_5.txt6.57 KBRoberto Gerola
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ray007’s picture

Got an idea where the problem is? Maybe I can help then ...

Roberto Gerola’s picture

Yes. It seems to me that in PHP 4, at least on my hosting service, object parameters
are passed by value. In PHP 5 they are passed by reference.
The problem is the function taxonomy_translate.
I'm trying to find a different solution.

Roberto Gerola’s picture

FileSize
6.57 KB

The attached patch should solve this issue in the meantime.

Let me know.

Roberto Gerola’s picture

Status: Active » Fixed

Here it is possible to download the last files version for this issue :
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...

The implementation for taxonomy will be used also to add localization support to other
modules.
It would be helpful if someone can make some tests.
Probably I'll release only this changes in a 2.2 version.

ray007’s picture

I've done some quick tests and seen some promising results.
I now can edit the translations, and they are then used in the translated pages.

There is a little problem with editing vocabulary names and terms.
It seems, the string shown for the original term is the string for the current language.
Changes to this field are written to the original location, but not shown until you switch back to english ...
It also means, if you only change a translated term and don't touch the field for "original term", it gets overwritten with the term in your current language.

Vocabulary names don't have the same problem.

Ok, if you need more info, just ask ;-)

Roberto Gerola’s picture

Thank you.
Now it should be fixed.
Updated patch :
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/lo...

Or simply remove the line 1043 from taxonomy.module file :

if(function_exists('tobject')) $term=tobject('taxonomy_term', $term->tid, $term);

in function taxonomy_get_term($tid) {

Roberto Gerola’s picture

Status: Fixed » Closed (fixed)

Fixed in 2.2 release.