Announcement

Collapse
No announcement yet.

sc_ajax_message() not working in production environment?

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

  • sc_ajax_message() not working in production environment?

    I'm getting a strange problem with sc_ajax_message. It is working OK in development when on the localhost server - but when I deploy to production the message box appears when it should but just gives a single letter "I" for both Title and message body - instead of the full message.
    The code I'm using in an AJAX onupdate is:

    sc_ajax_message('Account Status was updated','Info');

    I've inspected the HTML and it is showing correctly when run in development but after deployment the same inspection shows:

    " <span id="id_message_display_text">I</span> " - so the message box jut show an I character in both Title and Message.

    However the generated php on the live server seems identical to the development generated php. I've even tried manually editing the generated php of the sc_ajax_message function on the development server to "fix" the message by replacing the generated:
    " $this->NM_ajax_info['ajaxMessage']['message'] = NM_charset_to_utf8($sMessage); "
    with:
    " $this->NM_ajax_info['ajaxMessage']['message'] = 'test'; " but it ignores it so the HTML on the webpage still just shows "I"?

    Anyone know if this means it must be some incompatiblity issue issue of the php server on the live host?

    Has anyone else had a similar isse?

    Many Thanks for any ideas/suggestions!
    Last edited by oscarj; 10-27-2018, 01:53 PM.

  • #2
    Since update to 9.2.015 I'm now getting this same issue on development. 9.2.015 and extends also to windows alert boxes as well as the sc_ajax_message() macro mentioned above. For example:

    sc_ajax_javascript('alert', 'Sorry! - Spec is currently locked by user:');

    gives me a window alert box that just shows "S".

    As noone seems to be getting the same issue and my issue now applies to development as well as production so I'm guessing is not php server compatibility issue can anyone tell me where I am going wrong?

    Comment


    • #3
      Anybody got an answer to this problem ? I am using version 9.3.006 and stil have this problem with sc_ajax_message and sc_alert, both work fine on dev but not on prod.

      Comment


      • #4
        I have a similar issue and I am on 9.4 using SweetAlert. The development message is fine, but the production is a single letter. "A" in my case.

        Comment


        • #5
          I'm running SC 9.4.006 with PHP 7.0.33 in my development environment. I had the same issue today. I WAS running PHP 7.2 in my production environment. After downgraded PHP to 7.0.33, the SweetAlert message boxes work correctly now.

          Comment


          • #6
            i have the same issues. Scriptcase is looking at it

            Comment


            • #7
              Me too. I have an A

              Comment


              • #8
                I just downgraded PHP from 7.3. to 7.0.33 and indeed it fixes the problem. Not happy to downgrade so let's hope they fix this.

                Comment


                • #9
                  Is this an issue which exists already 1 year and more?
                  I have it too on my production. and I cannot just go to php 7.0.33, cause my curent PHP is for VC15, but PHP 7.0.33 is for VC14, and therefore not compatible with my ApacheServer using VC15

                  Comment


                  • #10
                    Just to record my issue: Yes , I have the same issue. Using PHP 7.3. The sc_ajax_message just shows a Y.
                    Any fix yet for this ?
                    My code as follows :
                    $javascript_title = 'Welcome Back '; // Javascript message title
                    $javascript_message = 'Hello '.$cust_name_first ." ".$cust_name_last; // Javascript message contents

                    // Display javascript message
                    sc_ajax_message($javascript_message, $javascript_title);

                    Comment


                    • #11
                      It is not a good idea to run production with a higher PHP version then the IDE has. I hope that SC is working hard to fix this as 7.0 is out of maintenance and even 7.1 is close. But the currently supported PHP of Scriptcase is 7.0 and you need to use that on your production systems.
                      Albert Drent
                      aducom software netherlands
                      scriptcase partner, reseller, support and (turn-key) development
                      www.scriptcase.eu / www.scriptcase.nl

                      Comment

                      Working...
                      X