Role expiration tokens show up as January 1, 1970 in notifications

Posts: 10
Joined: 01/10/2008
Bug Finder

Well, the title says it all. I've tried with [role-expiration-long] and [role-expiration-short].

I don't think it matters that the website's main language is Italian, and that I've personalized all notifications. I still might be doing something wrong.

Thanks.

Posts: 332
Joined: 08/07/2007
Administrator

What are the length of expirations on your subscriptions? What's happening is that expiration timestamp (that represents the date the role expires) is returning null or 0, which corresponds to the date you've specified.

Edit: Nevermind, I see what's going on now. When a role is granted, its using the uc_roles_products object instead of the uc_roles_expirations object. I've committed a change to uc_roles.module that will fix this.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 10
Joined: 01/10/2008
Bug Finder

Thanks Shawn. Now the date is not "the beginning of times" anymore, but it doesn't always show up right. More specifically:

  1. the role is bought the first time, let's say for two months: the date in the e-mail is April 8, so two months from today (nothing wrong here);
  2. the role is bought a second time before expiration, for two more months: the date is still April 8. The Role Expiration screen, however, shows the right date, June 8;
  3. from this moment on, the date in the e-mail reflects the status before the additional purchase, while the actual expiration date is correct.

Ultimately, it appears to be a problem with roles renewed before the original expiration.

Thanks, again.

Posts: 332
Joined: 08/07/2007
Administrator

Nice one! Again you have shown there was a bug with the notifications. For this you will be awarded one bug finder badge. And you will also find the bug has been fixed as of rev 850. Thanks!

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine