Hey guys so i was having trouble connecting to amfphp with the user.login service
I was getting NetConnection call fail and bad version errors only with user.login all other services worked perfectly,

After days of troubleshooting, It turns out that what was causing the error was a Trigger and Action setup in Drupal to redirect the user to a url upon login, it seems that the triggers are fired when logging with services also,

This is what causes the strange errors, just thought i would post it so someone can find it when they search (i found nothing)

Maybe it should be posted in Trigger Project or Action Project, But its only a problem with services module

CommentFileSizeAuthor
#1 user_service.inc_.patch769 bytesmarcingy

Comments

marcingy’s picture

Status: Active » Needs review
StatusFileSize
new769 bytes

Services go through drupal standard login in function user_authenticate therefore the trigers will be fired. The issue is that trigger is taking the user away from the page and hence services isn't getting a return. You might be able to do something with the rules module by checking the url that the request for loging in was delivered from and then excute the redirect based on that condition.

I have attatched a patch that provides a source element in the array with it might be possible to tell the action not to fire but that will require changes to the action itself. If this approach works I'll get this patch committed to the project.

Everything is actually working as designed the issue is that the action isn't taking into account that the request might be services based.

floptikal’s picture

I am very interested in a solution for this problem. I have applied the patch, but I am not sure how to configure the trigger. Has anyone found a solution to this?

hakkisak’s picture

I was able to create a separate multisite domain for amfphp connections at:
connect.domain.com

this means if you login at domain.com it will redirect you properly while letting flash do its thing with connect.domain.com

marcingy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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