[BUG REPORT] /admin/payment.php / payment.html

Discussion in 'Troubleshooting' started by draj, Apr 3, 2007.

  1. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo!

    In the Admin area, there is a javascript BUG somewhere:

    /admin/payment.php

    When we click on the file through the aMember CP > Payments and search for payments in the past, it will give no result.

    When we open a new window from the main page of the CP admin area i.e. admin/index.php and thereafter open a new window from the box Payments for last 7 days the SAME file /admin/payment.php and thereafter selecting the same date in the past will show the payments accurately!!!

    The same file, the same record, the same date, the same user but different result.

    Tracing the difference, I found that the BUG is in the manner how an URL is being generated by the template and payment.php!

    AT THE END a variable "&list_by=complete" IS NOT correctly generated, i.e. the leftmenu /admin/payment.php DOES NOT generate this variable in the URL. It generates "&list_by=". However by adding manually this missing variable to that defective URL by the same script renders correct reult.

    This is getting generated from the following:

    <script language="JavaScript">
    function list_by_change(elem){
    x = elem.options[ elem.selectedIndex ].value;
    frm = elem.form;
    if (x == "complete"){
    frm.elements['only_completed'].checked = true;
    } else {
    }
    }
    </script>

    Hence I beleive that there is a bug in this script and cookies that it is not getting generated correctly...
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hi!

    Few lines after there is the following:

    {html_options options=$list_by_options selected=$smarty.request.list_by}

    So the list_by is taken by smarty tags. I beleive that the javascripts and smarty do not work togather correctly.
  3. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hi!

    Well in the payment.php:

    How about adding the following?

    set_complete_from_smarty('complete', $vars);
  4. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hello!

    Ha, this is not a bug but a confusing programming! I would not do it this way!!!

    One needs to choose the drop-down and then the value "complete" will be submitted. Otherwise it does not work.

    Hence there needs to be a small modification to stop the confusion by others.

    The searches of members and subsubscriiptions needs to be overall revised as one needs them. This would play an important role when one has large number of users.

Share This Page