Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: txcas on February 13th, 2014, 02:44 AM

Title: Problems with Edit Subscriber - Donation
Post by: txcas on February 13th, 2014, 02:44 AM
I created a subscription and tried to add it manually to a user profile.  This interface is messed up, sometimes it won't let me chose the day of the month with the mouse, most times no matter what month I use it changes it and defaults to January. 
I tried to create a 1 day sub from Feb 12-13 and ended up with this:
How can that sub be active if the end date already passed?
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 13th, 2014, 02:48 AM
I also get these in the error log:

Code: [Select]
8: Undefined index: dayend
File: /home/creedmoo/public_html/sandbox/gz/app/ManagePaid.php
Line: 976

8: Undefined index: day
File: /home/creedmoo/public_html/sandbox/gz/app/ManagePaid.php
Line: 975
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 13th, 2014, 07:41 AM
Sounds fun! Eager to get on my PC and fix this. And see if the bug was smf's or someone else's... :P

Considering that I've never touched subscription code before this week... :whistle:
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 13th, 2014, 02:43 PM
I just tested this on SMF and it works fine.  My money is on this is a bug from that other guy.  :eheh:
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 13th, 2014, 06:35 PM
I've done extending testing (about 10 minutes each) on both wedge.org and my local install, using multiple subscription types.
I'm sorry to announce, I haven't experienced any problems, myself. Days and months were correctly stored.
I did get the dayend mention in my error log, but only once, and as I didn't notice immediately, I don't know in what conditions it happened. I suspect it was when adding a subscription and forgetting to enter a username, but when I tried it again, I didn't get the error again.
Also, if I enter a valid username (mine), it seems that I'm always getting an "already subscribed" error, even though my name isn't in the list.
That, that could be a bug...
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 13th, 2014, 08:48 PM
I will load the latest commits and try again.  It might be f*&%$ IE11 playing tricks on me.
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 13th, 2014, 11:04 PM
Well, here is a video of the problem.
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 14th, 2014, 12:24 AM
The reason the select box won't change the date is because you're trying to set it to a day that would be AFTER the End Date. This is automatically refused by Wedge. Change the end month to a later month, and then you should be able to set the day to any day you want.

As for data not saving, it may be due to a bug in what happens after the day gets 'fixed'...
Can you try to just edit your subscription, and change the end day to a few days later, then save?
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 14th, 2014, 12:47 AM
Rewatching your video, it seems like the JS for validating dates isn't working very well. I'll have to have a look. Remind me tomorrow...
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 14th, 2014, 03:11 AM
Notice in the video that if I select February the month saved as January.  If I chose March, it saves February.
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 14th, 2014, 09:07 AM
I noticed that @live627 made a PR to fix this. I'll have a look asap! Seems to be linked to the JavaScript side indeed and that could be a bug of mine. For once! ;)
Title: Re: Problems with Edit Subscriber - Donation
Post by: Nao on February 15th, 2014, 09:38 PM
Everything good, now..?
Title: Re: Problems with Edit Subscriber - Donation
Post by: txcas on February 16th, 2014, 04:54 AM
Yes, problem fixed.  Thank you!