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:0

This 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.

AttachmentSize
services.module.patch561 bytes

#1

heyrocker - November 2, 2009 - 19:18

This patch actually changes from services_keyauth_get_keys() to services_get_keys(). Isn't that backwards?

#2

heyrocker - November 2, 2009 - 19:19
Status:active» needs work

#3

ilo - November 3, 2009 - 02:05

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

ilo - November 3, 2009 - 02:08

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

Tri - November 3, 2009 - 13:00
Status:needs work» needs review

Ooops, sorry about that... The patch rerolled in the correct way.

AttachmentSize
services.module-05.patch 572 bytes

#6

ilo - November 3, 2009 - 13:03

tri, are you using keys in your services implementation?

#7

ilo - November 4, 2009 - 13:45
Status:needs review» reviewed & tested by the community

Heyrocker, I marked this as rtbc for now, waiting for your approval.

AttachmentSize
620938_services_module_crossdomain_fix.patch 572 bytes

#8

heyrocker - November 4, 2009 - 20:27
Status:reviewed & tested by the community» fixed

The keyauth module is not required, so ilo's addition of a function check makes sense. Patch committed, thanks!

#9

System Message - November 18, 2009 - 20:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.