[#6791] Using auto action to display a raw single user field

6 years 7 months ago - 6 years 7 months ago #297503 by activha
Hello

I don't really understand what auto action to use in order to get a single user field for use in another application.

Should I use the request action and simply add &[cb_field]&format=raw ?

We handle the authentication by using the user cookie

Thanks for the hint
Regards
Jean

Please Log in to join the conversation.

6 years 7 months ago #297510 by krileon
Depends on your other application. If you need to send an HTTP request then yes a Request action will do just that. Substitutions can of course be used in a request action. You do not need to include the substitutions in the URL of the request action, but to the Body usage where you provide the key value pairs, which will be sent with your HTTP request.


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 to join the conversation.

6 years 7 months ago #297524 by activha
Hi
No I dont need to send an http request, this is a get url from the remote application.

I tried with a code auto action and following params :
Triggers : none
Users : automatic
Access : all registered users (also tried everybody to test)
Conditions : none
Action: PHP
Code : echo '[cb_field]'; (and even only [cb_field] of [cb_field]; )
Display : return (tried also echo and all others
Internal Action url : activ-ha.com/index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=149&itemid=175&format=raw

And I cannot get any output

What did I forget ?

Please Log in to join the conversation.

6 years 7 months ago #297533 by krileon
Your code needs to do a return and not an echo.


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 to join the conversation.

6 years 7 months ago #297544 by activha
OK but same thing with a return...
This page does not display anything :
activ-ha.com/index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=149&Itemid=175&format=raw

This one :
activ-ha.com/index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=149&Itemid=175&format=json does display :
<div class="cb_template cb_template_jf_sirena_cb_20">4bd7db99</div>

Which is not the raw value of the field. It should only display 4bd7db99

What do I have to change to only get the raw field without any html ?

Please Log in to join the conversation.

6 years 7 months ago #297546 by krileon
That looks like a bug. The raw output should be 4bd7db99. Looks like it's being suppressed. Have added a bug ticket to fix for a new build today.

forge.joomlapolis.com/issues/6791


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.403 seconds

Facebook Twitter LinkedIn