Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

help with autoaction

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago - 11 years 6 months ago #225574 by ThePiston
help with autoaction was created by ThePiston
I've got a php script that geocodes an address and puts it into the database. It works great on it's own when I call it like this:

site/update_geo_code.php?user_id=250

I coded it with a $user variable that can be passed in the URL like this:

$user = "$_GET[user_id]";

then in the query:

WHERE
a.id = $user

I'm using autoactions and something isn't right because it works outside of AA just fine, but I can't get it to work when someone is saving their profile.

These are the triggers (basically whenever a user profile is saved in front or backend):
onAfterUserRegistration,onAfterUserUpdate,onAfterNewUser,onAfterUpdateUser

It's a Request set to "Everybody" on automatic with the correct URL (site/update_geo_code.php?user_id=[user_id])

I'm using POST and this in the box: user_id=[user_id]

The AA is published.

Here's pic of the settings:



I get no errors using Maximum error reporting. I've also set the AA plugin to #1 but it's still not firing.

This site is J2.5, CB1.9, php5.3

Any help is appreciated.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Attachments:
Last edit: 11 years 6 months ago by ThePiston.

Please Log in or Create an account to join the conversation.

11 years 6 months ago #225579 by deltafidesign
Replied by deltafidesign on topic help with autoaction
Did you tryed set the condition in the auto action parameters?

Now it seems empty, you could try this

[username] not empty

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago #225583 by ThePiston
Replied by ThePiston on topic help with autoaction
I'm not sure if that's necessary, but I tried anyway and still nothing. Thanks though.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago - 11 years 6 months ago #225629 by ThePiston
Replied by ThePiston on topic help with autoaction
is there any way I can test what's being done when I save a profile in Firebug? I can't figure this out. I have this set up the exact same way on another site without issue. My php file is working so it's not that. Th only thing different is the site that is working uses CBAA 3.1.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 11 years 6 months ago by ThePiston.

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago #225669 by ThePiston
Replied by ThePiston on topic help with autoaction
found issue - was one of my variables (DOH)

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225674 by krileon
Replied by krileon on topic help with autoaction
Your script is setup to use GET yet you are sending it a POST. So it's not going to work. Set the usage to GET then supply it the URL formatted as follows.

site/update_geo_code.php?user_id=[user_id]

POST variables are not in GET and GET variables are not in POST. Only way to access both is to use REQUEST so either GET or POST usage would work.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum