Fatal error: Call to undefined function services_get_keys()
Tri - November 2, 2009 - 12:46
| Project: | Services |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
Hello everybody.
Trying to resolve an issue where I was unable to access services of a domain through an other domain, I found that when the swf was trying to read the crossdomain.xml, it was getting an HTTP 500 error.
When reading crossdomain.xml with a browser I get this.
Fatal error: Call to undefined function services_get_keys() in sites/all/modules/services/services.module on line 144
Call Stack
# Time Function Location
1 0.0010 {main}( ) ..\index.php:0
2 0.6807 menu_execute_active_handler( ) ..\index.php:18
3 0.6869 call_user_func_array ( ) ..\menu.inc:348
4 0.6869 services_crossdomain_xml( ) ..\menu.inc:0This caused by function services_crossdomain_xml() calling a non-existent function services_get_keys(). The function should really be services_keyauth_get_keys(). I guess it is left over from a past refactoring. The attached patch fixes it.
| Attachment | Size |
|---|---|
| services.module.patch | 561 bytes |

#1
This patch actually changes from services_keyauth_get_keys() to services_get_keys(). Isn't that backwards?
#2
#3
As commented previously (http://drupal.org/node/477012#comment-2177558), the crossdomain.xml implementation now will break other modules because we are hijacking the URL completely.
If we are going to fix it, keep in mind a possible future redesign for this feature.
#4
looking the patch:
+++ F:/www/t/sites/all/modules/services/services.module.orig Thu Oct 15 06:59:56 2009
Yes, the diff was done from new to original I would say.
#5
Ooops, sorry about that... The patch rerolled in the correct way.
#6
tri, are you using keys in your services implementation?
#7
Heyrocker, I marked this as rtbc for now, waiting for your approval.
#8
The keyauth module is not required, so ilo's addition of a function check makes sense. Patch committed, thanks!
#9
Automatically closed -- issue fixed for 2 weeks with no activity.