No announcement yet.

Still no EXIT or CANCEL buttons on production enviroment

  • Filter
  • Time
  • Show
Clear All
new posts

  • Still no EXIT or CANCEL buttons on production enviroment

    Hi to everyone!

    I just ran into the "disappearing exit buttons on production enviroment" that other posts mention.

    Everything works fine on development enviroment, but as soon as the app is deployed, some of my forms called by a grid, loose the exit button.

    This post: mentions the problem was solved in 9.0.025.. but I'm still having the problem in 9.2.008

    As far as I have been able to test, buttons called from the grid via an application link, work fine...

    The buttons that fail, are the ones called via a button programmed in the grid with an event, using the sc_link macro.

    This is the simple code that makes the exit buttons disappear (this is in the OnRecord event. I guess the only relevant part is the last line of code.. the rest is just styling and display):

    $buttonStyle = "width: 20px; text-align:center; padding:0px; border-radius: 4px;"; // I also use this styiling on other buttons on the grid, so I define it once
    {addModel} = "<button style=\"" . $buttonStyle . "\">&nbsp;</button>";  // just to create a simple small, square button with rounded edges
    sc_link(addModel, form_add_new_model_relationship.php,idModel={idModel},"Add new model-part relationship","_self");
    These link buttons work perfectly fine, and the form is called and works correctly...only problem is that once I call the form, I cannot return to the grid, except via the menu.

    I somewhere read that the problem might be related to the security app (which I have enabled in this project).. but I tried using the admin settings, with ALL permissions ON, and the problem persists. I haven't tried removing the whole security app yet

    Oh! and I DID try deploying the project on development machine, and the problem persists.. so I have ruled out configuration / settings problems.. it works and fails exactly on the same server/apache installation.. only difference is if the app is deployed or not.

    Any ideas?

  • #2
    Have you ruled out cache on the browser? Try the site from a different browser and or different PC completely.

    I have had buttons go AWOL before, but eventually got it back. It can be very frustrating.

    I am wondering too, if you try your app on a mobile device, does the mobile toolbar also have missing buttons?

    Good luck!


    • #3
      Thanks for your answer Jamie.

      I first saw the problem on a completely different production setup (two different PCs, one of them with 3 browsers). Then I reproduced it on my dev PC as I explained above, just to rule out configuration differences between dev and prod enviroments.

      To satisfy your curiosity, I checked on a mobile phone, and the problem persists.

      I initially thought the problem was related to calling the form with the sc_link macro... but it seems it's not the case.. the problem is much more simple, and it's apparently related to INSERT mode.

      It seems there's some logic which does not allow the exit button, but it does allow the cancel button (in contrast to what I mistakenly posted on the title).

      Cancel button is useless in my case, because I just need the user to INSERT a new record, and return to the grid (something pretty common), while Cancel reverts the form to update mode.

      For me, it's very easy to reproduce.. ( I tried this at least 3 times )
      - Create a form with all default settings (I haven't changed my default scriptcase configuration, as far as I can remember)
      - Add an onApplicationInit event, with only this line: sc_apl_conf("form_name","start","new");
      - Save/Generate
      - Deploy to production
      - Have fun and see your exit button disappearing

      I found another older post (this one) mentioning this problem. Theres a solution very similar to what Giu suggested on his post, but I haven't been able to make it work


      • #4
        Well.. I kept testing things, and found another thing that works differently in dev vs. prod enviroment...anyway,
        I should probably open another post, but since this is a workaround for my problem, and it would seem it doesn't work, but in fact it does, I prefer to keep it here and maybe prevent some headaches.

        As I mentioned before, I tried Giu's solution, adding an exit button myself. Giu's post was a JS button. Since I could not make his simple code work, I tried using simple PHP button, with the correct "exit" icon, and with only sc_exit(); as the code.

        To put things in context again, I'm calling a form, from a button programed in the grid record, using sc_link.
        Now, using the button code above, in dev enviroment the exit button opens the scriptcase development enviroment, instead of exiting the form app and returning to the grid...
        But luckily, I tested it in production, and there, it works perfectly fine!...


        • #5
          I'm posting this because the bug I saw when I found my workaround, seems to have been there for quite a while.. have a look at this post, which also mentions the problem with sc_exit().