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 #225695 by ThePiston
Replied by ThePiston on topic help with autoaction
didn't work with GET, only works with POST

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 #225822 by ThePiston
Replied by ThePiston on topic help with autoaction
spoke too soon. I must have gotten tricked because it's not working anymore (if it ever did). I tried using GET to no avail.

I was using the wrong fields to write the new coordinates from Google, but fixing them doesn't make the AA fire.

Here's my URL and settings are same as before. The file works and geocodes properly if I call it via browser like this: site/map/update_geo_code.php?user_id=250





I just do not think it is firing at all.

using these Triggers:
onAfterUserUpdate,onAfterUserRegistration,onAfterUpdateUser,onAfterNewUser

CBAA plugin is enabled as is the AA action itself.

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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225830 by krileon
Replied by krileon on topic help with autoaction
It should fire on every registration and profile update based off the configuration. It should be firing just fine, but your URL and Request isn't setup properly. Don't use both, use one or the other.

Usage 1:
URL: site/update_geo_code.php?user_id=[user_id]
Method: GET
Request: Empty

Usage 2:
URL: site/update_geo_code.php
Method: GET
Request: user_id=[user_id]

Don't use both are the same time. All it does is fire an HTTP request using snoopy. This is not the same as browsing to the URL. Your PHP needs to be able to handle this request properly. It's also silent so you won't truly know it's working or not unless your script has some sort of logging in place to know that it was reached or outputs a response and you've the action configured to output the response.


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.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago - 11 years 6 months ago #225835 by ThePiston
Replied by ThePiston on topic help with autoaction
no combination of those worked sadly. The php does output. I have it set to output the query but nothing is displayed on the site after an profile update.

The weird thing is that on another site I have this works perfectly well.

I'm at a loss here.

I need to test a normal file just to see if the AA is firing. Can I point the URL to any php file with a simple echo line to see if it outputs after a profile save?

**edit** to test I put this into a file called test.php and then the URL is now site/test.php with GET and user_id=[user_id] in the Request:
Code:
<?php $user = "$_GET[user_id]"; echo "I am user number $user"; ?>

I have all errors and output set to "Show".

Shouldn't I see some sort of output when I save using that? All I see is "Your settings have been saved."

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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225886 by krileon
Replied by krileon on topic help with autoaction

I need to test a normal file just to see if the AA is firing. Can I point the URL to any php file with a simple echo line to see if it outputs after a profile save?

Yes, but you need to set the action to output errors, return values, and enable debugging. It should then give you all the info you need to figure out why your HTTP request isn't working.

Shouldn't I see some sort of output when I save using that? All I see is "Your settings have been saved."

Yes and no. You're outputting during a redirect so you'll see nothing. To force CB to stop you need to enable debug mode and maximum error reporting in Joomla global configuration and CB will stop its redirects to output echoes, etc..


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.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 6 months ago #225896 by ThePiston
Replied by ThePiston on topic help with autoaction
here's output from debug (not all of it, but what seemed pertinent)

object(CBSnoopy)#1018 (41) { ["host"]=> string(14) " www.site " ["port"]=> int(80) ["proxy_host"]=> string(0) "" ["proxy_port"]=> string(0) "" ["proxy_user"]=> string(0) "" ["proxy_pass"]=> string(0) "" ["agent"]=> string(13) "Snoopy v1.2.3" ["referer"]=> string(0) "" ["cookies"]=> array(0) { } ["rawheaders"]=> array(0) { } ["maxredirs"]=> int(5) ["lastredirectaddr"]=> string(46) " www.site/map/test.php?user_id=250 " ["offsiteok"]=> bool(true) ["maxframes"]=> int(0) ["expandlinks"]=> bool(true) ["passcookies"]=> bool(true) ["user"]=> string(0) "" ["pass"]=> string(0) "" ["accept"]=> string(56) "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" ["results"]=> string(464) "
Moved Permanently

The document has moved here.

Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.6 Perl/v5.8.8 Server at www.site Port 80
Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries

" ["error"]=> string(0) "" ["response_code"]=> string(32) "HTTP/1.1 301 Moved Permanently " ["maxlength"]=> int(500000) ["read_timeout"]=> int(30) ["timed_out"]=> bool(false) ["status"]=> string(3) "301" ["temp_dir"]=> string(4) "/tmp" ["curl_path"]=> string(19) "/usr/local/bin/curl" ["_maxlinelen"]=> int(4096) ["_httpmethod"]=> string(3) "GET" ["_httpversion"]=> string(8) "HTTP/1.0" ["_submit_method"]=> string(4) "POST" ["_submit_type"]=> string(33) "application/x-www-form-urlencoded" ["_mime_boundary"]=> string(0) "" ["_redirectaddr"]=> string(46) " www.site/map/test.php?user_id=250 " ["_redirectdepth"]=> int(5) ["_frameurls"]=> array(0) { } ["_framedepth"]=> int(0) ["_isproxy"]=> bool(false) ["_fp_timeout"]=> int(30) ["headers"]=> array(7) { [0]=> string(32) "HTTP/1.1 301 Moved Permanently " [1]=> string(37) "Date: Thu, 25 Apr 2013 15:02:41 GMT " [2]=> string(162) "Server: Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.6 Perl/v5.8.8 " [3]=> string(58) "Location: www.site/map/test.php?user_id=250 " [4]=> string(21) "Content-Length: 464 " [5]=> string(19) "Connection: close " [6]=> string(45) "Content-Type: text/html; charset=iso-8859-1 " } }
Moved Permanently

The document has moved here.

Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.6 Perl/v5.8.8 Server at www.site Port 80
Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries



Site Debug mode: CB redirection with message "Your settings have been saved." without empty output
During its normal operations Community Builder often redirects you between pages and this causes potentially interesting debug information to be missed. When your site is in debug mode (global joomla/mambo config is site debug ON), some of these automatic redirects are disabled. This is a normal feature of the debug mode and does not directly mean that you have any problems.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum