Announcement

Collapse
No announcement yet.

Ajax even not working in production

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ajax even not working in production

    Good afternoon,

    In my production environment this code is not working

    // Check for record
    $check_sql = "SELECT hardwareID, typeDesc, hwModelDesc, vendorname, warrantyEndDate "
    . " FROM hwalldet"
    . " WHERE hardwareID = '" . {hardwareID} . "'";
    sc_lookup(rs, $check_sql);

    if (isset({rs[0][0]})) // Row found
    {
    {hwType} = {rs[0][1]};
    {hwModel} = {rs[0][2]};
    {vendor} = {rs[0][3]};
    {warrantyEnd} = {rs[0][4]};

    }
    else // No row found
    {
    {other_field} = 'nothing';
    {other_region} = 'more nothing';
    }


    I am given this error

    Uncaught ArgumentCountError: Too few arguments to function newTicket_apl::hardwareID_onChange(), 0 passed I have the very similar code (different tables and fields) working elsewhere in production so I am not sure what I am missing. Thanks, Keith

  • #2
    If this is working in development, then it could be that uploading went wrong. Did you retry? Sometimes deleting the runtime fully and then re-upload, cleaning browser cache and cookies can help. If then the issue persists it looks like a bug, and you can report that to bugs @ scriptcase.net
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      I will retry and let you know the results. I did try clearing the browser already but that did nothing

      Comment


      • #4
        Just to be safe and since the production is not fully live yet I cleared everything out, did a typical deployment, uploaded the zip and extracted it. I also cleared the browser again but I get the same issue.
        the strange thing is that this code works fine on the same form.

        // Check for record
        $check_sql = "SELECT idsoftware, vendorname, softDesc, licenseCount, subscripEnd "
        . " FROM swalldet"
        . " WHERE idsoftware = '" . {softwareID} . "'";
        sc_lookup(rs, $check_sql);

        if (isset({rs[0][0]})) // Row found
        {
        {softwareName} = {rs[0][1]};
        {swDesc} = {rs[0][2]};
        {swLic} = {rs[0][3]};
        {swSubEnd} = {rs[0][4]};

        }
        else // No row found
        {
        {other_field} = 'nothing';
        {other_region} = 'more nothing';
        }

        Comment


        • #5
          Hello, we'll make some tests and give you a feedback.
          Best Regards,
          Rafael Herculano

          Bug Tracker Team
          Netmake - IT Solutions

          Comment


          • #6
            I dug through the production code and it added a variable to the Ajax function the code had
            hardwareID_onChange($softwareid)

            once changed to

            hardwareID_onChange()

            the code works.

            Comment

            Working...
            X