tripal / brapi

Breeding API client-server implementation (v1 & v2) for Tripal
https://www.drupal.org/project/brapi
0 stars 3 forks source link

Germplasm call does not work #9

Closed Jiu9Shen closed 5 years ago

Jiu9Shen commented 5 years ago

Create three germplasms (same type: cultivar) in a fresh triple site, got this error when tried to call these germplasms.

Fatal error: Call to undefined function chado_get_nid_from_id() in /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.const.inc on line 1824 Call Stack: 0.0004 238536 1. {main}() /home/ubuntu/workspace/index.php:0 0.1129 2813760 2. menu_execute_active_handler() /home/ubuntu/workspace/index.php:21 0.1130 2814856 3. call_user_func_array:{/home/ubuntu/workspace/includes/menu.inc:527}() /home/ubuntu/workspace/includes/menu.inc:527 0.1130 2815360 4. brapi_call_wrapper() /home/ubuntu/workspace/includes/menu.inc:527 0.1133 3035592 5. call_user_func_array:{/home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:90}() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:90 0.1133 3035792 6. brapi_v1_germplasm_json() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:90 0.1284 3054152 7. brapi_process_crud() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:1087 0.1347 3158168 8. brapi_v1_germplasm_search_json() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.api.inc:1789 0.1348 3165168 9. brapi_v1_object_search_json() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:1054 0.1928 3291152 10. call_user_func:{/home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:528}() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:528 0.1928 3291216 11. brapi_get_germplasm_details() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:528 0.1946 3298336 12. brapi_get_field() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.calls.inc:1307 0.1946 3298656 13. {closure:/home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.const.inc:1815-1832}() /home/ubuntu/workspace/sites/all/modules/brapi/api/brapi.api.inc:1412

laceysanderson commented 5 years ago

This was due to expecting the chado_get_nid_from_id function to exist which it obviously does not in T3. I fixed it here https://github.com/tripal/brapi/commit/6f33b5b9aebbf87cae5b518c7070a4b41c95374a