Skip to Content Skip to Menu

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

onAfterUserUpdate trigger fires after next update

  • houfton
  • houfton
  • OFFLINE
  • Posts: 40
  • Thanks: 1
  • Karma: 0
11 years 3 months ago - 11 years 3 months ago #230598 by houfton
I am trying to update another table using an Auto Actions SQL Query. The thing I am finding is that, using the onAfterUserUpdate trigger (editing from the frontend), updates are made one iteration behind. For example:
actionCB tableother table
MrMr
update 1MrsMr
update 2MsMrs

The onAfterUpdateUser trigger that I am using (editing through the backend User Management) in the same query action does work as expected so it does not seem to be the query that is wrong:
actionCB tableother table
MrMr
update 1MrsMrs
update 2MsMs

I am using CB 1.8 on Joomla! 1.5 which is a bit antiquated I know, but I don't think it should be behaving like this?
Last edit: 11 years 3 months ago by houfton. Reason: clarity!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago - 11 years 3 months ago #230611 by krileon
I've no idea, you're using CB 1.8, which is out of date and no longer maintained, on Joomla 1.5, which is out of date and no longer maintained, basically making your install effectively end-of-life entirely.

This means you can't use the latest releases of CB Auto Actions or any bug fixes you maybe needing from CB 1.9 (with that note I am working on 1.9.1, which has even more fixes).

I don't recall how my CB 1.8 releases of CB Auto Actions function so it could just be a matter of wrong substitution usage or maybe the user object is being populated incorrectly (that trigger provides new and old user objects). For latest releases you'd simply use [var1_fieldname] (or just [fieldname] typically) to access the new user object or [var3_fieldname] to access the old. I've no idea if this is implemented in the release you're using.


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.
Last edit: 11 years 3 months ago by krileon.

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

  • houfton
  • houfton
  • OFFLINE
  • Posts: 40
  • Thanks: 1
  • Karma: 0
11 years 3 months ago #230642 by houfton
I thought you would say that. I am going to have to bite the bullet and upgrade asap to fix this.

The query is working absolutely fine. It is the trigger that is firing before user update, not after, for some reason. Using debug I can see that the post array is listed after the query which looks wrong.

As I say, the onAfterUpdateUser trigger works as you would expect - after update - on the same query.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230644 by krileon
Suggest making a clone of your install and test upgrading to CB 1.9 and CB Auto Actions 5.1.1 then see if issue persists. If it does then you perhaps have another action configured or something else installed that's firing the after profile update trigger.


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