[SOLVED] Very strange date comparison in Auto Action

6 years 7 months ago #297340 by fribse2011
Replied by fribse2011 on topic Very strange date comparison in Auto Action
I've tried it at a lot of hours around the clock, so I doubt that I should've missed it for that many attempts (at some point the offset should be mute).

And how do I get the 'users' trigger to show the debug info? I've enabled debugging for the site, but I still don't see it.

I would love to test out if the offset has any difference to it, but as I can't get the debug shown for the users trigger currently it's impossible, and of course the 'big dates' are closing in (30/9+1/10) for my auto actions.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

6 years 7 months ago #297346 by krileon
Replied by krileon on topic Very strange date comparison in Auto Action

I've tried it at a lot of hours around the clock, so I doubt that I should've missed it for that many attempts (at some point the offset should be mute).

Again, the cb:date substitution since it was created has always applied the offset. I don't know what more to say regarding this. Maybe at some point you had UTC timezone set in your account or for the site so it wasn't noticeable.

And how do I get the 'users' trigger to show the debug info? I've enabled debugging for the site, but I still don't see it.

Enable debug mode in Joomla global configuration and enable debug under the Parameters tab of your auto action. If there's any debug information to output it'll output to Joomlas message queue and should show as an error at the top of the page. It only outputs debug information in event of access failing, condition failing, or error in the action. Not all triggers have output so some may not be able to output debug information. You could also be using the wrong trigger and expecting it to work when it won't.

I would love to test out if the offset has any difference to it, but as I can't get the debug shown for the users trigger currently it's impossible, and of course the 'big dates' are closing in (30/9+1/10) for my auto actions.

Just use [cb:date format="m-d" offset="UTC"/] and you'll be fine as it'll always compare to UTC. The cb:parse function="date" usage is always UTC by default.


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 - 6 years 7 months ago #297360 by fribse2011
Replied by fribse2011 on topic Very strange date comparison in Auto Action
I could see debug in 6.x but in the New version it doesn't show any debug.
And I still dont understand how utc can change the date comparison by a Day.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

6 years 7 months ago #297392 by krileon
Replied by krileon on topic Very strange date comparison in Auto Action

I could see debug in 6.x but in the New version it doesn't show any debug.

I've no idea what your action configuration is so I've no idea what to tell you. CB Auto Actions 7.0.0 is a rewrite. It was rewritten from the ground up. It's using namespaced classes and proper error setter/getter. The errors are output to Joomlas message queue. If the message queue gets purged you won't see them. So depending on when you're doing this the message queue may get emptied (only seen this happen during logout operations). Aside from that you must ensure debug mode in Joomla is enabled and that you've debug enabled in your auto action.

And I still dont understand how utc can change the date comparison by a Day.

It's not. You weren't using UTC when getting the current date. You were offsetting by whatever the server offset was set to or by whatever the viewing users offset was set to as again cb:date substitution is always offset unless you specifically set it not to with offset="UTC".


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 #297423 by fribse2011
Replied by fribse2011 on topic Very strange date comparison in Auto Action
I've created a small video of the action, and what happens with debug enabled.
As it is a Users trigger, I don't see any of the normal debug (it's just a white screen), and on top of that I don't see any debug output from the action, so the result is just a white screen. This is both on FF and Chrome.

www.screencast.com/t/ue4BEgYOXc

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

6 years 7 months ago - 6 years 7 months ago #297424 by fribse2011
Replied by fribse2011 on topic Very strange date comparison in Auto Action
I got some debug output, but I had to modify the users url trigger and remove the &format=raw at the end.
Now I can see the comparison:
:: Action 164 :: Conditional 2 failed for 322: 01-18 Equal to [cb:date format="m-d" offset="UTC"/]
So that doesn't really work either.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.371 seconds

Facebook Twitter LinkedIn