Components
| JPromoter |
| JContentSubscription |
| JDefender |
| JUser |
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
Forum
Forum | JCS: Unable to update Start and Expirey dates in Edit User Subscription | ||
|
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. |
|
|
|
Re: JCS: Unable to update Start and Expirey dates in Edit User Subscription |
|
| Thursday, 29 May 2008 | |
|
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 |
|
| Last Updated ( Thursday, 29 May 2008 ) | |
| Read more... | |
| < Prev | Next > |
|---|

