Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

User ID must be unique-Registration Freezes app

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

    User ID must be unique-Registration Freezes app

    Testing my registration method. I intentionally attempted to register using a known userid already in system. Example: sophie45. When I click submit, I get the expected (and hoped for - User ID must be unique).

    But, when I attempt to change the userid to sophie44 (or anything) and click submit, the app freezes or goes into an endless loop.

    I used the AlwaysUp restart app but that didn't work. I have to restart the server with each test.

    Here are my registration dialog's events:
    Initialize:
    CurrentForm.Controls.Userid.value = ""
    Dim session.__protected__UserId as C
    a5ws_get_user_values(CurrentForm,request)
    CurrentForm.Controls.groups.value=a5ws_get_guid_from_group("JobSeeker",request)

    Validate:
    request.variables.ulink=userid
    a5ws_save_user_values(CurrentForm,request)
    session.__protected__UserId=alltrim(CurrentForm.Controls.ulink.value)

    Aftervalidate:

    a5ws_get_user_values(CurrentForm,request)

    dim userid as C
    dim ulink as C
    dim password as c
    dim SecQues as c
    dim SecAns as c
    dim groups as C
    dim tbl as P
    '=================== Open user table and populate fields
    tbl=table.open("[pathalias.adb_path]\users")
    tbl.enter_begin(.T.)
    tbl.Userid = alltrim(Userid)
    tbl.Secquest = alltrim(SecQues)
    tbl.Secanswer = alltrim(SecAns)
    tbl.User_type = groups
    tbl.Email = Email
    tbl.Addcreditemail = Email
    tbl.enter_end(.T.)
    '=================== Set Session Variables
    session.__Protected__Userid = tbl.Userid
    session.ulink = tbl.Ulink
    tbl.close()

    ' ============ Redirect to appropriate page
    CurrentForm.RedirectTarget ="JSRegister.a5w?Userid=CurrentForm.controls.userid.value"

    Activate:
    queslist = a5ws_get_security_ques(request)
    pagelist = a5ws_get_page_list(request)

    Is there something in here in my events that could be the culprit?

    Thanks in advance!
    Last edited by EricN; 02-01-2009, 01:27 PM.
    Eric

    Alpha Five Websites
    longlivepuppies.com
    socialservicenetwork.com
    -------------------------------------------------
    socialservicenetwork.org

    #2
    Re: User ID must be unique-Registration Freezes app

    I did not read through your list, but it sounds like you are using the same form, without refreshing, to attempt to enter a new user. Try again, but always leave, then come back to your screen that adds users. If that works, then the problem is your add users screen does not blank out the request.variables.guid in between attempts to register someone. The first time, it sets it to sophi45's guid, then when you reattempt, it is still set to sophi45's guid, even though you changed the userid. The function that saves the user record uses guid as the primary if it exists.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: User ID must be unique-Registration Freezes app

      If the function "a5ws_save_user_values()" finds an error, it will not save any data and will return CurrentForm.has_error = .T. which will prevent the AfterValidate from firing. The dialog processing should stop and just return you to the original dialog.

      You should use the function "a5ws_Save_WebUser_Values()" in place of "a5ws_save_user_values()" as the newer function does not require changing the value of any request variables. The tutorial in the help for "Adding Users With a Web Component" shows the proper use of the function. There is also a newer function that just validates the data, "a5ws_Validate_WebUserValues()"

      This help page lists all of the web security functions.

      Comment


        #4
        Re: User ID must be unique-Registration Freezes app

        Thank you Steve and Jerry!

        I've made changes as per the updated Adding Users with a Web Component to my newjobseeker component and tested with a unique userid.
        System hangs and I have to reboot server.

        I then republished my old newjobseeker component and tested with a unique userid.
        System hangs and I have to reboot server.

        I then attempted to register using my newemployer component (I have not touched today) and tested with a unique userid.
        System hangs and I have to reboot server.

        All adding a new user tests now make the app hang. :( I can't access ANY of the apps pages.

        AlwaysUp does not help. I check restart app. It stops the app and then restarts but I still can't access any of my Alpha pages. I have to reboot the server.

        Could something (file) now be corrupt?

        Update: I deleted all files on the server and did a complete republish. Tested the add user.
        System hangs and I have to reboot server.
        Last edited by EricN; 02-01-2009, 05:32 PM.
        Eric

        Alpha Five Websites
        longlivepuppies.com
        socialservicenetwork.com
        -------------------------------------------------
        socialservicenetwork.org

        Comment


          #5
          Re: User ID must be unique-Registration Freezes app

          Well I see my table tbl=table.open("[pathalias.adb_path]\users") is not closing. And causing the hang?

          This dialog worked before now...what? I just updated to 1997_3250. A bug? If you look at my code above, it looks like I'm following the example in the Alpha help file. I'm using tbl.close()

          Any thoughts appreciated.
          Eric

          Alpha Five Websites
          longlivepuppies.com
          socialservicenetwork.com
          -------------------------------------------------
          socialservicenetwork.org

          Comment


            #6
            Re: User ID must be unique-Registration Freezes app

            hi Eric,
            As no true debug in webside, Steve Wood had suggested in a prior thread to write to a page in lieu of it....so just as a procedure, do this at points in your app prior to your tbl.close() is supposed to occur to find out where your script stops.

            Just something to pass the time until someone else stops by or you experience an epiphany regarding this!! :)
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #7
              Re: User ID must be unique-Registration Freezes app

              Hello Mike,
              I did follow Steve Wood's advice. My "epiphany" :) was to realize that successful code in my new user dialog's events that I have not touched for several months suddenly stopped working. Refresh is not necessary because I was attempting to register with a known non-unique userid.

              I'm now playing with my aftervalidate event. I commented all of the table code and attempted to register again, it worked!
              I will continue to experiment with the events and will be sure to report back when/if I find the exact line(s) causing my sudden issue.

              Thanks Mike for all the advice you have given me in the past. Very much appreciated.
              Last edited by EricN; 02-02-2009, 01:15 AM.
              Eric

              Alpha Five Websites
              longlivepuppies.com
              socialservicenetwork.com
              -------------------------------------------------
              socialservicenetwork.org

              Comment


                #8
                Re: User ID must be unique-Registration Freezes app

                Originally posted by EricN View Post
                Hello Mike,
                Well my :) was to realize that code that has been working for several months suddenly stopped working. I'm now playing with my aftervalidate event and will be sure to report back when/if I find the exact line(s) causing my sudden issue.
                Did your code stop working after a patch?

                Maybe you should roll back to the version that it was working on and try it there again........
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Re: User ID must be unique-Registration Freezes app

                  Hello Al,
                  That is what I'm wondering. I haven't tried to test register for a week or so. I am wondering if it could be related to the patch.

                  Maybe I should do a "rollback"
                  Last edited by EricN; 02-02-2009, 01:40 AM.
                  Eric

                  Alpha Five Websites
                  longlivepuppies.com
                  socialservicenetwork.com
                  -------------------------------------------------
                  socialservicenetwork.org

                  Comment


                    #10
                    Re: User ID must be unique-Registration Freezes app

                    I conducted simple tests such as:
                    dim tbl as P
                    tbl=table.open("[pathalias.adb_path]\posts")
                    tbl.enter_begin() (also included the .T.)
                    tbl.Userid = "yyyooo"
                    tbl.Company_name ="Johnson"
                    tbl.enter_end(.T.)
                    tbl.close()
                    ? "Hello"

                    Even this made my app hang to the point where I had to reboot the server. At the end of a very long day, I finally decided to try an AppServer rollback.

                    Rollback did it. Everything works fine again. I rolled back to 1938_3239.
                    Last edited by EricN; 02-03-2009, 01:54 AM.
                    Eric

                    Alpha Five Websites
                    longlivepuppies.com
                    socialservicenetwork.com
                    -------------------------------------------------
                    socialservicenetwork.org

                    Comment


                      #11
                      Re: User ID must be unique-Registration Freezes app

                      Eric

                      I must be missing something.. What do you think should cause the record in the table to be unique?

                      I don't see you testing for a key value already existing in the script.

                      Do you have a field rule unique-ness test?

                      All I see is that you enter a record in the table regardless if the record values already exist....
                      Al Buchholz
                      Bookwood Systems, LTD
                      Weekly QReportBuilder Webinars Thursday 1 pm CST

                      Occam's Razor - KISS
                      Normalize till it hurts - De-normalize till it works.
                      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                      When we triage a problem it is much easier to read sample systems than to read a mind.
                      "Make it as simple as possible, but not simpler."
                      Albert Einstein

                      http://www.iadn.com/images/media/iadn_member.png

                      Comment


                        #12
                        Re: User ID must be unique-Registration Freezes app

                        Sorry, I should have been more clear explaining my conclusion...

                        In my original post above I thought it was the uniqueness test causing my problem. However, the aftervalidate event in this same NewUsers dialog writes to my users table using code a little more complex than described in my post #10. It turned out that my problem was creating new records using the tbl.enter_begin().

                        I tested several of my other dialogs that also create new records using tbl.enter_begin() and had the same problem where the app would hang and I had to reboot the server.

                        Then I created this simple code page (post # 10) and tested. Same hang.

                        Everything else worked; code pages, grids, dialogs as long as they didn't have tbl.enter_begin(). I could update records but not create a new record using tbl.enter_begin()

                        But when I rolled back, all my scripts that didn't work using tbl.enter_begin() with the new patches now again work as expected.
                        Last edited by EricN; 02-03-2009, 03:58 PM.
                        Eric

                        Alpha Five Websites
                        longlivepuppies.com
                        socialservicenetwork.com
                        -------------------------------------------------
                        socialservicenetwork.org

                        Comment


                          #13
                          Re: User ID must be unique-Registration Freezes app

                          The still did not work. The page is not redirected, the user is not added to the websecurity group.
                          Wisdom is foundational, then add to that knowledge

                          Comment

                          Working...
                          X