Attention!!! We are working from Monday till Friday, any time from 9:00 AM till 6:00 PM (+6 GMT) or, from 4:00 PM till 1:00 AM (EST). During weekends nobody from support team can answer topics.

News Joomla Components arrow Forum
  LoudMouth Board
  General
   Support Desk
    JCS: Unable to update Start and Expirey dates in Edit User Subscription
     Viewing Topic
Support Desk
Please, post you bugs, troubles, and other support ticket. If you post here please, be patient. we cannot quickly process forum posts currently. If you need quick assistance use e-mail, Skype or MSN.
Navigator


JCS: Unable to update Start and Expirey dates in Edit User Subscription
Last Page
 Author   Message
jmccann
JCS: Unable to update Start and Expirey dates in Edit User Subscription  #925


baby mamber

Messages: 5
Registered: 31-12-1969

I am unable to edit the Start and Expiry Dates in User Subscriptions.

Whenever I update the dates, and hit Update or Save, the fields get filled with zeroes and database doesn't get updated.


 
Tuesday, 26 February 2008
Tanya
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2262


Administrator

Messages: 81
Registered: 31-12-1969


Hello,

Could you, please, specify version of your component, MySQL, php and Joomla's.

Thank you.

 
Wednesday, 27 February 2008
reporter
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2634


baby mamber

Messages: 3
Registered: 31-12-1969

I'm having the same problem.  Here is my information:

JCS v. 1.5.10
MySQL v. 5.0.2
PHP v. 4.4.8
Joomla v. 1.0.15

I integrate with JUser.  If I edit the Expiration or start dates using PHPmyAdmin to edit the DB then I'm able to update the dates.  Obviously this isn't ideal.

 
Thursday, 01 May 2008
JE.Support
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2641


Administrator

Messages: 1380
Registered: 31-12-1969

Hello,


This problem fixed in latest version of JCS 1.5.11

Thank you.

 
Friday, 02 May 2008
artalphak
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2762


baby mamber

Messages: 2
Registered: 31-12-1969

Hello

I have just upgraded to the latest version 1.5.11 and I still have the error.
php: 5.2.5
Joomla 1.0.15
JCS: 1.5.11
Database: 4.1.22

regards Karl

 
Tuesday, 20 May 2008
JE.Support
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2763


Administrator

Messages: 1380
Registered: 31-12-1969

Hello Karl,


Please contact support with temp access to FTP and admin area and we will help you.

Thank you.

 
Wednesday, 21 May 2008
triresources
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2786


baby mamber

Messages: 8
Registered: 31-12-1969

I have the same problem, same symptoms, only using MySQL5.  Providing you with FTP access is not a solution, since we are developing the site offline on a non-Internet-connected server.  (Will not post to live server until it works<g>.) So please post details if you find a substantive solution!

Also interesting is that my testing shows that I *can* successfully update the "Access Limit" field, so it is not that the data update is not happening... it is just losing the Start Date and Expire Date values.  It sure seems like a problem with the SQL or date formats, etc, but Joomla! debug does not seem to capture the JCS MySQL commands for adding or updating a subscription, so I am stuck unless I set up a full debug session (and my Zend Studio is broken.  ).

Thanks,
  -t

 
Thursday, 29 May 2008 (Last Updated: Thursday, 29 May 2008)
triresources
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2787


baby mamber

Messages: 8
Registered: 31-12-1969

OK, here's what I found with the debugger:

In file:  admin.jcs.php, there seems to be a problem in function jcsUSave()

The following two lines are causing the problem:
    $ctime  = mosGetParam( $_REQUEST, 'ctime', 0);
    $extime = mosGetParam( $_REQUEST, 'extime', 0);

These lines are intended to get the parameters from the request info to build the query to update the user subscription record.  mosGetParam also cleans up the data and tries to do some simple data conversion, etc.  Problem is with the third argument of mosGetParam, which is the default value used when the key (second argument) is not found in the array (first argument).

If the default value is numeric (which it is,) mosGetParam converts the returned parameter value to an integer.  So a valid date string like "2008-06-28 13:26:59" winds up getting converted to "2008," which is NOT a valid date string.  So when the query runs, it simply drops the ctime and extime values.

Simply omitting the default values as:
    $ctime  = mosGetParam( $_REQUEST, 'ctime');
    $extime = mosGetParam( $_REQUEST, 'extime');
... seems to work fine.  When a null or empty value winds up somehow in the $ctime or $extime values, the result is just a missing date value, which is sort of what you'd expect anyway, so it seems OK to omit the default value argument.

It is relevant to note that I am using a clean 1.0.15 version of Joomla! (which contains the /includes/joomla.php file where mosGetParam() is defined.)  Also, the admin.jcs.php files are identical in the 1.5.10 and 1.5.11 zip files I have.

I cannot suggest if this is the intended solution from JoomlaEquipment or not.  Since I know nothing about how the insides of this is supposed to work, I realize this change might cause all sort of problems I had not considered!  I DO NOT RECOMMEND MAKING ANY CHANGES UNLESS DIRECTED BY JE STAFF!!  But hopefully this will help the JE staff get to the bottom of the problem we are having more quickly.

I hope this has been more help than confusion.
  -t
 

 
Thursday, 29 May 2008 (Last Updated: Thursday, 29 May 2008)
JE.Support
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2791


Administrator

Messages: 1380
Registered: 31-12-1969

Hello triresources,


Thank you for sharing us solution, this is almost the same we did for customers with this issue, what is strange that this happened not for all servers, so I am presume this could be some server configuration. Anyway will inform head developer of component so he do apropriate changes.
The exactly what we have to do is small hack:
File:\administrator\components\com_jcs\admin.jcs.php
Lines: 120, 121
$ctime  = mosGetParam( $_REQUEST, 'ctime', 0);
$extime = mosGetParam( $_REQUEST, 'extime', 0);
Changed to:
$ctime  = $_REQUEST['ctime'];
$extime = $_REQUEST['extime'];
Please be careful before applying this hack be sure that subscriptions are zeroing.

PS. I also I guess the hack suggested by triresources, more relevant so anyone having this trouble could use either that solution. Anyway developer did informed and I do think this will be fixed.


Thank you.

 
Thursday, 29 May 2008 (Last Updated: Tuesday, 10 June 2008)
triresources
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2808


baby mamber

Messages: 8
Registered: 31-12-1969

Thanks.  I agree, using
   $ctime  = $_REQUEST['ctime'];
   $extime = $_REQUEST['extime'];

instead of
   $ctime  = mosGetParam( $_REQUEST, 'ctime');
   $extime = mosGetParam( $_REQUEST, 'extime');

is a better solution.

Single-stepping through the code shows that the mosGetParam() function does a whole bunch of things that are skipped over anyway, so you always get the same result just getting the $ctime and $extime values directly from the $_REQUEST array. 

The same result with better performance.

 
Tuesday, 03 June 2008 (Last Updated: Tuesday, 10 June 2008)
JE.Support
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription  #2810


Administrator

Messages: 1380
Registered: 31-12-1969

Hello triesources,


I am not a big deal with PHP programming, and frankly speaking this solution was hinted by one our colleague. Anyway it works, the link for forum thread was send to Sergey for information

Thank you again for correction.

 
Wednesday, 04 June 2008
 
Display #
- latest messages from this topic
Address: Joomla Equipment, Box 1951, Bishkek, 720000, Kyrgyzstan
Telephones: Office: +996 312 68-91-34, Mobile: +996 543 91-81-42
More contacts...