Hi!

When I went to create new vocabulary (admin/structure/taxonomy/add) I got this notice:

Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (line 368 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (line 377 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

Enabled modules:

drush pml --status="Enabled" --package="Multilanguage"
 Name                                    Type    Version        
 Internationalization (i18n)             Module  7.x-1.0-alpha1 
 Multilingual content (i18n_node)        Module  7.x-1.0-alpha1 
 Multilingual select (i18n_select)       Module  7.x-1.0-alpha1 
 Multilingual variables (i18n_variable)  Module  7.x-1.0-alpha1 
 String translation (i18n_string)        Module  7.x-1.0-alpha1 
 Synchronize translations (i18n_sync)    Module  7.x-1.0-alpha1 
 Taxonomy translation (i18n_taxonomy)    Module  7.x-1.0-alpha1

Hope so it's enough data. :)

Vocabulary is successfully created.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariomaric’s picture

Also when listing (3) terms from created vocabulary (admin/structure/taxonomy/vocabulary_name) I got following error:

Notice: Trying to get property of non-object in i18n_taxonomy_form_alter() (line 455 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
Notice: Trying to get property of non-object in i18n_taxonomy_form_alter() (line 455 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
Notice: Trying to get property of non-object in i18n_taxonomy_form_alter() (line 455 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

One more thing: I can't find option to translate terms?

delugestudios’s picture

Priority: Minor » Normal

I'm running into the same exact problem. Unfortunately this could prevent me from using Drupal 7 on a site I'm currently working on, which would break my little heart. Any clue on how to move forward?

kunago’s picture

I am having the same problem. It prevents me from setting a language for a vocabulary and in a result I am unable to use the taxonomy module for a multilingual website.

robertgarrigos’s picture

Status: Active » Fixed

This should be fixed in the master branch of Jose's repo at github https://github.com/josereyero/i18n

You should be able to have a multilingual D7 with that code. He will create a new release ASAP.

kunago’s picture

Status: Fixed » Active

I have just tested the most recent version of i18n from GitHub and the problem persists.

EDIT: Adding the errors with the newest code

Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (line: 359 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (line: 368 of /var/www/www.example.com/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
jaxpax’s picture

I have just installed the latest version from Github and I'm having the same problem as pointed out in this issue.

WilliamV’s picture

I confirm this issue as well.

joostvdl’s picture

Subscribe

comerer’s picture

Also having same problem.
Tried the link above (https://github.com/josereyero/i18n), but it didnt fixed the issue.

Thank you

BVod’s picture

Subscribe

gghh2’s picture

Priority: Normal » Critical

Hi,

I have the same problem :

Notice : Undefined property: stdClass::$i18n_mode dans i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (ligne 387 dans /raid/www/siepel/www/nne/sites/all/modules/contrib/i18n/i18n_taxonomy/i18n_taxonomy.module).
Notice : Undefined property: stdClass::$i18n_mode dans i18n_taxonomy_form_taxonomy_form_vocabulary_alter() (ligne 396 dans /raid/www/siepel/www/nne/sites/all/modules/contrib/i18n/i18n_taxonomy/i18n_taxonomy.module).

but I can't add term anymore to the vocabulary created with i18n. Drupal says "New term 'gggggg' has been created" but it doesn't appear in the list of term

gurvan’s picture

FileSize
13.65 KB

the same as gghh2, note that the term is present in the DB (cf screenshot)

gurvan’s picture

Reply to myself

I disable i18n_select & it works...

jaxpax’s picture

@carcs - Could you please be more specific on how you fixed this?

Thanks.

Jose Reyero’s picture

Status: Active » Closed (fixed)
FileSize
47.91 KB

The issue original issue has been fixed in latest version (github).

Also, the issue about terms not showing up is just i18n_select module in action. Give a try to latest version, or wait for alpha3

Attached, screenshot from latest dev version (github).

klonos’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Status: Closed (fixed) » Active

I just got this on a fresh installation of core 7.x-dev using the latest 7.x-1.x-dev:

Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_vocabulary_mode() (line 1048 of /var/www/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

I am stressing the fact that latest dev builds are used - both core & i18n.

Jose Reyero’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

On which page? What are the settings for the vocabulary, etc?

We need some clues to reproduce the issue.

klonos’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

...sorry Jose, I've been trying a few new things in the past two days real quickly, so I didn't get to jot down where I got this. I know #16 is a stupid report, but I guess I thought it'd make sense without the info you request -my bad. Let's just close it then till I get it again (if I ever will) and then I'll re-open with proper info.

dqd’s picture

Status: Closed (fixed) » Active

klonos please read -> http://drupal.org/node/156119#closed

The silly ...
Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_vocabulary_mode() (line 1022 of /root/xxx/www/xxxx/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

... occures about 6 times on each page load needing any taxonomy variables, with latest i18n + i18n sub modules activated in our testing enviroment.

/**
1006  * Taxonomy vocabulary settings.
1007  *
1008  * @param $vid
1009  *   Vocabulary object or vocabulary id.
1010  * @param $mode
1011  *   Vocabulary mode to compare with.
1012  *
1013  */
1014 function i18n_taxonomy_vocabulary_mode($vid, $mode = NULL) {
1015   $modes = &drupal_static(__FUNCTION__);
1016   if (is_object($vid)) {
1017     $vid_mode = i18n_object_field($vid, 'i18n_mode', I18N_MODE_NONE);
1018     return isset($mode) ? $mode & $vid_mode : $vid_mode;
1019   }
1020   else {
1021     if (!isset($modes[$vid])) {
1022       $modes[$vid] = taxonomy_vocabulary_load($vid)->i18n_mode;
1023     }
1024     return isset($mode) ? $mode & $modes[$vid] : $modes[$vid];
1025   }
1026 }

if I am not too tired (2 pm night over here in Berlin) ... the property taxonomy_vocabulary_load($vid) can't be loaded from object i18n_mode successfully.

Another issue I recognize with it may be, that I can't save locale status of vocabularies, meaning checkboxes stay unchecked after trying any combination of localize / translate / etc on structure/taxonomy/vocabulary_name and hitting save without any luck. m... not sure of both is connected to each other.

specs -> --dev updates an hour ago ... ... D 7.8 official stable release, i18n-dev, variable, token, views, ctools, ds, webform, pathauto, etc

I hope it helps, will test more tomorrow ...
good night

dqd’s picture

ok --- changing back to english as default language and setting admin profile to english while language per user is allowed incl. running cron + cc all (clear all caches) made the error disappear.

... strange ... I'll report any further conspicuousness ....

ckrina’s picture

I'm having exactly the same error (Undefined property: stdClass::$i18n_mode in i18n_taxonomy_vocabulary_mode() ) in a today's clean D7.8 install in my localhost, so I can't show you.

I have 2 languages (Spanish & Catalan), and english dissabled. Catalan is the default language.

I have not introduced any term and it's showing me the error when I enter
Home » Administration » Structure » Taxonomy » Tags

If I turn on english, make it default language and clear cache (I know it's useless), the problem persists.

ckrina’s picture

I reinstalled my Drupal using English as default language, I installed the module again and created the terms. Then, I traduced them.
Now, I've changed the default language to Catalan again and everything works.

I don't know if it helps to fix this, but I solved the problem.

jox’s picture

Same problem as #19 here: Several of these errors on any page that uses taxonomy terms. Also on every "edit vocabulary" and "list terms" admin page.

Notice: Undefined property: stdClass::$i18n_mode in i18n_taxonomy_vocabulary_mode() (line 1022 of /mysitepath/public_html/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

Site has 4 languages (en, de, fr, es), default language is english. Happens since updating Drupal to 7.8. Module i18n is 7.x-1.0.

Jose Reyero’s picture

Status: Active » Fixed

Ok, fixed that line. I hove we got ride of this notice for ever.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tricasse’s picture

Status: Closed (fixed) » Needs review
FileSize
448 bytes

Same issue on line 600 when importing taxonomies through Features:
Notice : Undefined property: stdClass::$i18n_mode in i18n_taxonomy_taxonomy_vocabulary_update() (line 600 in /drupal_root/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).
Fixed for me with the attached patch.

Jose Reyero’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks good.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1026290.i18n_taxonomy_taxonomy_vocabulary_update.v1.patch, failed testing.

webflo’s picture

Status: Needs work » Fixed
FileSize
583 bytes

Rerolled the patch and committed to 7.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.