Hi,
I've been trying to understand the inner workings of limesurvey_sync 2.x and it appears that sometimes function limesurvey_sync_api_entity_entity_access is called for token entities, and there are tests for fields that don't exist for this entity (e.g., user and status). Also, if I am understanding correctly, it is invoked without an entity parameter, so tests for fields of that entity fail.
Also, $entity_info['bundles'] has data, but $entity_info['entity keys']['bundle'] appears to be null, at least when call for tokens.
Unfortunately, I don't understand enough yet to say more, but the response and survey entities seem to be the only entity limesurvey entities that have uid as a field and only response seems to have status as a field.
I'm sorry if I'm misunderstanding something, but hoping this might be helpful.
Comments
Comment #2
thedut commentedHello Jibsey
The code in the limesurvey_sync_api_entity_entity_access() function looks good to me.
read line 1985 and 1989 : access is fired depending on the entity contains (or not contain) the status or author property.
Report if you find an issue using this function.
The LimeSurvey module defined a new php class in the api/limesurvey_sync_api_entity.class.inc file that create and manage entities, like ECK but in a more powerfull way in code.
Comment #3
thedut commentedThe Status property was not initialized. It is fixed now.
Comment #4
jsibley commentedThank you!