Announcement

Collapse
No announcement yet.

[SOLVED] sc_redir redirects to wrong path

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

  • [SOLVED] sc_redir redirects to wrong path

    I have an issue with sc_redir.

    when a new user clicks on the "activation" link in their new user email. The page displays:

    The requested URL /scriptcase/app/Timesheets/sec_form_add_users/sec_Login/ was not found on this server.

    For some reason it is looking for the login app in one folder too far down - it should be:

    /scriptcase/app/Timesheets/sec_Login/

    not:

    /scriptcase/app/Timesheets/sec_form_add_users/sec_Login/

    The code is in the OnApplicationInit of xxx_form_add_users:

    Code:
    if(isset($_GET['a']) && substr($_GET['a'],0,4) == 'new_')
    {
    	sc_exec_sql("UPDATE sec_users SET active = 'Y', activation_code ='' WHERE activation_code = ". sc_sql_injection($_GET['a']) );
    	
    	sc_redir('sec_Login');
    }
    ... which looks okay. Elsewhere sc_redir seems to work as expected.


    UPDATE: - Workaround

    The following works as a workaround:

    Code:
    if(isset($_GET['a']) && substr($_GET['a'],0,4) == 'new_')
    {
    	sc_exec_sql("UPDATE sec_users SET active = 'Y', activation_code ='' WHERE activation_code = ". sc_sql_injection($_GET['a']) );
    	
    	sc_redir('../sec_Login');        // Add "../" to direct to parent directory
    }
    Last edited by adz1111; 09-10-2014, 10:49 AM. Reason: Update - workaround

  • #2
    another workaround

    thanks dude

    Comment


    • #3
      Hello,

      Issue reported to our bugs team.

      regards,
      Bernhard Bernsmann

      Comment


      • #4
        Hello,

        you can send your project so I can perform some tests?

        Thank you!
        Best regards,
        Thomas Soares.
        ScriptCase International.

        Email: t.soares@scriptcase.net
        Visit our Blog: http://www.scriptcase.net/blog/
        Visit out fan page: http://www.facebook.com/Scriptcase

        Comment


        • #5
          Sure - how should I "package" it?

          ... and then Email the package to your email address as per your "signature"?

          Comment


          • #6
            Yes, please. Thank you!
            Best regards,
            Thomas Soares.
            ScriptCase International.

            Email: t.soares@scriptcase.net
            Visit our Blog: http://www.scriptcase.net/blog/
            Visit out fan page: http://www.facebook.com/Scriptcase

            Comment


            • #7
              Hi Thomas,

              Please post the solution summary after you are done, I'm having similar issue, although, not 100% similar, but looks like it.


              Thanks.

              Comment


              • #8
                Hello,

                I have simulated your same problem with a new project, creating a new security module, but work fine for me. I receive a email with complete url to log in into my system created by Scriptcase. Without any problem.

                Can you try create a new project and create a security module with activation via e-mail? I wait your feedback about your problem.

                Thank you!
                Best regards,
                Thomas Soares.
                ScriptCase International.

                Email: t.soares@scriptcase.net
                Visit our Blog: http://www.scriptcase.net/blog/
                Visit out fan page: http://www.facebook.com/Scriptcase

                Comment


                • #9
                  Thomas

                  Other redirs in all the other security module apps to the login app work fine - it's just in that one app I had to add the "../".

                  I'll try what you suggest, but it will be a few days....

                  But.... assuming a fresh module "fixes" it, implying some corruption somewhere, then the workaround in this case is a better solution than having to recreate the whole security module - given the effort :-)

                  Comment


                  • #10
                    Hello,

                    Thanks for understanding. Should this become common in their work environment, please notify me so I can contact with our development team so we can make the right decisions to solve this problem. I'm marking the thread as "solved", but can report something if you are in trouble for the same.

                    Thank you so much.
                    Best regards,
                    Thomas Soares.
                    ScriptCase International.

                    Email: t.soares@scriptcase.net
                    Visit our Blog: http://www.scriptcase.net/blog/
                    Visit out fan page: http://www.facebook.com/Scriptcase

                    Comment

                    Working...
                    X