Reviewed & tested by the community
Project:
References dialog
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2015 at 12:20 UTC
Updated:
24 Nov 2015 at 04:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
laxman.ghavte commentedComment #2
laxman.ghavte commentedComment #3
laxman.ghavte commentedAfter saving new term with Parent term relationship, first hook_entity_insert() get triggered and then hook_entity_update(). After hook_entity_update() it looses its id and pass wrong id in $_GET['destination'].
I have fixed this issue. Please check the attached patch.
Comment #4
laxman.ghavte commentedComment #5
laxman.ghavte commentedComment #6
makbul_khan8 commentedCode works fine.
Comment #7
eyilmazThere is a problem with this patch if you create an entity via references_dialog in which you also add another entity.
With this patch, we assume, that the first created/updated entity is the entity for this dialog, which is the case for taxonomy terms with parent selection (because vocabulary is updated, if hierarchy is changed), but not for new entities with new file upload for example.
We need a function to detect or determine if the updated or created entity is the right one in hook_entity_update and hook_entity_insert..
Comment #8
eyilmazAdded as $_GET Parameter to the URL.
Checking entity_type on entity_insert and entity_update.
Comment #9
laxman.ghavte commentedCode works fine.