Hi, I have this notice when I edit or create a node whith a new taxonomy term created by autocomplete widget and "Synchronise changes to this vocabulary" is selected.

Notice: Undefined property: stdClass::$description in _taxonomy_menu_create_item() (line 817 of C:/...drupal10\sites\all\modules\taxonomy_menu\taxonomy_menu.module).

Thanks

Comments

dgastudio’s picture

same here on add items to vocabulary.

planctus’s picture

Same problem here.. i was setting a translation set.
Da.

johnv’s picture

Indeed, happens with latest version, too.
Seems like free tagging is not supported.
I get below messages, with AND without setting "Synchronise changes to this vocabulary".

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of entity.inc).
Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2135 of database.inc).
Warning: Illegal offset type in taxonomy_field_validate() (line 1362 of taxonomy\taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_validate() (line 1362 of taxonomy\taxonomy.module).
taxonomy_term_reference_illegal_value

ali_b’s picture

yes, it is with free tagging. menu item is created, but notice displayed:
Notice: Undefined property: stdClass::$description in _taxonomy_menu_create_item() (line 847 of .../sites/all/modules/taxonomy_menu/taxonomy_menu.module).

dstol’s picture

Issue tags: +Needs tests

A test with a free tagging taxonomy will solve this.

magnusk’s picture

Here is a possible fix for line 847. The term description does not exist if it's a new term that's being created in free tagging while saving a node.

        'description' => isset($term->description) ? $term->description : '',
lmeurs’s picture

#6 seems to work for me, thanks a bunch!

Same for line 1155 of taxonomy_menu.module. Original:

if ($term->description) {

Modified version:

if (isset($term->description)) {
johnv’s picture

Title: notice when new tag is created and Synchronise is enable » Notice: Undefined property: stdClass::$description in _taxonomy_menu_create_item() when adding a new,free,non-existing tag/term

more precise title.

corvus_ch’s picture

Status: Active » Needs review
StatusFileSize
new950 bytes

Here is a patch so we can do serious work here.

inventlogic’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

this need to be ported to the 7.x-2.x branch as I am using the latest alpha and this error still occurs

hles’s picture

Status: Needs review » Active
hles’s picture

Issue summary: View changes

refine issue

Garry Egan’s picture

Status: Active » Needs review

9: 1364144-9.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 9: 1364144-9.patch, failed testing.

doitDave’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new950 bytes

Patch attached, tested locally working.

Changed branch to 1.x, as 1.x still is the only 7.x branch with a stable release.

Kindly asking to have this in a 1.6 release asap, thanks!

jenlampton’s picture

Status: Needs review » Closed (cannot reproduce)

I'm unable to reproduce this error on the latest 7.x-1.x. If people are still seeing this notice please reopen this issue.