In node edit form with Tree view widget, its return value is using entity_id. But in organic group module, it is expecting a gid rather than entity_id.
Attached the patch for it. please review.
Thanks,
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | taxonomy-entity.png | 55.69 KB | johaziel |
| entity_reference_tree.module.patch | 1.4 KB | william.lai |
Comments
Comment #0.0
william.lai commentedupdate description
Comment #1
Pierco commentedWorks for me !
But you forgot to remove the dsm() function in your patch.
Edited: Doesn't work on other entities. Maybe you should test if $entity->gid is set before using it:
then...
Comment #2
lahode commentedHi, there
I just sent a new version that should correct this issue. Your suggestion william.lai is good but does only work for oggroups.
This project aims to work on any sort of entities, that's why I added a target_id and target_name that your can customize for the entity you want. For instant, og_group will have gid as target_id and taxonomy would have tid as target_id
Let me know if you still have an issue
Cheers
Comment #3
johazielHi lahode,
that doesn't work for taxonomy, I don't have any value in the
<input />and the vocabulary is not loaded completlyI check the $entity in _entity_reference_tree_build_item() with dpm.
and it seems that not tid the #target_id but id (look the .png)
I changed in entity_reference_tree.module line 643
to
and now it work for me...
Comment #4
lahode commentedHi, I made some changes and tested it. Everything seems to work, please try again with the new version
Comment #5.0
(not verified) commentedupdate description