Joomlander.Net

...extensions by Bruce Scherzinger

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Please Login or Register.    Lost Password?

Date field changing ever shows?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Date field changing ever shows?
#368
Date field changing ever shows? 3 Years, 2 Months ago  
This is a very fine plugin. Just another question, in my notifying mail it always says:

Birthday from 1900-12-12 to 1900-12-12

even if there hasnt been a change to Birthday. Birthday is my only Date Field…may be this could be fixed, though its better to have more then less information…
MacJoomla
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#371
Re:Date field changing ever shows? 3 Years, 2 Months ago  
That's very curious. Not sure I can explain it without getting in to debug it myself. I saw a similar thing happen in an early version of the plug-in that included checking the avatar field. Then I realized the avatar (thumbnail) was updated using a different mechanism and doesn't get sent to the extension with the other profile parameters. So there is an exclusion for it and the plug-in should not send an email if someone changes their avatar. If you need to be notified of that, I believe there is a CB feature that does that.

As far as date entries go, the standard ones are excluded also but for obvious reasons. The registration date should never change and the last updated date changes every time the user saves changes. So I don't believe any date fields were tested. I'll look into it from that perspective. I suppose this could be problematic if a date field is allowed to be NULL. I don't do any explicit checks for NULL, and I am not sure what happens if you compare a non-NULL value with a NULL value. One would hope they would simply not be equal and that comparing NULL with NULL would yield equality. The problem is likely something like this that I overlooked.

Thanks for the heads up.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#374
Re:Date field changing ever shows? 3 Years, 2 Months ago  
Thank you for answering to all my questions. In this case just one more thing, its not just showing exactly "Birthday from 1900-12-12 to 1900-12-12" everytime, but it shows the actual individual entered date of Birth in each mail, even if its not changed, if this affects your thoughts…
MacJoomla
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#375
Re:Date field changing ever shows? 3 Years, 2 Months ago  
I see the problem. It is caused by the way you enter the date versus how it is stored. When it is entered, it appears as mm/dd/yy (or whatever date format you setup in the CB configuration), whereas when it is stored it appears as a UNIX date/time string (YYYY-MM-DD HH:MM:SS), So they will NEVER match. I will need to modify the plug-in to check for date fields and convert the entered date to UNIX time format before comparing.

I should have this fixed by the end of today sometime and will release v1.1 after I fix it.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#376
Re:Date field changing ever shows? 3 Years, 2 Months ago  
Thats a fast service for an cool plugin – thanks for it!

MacJoomla
MacJoomla
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#377
Re:Date field changing ever shows? 3 Years, 2 Months ago  
The problem was not at all what I thought. CB stores dates in YYYY-MM-DD format all the time. The dates being compared seemed identical, but for some unexplained reason they didn't compare that way. So I had to make a special case for dates and convert them to the same exact format before comparing them, which works. Very bizarre.

Anyway, you can download v1.1 here.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: brucescherzinger

Member Access

Donations Accepted

Joomlander.Net is now accepting donations. Your donation, though not required to use this site or download files, will help to keep it online and keep the Joomla extensions coming. Donations are made through PayPal and are 100% secure. You can use your own PayPal account or any major credit card.

Joomlander.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo are used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.