Auto Action Redirect - OnAfterUserUpdate

7 years 11 months ago - 7 years 11 months ago #281714 by edmundcheong
Auto Action Redirect - OnAfterUserUpdate was created by edmundcheong
I have just updated to the new nightly built CB as well as plugins.

before this, If i were to update a field on a list using ajax, it will not auto action redirect.. it will only redirect if we edit in profile edit display..

But, I realised with the new nightly build, auto action is triggering upon user update in user list..

This somehow leads to some problems for redirect.. the page tends to break when i redirect it the a user list below:
index.php?option=com_comprofiler&view=userslist&listid=24&searchmode=2&Itemid=600

When I redirect it to index.php, it opens a frame at the ajax field area on the user list.. it is as though, the redirection happens in the ajax field frame.. however, this is on and off..

Please Log in to join the conversation.

7 years 11 months ago - 7 years 11 months ago #281722 by edmundcheong
Replied by edmundcheong on topic Auto Action Redirect - OnAfterUserUpdate
I have tried redirecting to google.com.. it works when we are at the user profile.. but when it is on the list, after updating, the redirect auto action somehow reach a blank screen but could not go to google..

i think this starts to happen when the autoaction could redirect upon update user in ajax in the list.. (i believe this was not possible in the last version of autoaction plugin?)

Please Log in to join the conversation.

7 years 11 months ago #281734 by krileon
Replied by krileon on topic Auto Action Redirect - OnAfterUserUpdate
CB Core Fields Ajax is just that, ajax. You're redirecting the ajax endpoint and causing it to break. CB Core Fields Ajax always has and always will fire profile update triggers as it's to signify the profile has been updated (this is expected behavior).

Your redirect action needs to take all of this into consideration. Probably the easiest is to just ensure the output isn't raw. This can be done with the below condition.

[get_format] Not Equal To raw

Another option is to absolutely be sure its a profile edit save as follows.

[get_view] Equal To saveUserEdit

Another option is to use the onAfterUserProfileSaved trigger as it is only fired specifically for the profile edit save, but only contains the newly updated user object (so won't be of much use if you need to condition new values against old).


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.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

7 years 11 months ago #281762 by edmundcheong
Replied by edmundcheong on topic Auto Action Redirect - OnAfterUserUpdate
Thanks Kyle.. That really helped.. is there any where I could read about the auto action triggers?

I have looked in cb200-Primer_1.0.5.pdf, but I dont think so its there.. it will be great if we have the list of triggers and a short explanation?

Please Log in to join the conversation.

7 years 11 months ago - 7 years 11 months ago #281779 by krileon
Replied by krileon on topic Auto Action Redirect - OnAfterUserUpdate

is there any where I could read about the auto action triggers?

At this time all we have is the below reference tutorial for trigger usage, but it's out of date. A lot of the triggers however still exist.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

it will be great if we have the list of triggers and a short explanation?

All triggers available are in the CB Auto Actions dropdown. The name of the trigger is meant to be self explanatory as best as possible. There's no description list for triggers at this time.


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.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.197 seconds

Facebook Twitter LinkedIn