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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225910 by krileon
Replied by krileon on topic help with autoaction
Your URL is incorrect or you've a domain level redirect in place. See how it's responding with "301 Moved Permanently" header.


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 #225928 by ThePiston
Replied by ThePiston on topic help with autoaction
URL is correct. I can copy it from the error page and paste it into browser and see my echo.

The only redirects I have are to force www in htaccess, but I'm using www in the URL anyway.

So if the URL is correct, then I'm assuming there's a redirect somewhere but I have no idea where. That's a new file on my server. Why can I reach the test.php file fine on browser if there's a redirect?

The only thing I can think of is RSFirewall and Qlueu404. I completely uninstalled RSFirewall (still nothing). I also disabled Qlueu404 plugin and still get the 301 error. The URL is definitely correct. I only get the 301 error when the URL is called from within CBAA.

You're 100% sure CBAA works properly with Requests on php files in J2.5?

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 #225933 by krileon
Replied by krileon on topic help with autoaction

You're 100% sure CBAA works properly with Requests on php files in J2.5?

Of course, it works fine. Please see the below example.

Test File
IN: /request_test.php
Code:
<?php print "Print"; echo "Echo"; var_dump( "Dump" ); return "Return"; ?>

Auto Action
Type: Request
Triggers: onAfterLogin
User: Automatic
Access: Everybody
URL: [cb:config param="live_site" /]/request_test.php
Method: GET
Return: Show
Error: Show
Debug: Hide

Output


The snoopy output is saying you've a permanent move in place. So either the URL is wrong or you have a redirect that's breaking the request. Browsing to the URL is not the same as sending an HTTP request from PHP, because browsing to the URL will go to its new destination and output and on any response code other than 200 it will fail for HTTP requests.


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.
Attachments:

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 #225935 by ThePiston
Replied by ThePiston on topic help with autoaction
can I use the absolute file location? (/home/account/public_html/map/update_geo_code.php)

I'm at a loss for what could be breaking this. Any extensions I should be looking for that could do this?

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 #225936 by krileon
Replied by krileon on topic help with autoaction
No, you don't use absolute paths for HTTP requests. You use live site paths. It does not auto-append live site to allow external requests to work fine. You can auto-append live site using the same usage I have done above (config substitution).


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 #225943 by ThePiston
Replied by ThePiston on topic help with autoaction
well I've disabled all of the plugins I can think of that would cause a redirect and still get the 301.

At this point I wonder if it's my VPS or the settings.

What can I ask my host to look for?

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